로그인 상태 유지와 다마고치 수정 화면 정리
This commit is contained in:
1 parent
80d332a79c
commit
40615838ac
33 files changed
+248
-73
No files matched your search
@@ -60,6 +60,29 @@ static void ko_row(int y,int selected){rect(5,y+2,123,y+14,RGB(18,96,136));rect(
|
||||
s=s.replace('if(n>10u){ int h=100*10/(int)n; if(h<6) h=6; int y=12+(int)(100-h)*(int)top/(int)(n-10u);','if(n>6u){ int h=90*6/(int)n; if(h<6) h=6; int y=21+(int)(90-h)*(int)top/(int)(n-6u);');
|
||||
s=s.replace('ctext(118,foot,GREY,1);','ctext(117,foot,RGB(255,255,255),1);');
|
||||
s=s.replaceAll('if(sel>=top+10u) top=sel-9u;','if(sel>=top+6u) top=sel-5u;');
|
||||
// The character settings screen shares the regular list font and spacing.
|
||||
// Keep the selected row's value below the list, with two bounded text lines.
|
||||
const tama=s.indexOf('static void tama_menu(void){');
|
||||
s=s.slice(0,tama)+`static void ko_detail(const char *s){
|
||||
rect(5,77,123,111,BG);
|
||||
char line[128];int n=0,y=80;line[0]=0;
|
||||
while(*s){int z=ko_pair(s)?2:1;if(n+z>=124)break;for(int j=0;j<z;j++)line[n+j]=s[j];line[n+z]=0;
|
||||
if(text_w(line,1)>108){line[n]=0;text(10,y,line,GREY,1);if(y>=95)return;y=95;n=0;continue;}
|
||||
n+=z;s+=z;
|
||||
}
|
||||
text(10,y,line,GREY,1);
|
||||
}
|
||||
`+s.slice(tama);
|
||||
const ta=s.indexOf('static void tama_menu(void){'),tb=s.indexOf(' show(); wait_release();',ta);
|
||||
let screen=s.slice(ta,tb);
|
||||
const labels=[...screen.matchAll(/big_entry\(\d+,sel==\d,("(?:\\.|[^"\\])*"),/g)].map(m=>m[1]);
|
||||
if(labels.length!==3)throw Error('Character settings layout changed');
|
||||
screen=screen.replace(/rect\(0,0,128,128,BG\); ctext\(2,("(?:\\.|[^"\\])*"),WHITE,1\);/,'ko_surface(); ctext(4,$1,RGB(255,255,255),1);');
|
||||
screen=screen.replace(/utoa_\(lv_get\(\),st\); big_entry\(12,sel==0,.*?,st,GOLD,GREY\);/,`for(u32 i=0;i<3;i++){int y=25+(int)i*18;ko_row(y-2,i==sel);text(14,y,i==0?${labels[0]}:i==1?${labels[1]}:${labels[2]},WHITE,1);}\n utoa_(lv_get(),st);if(sel==0)ko_detail(st);`);
|
||||
screen=screen.replace(/big_entry\(41,sel==1,.*?,nm,PINK,GREY\);/,'if(sel==1)ko_detail(nm);');
|
||||
screen=screen.replace(/big_entry\(70,sel==2,.*?,st,ORANGE,GREY\);/,'if(sel==2)ko_detail(st);');
|
||||
screen=screen.replace(/ctext\(119,("(?:\\.|[^"\\])*"),GREY,1\);/,'ctext(115,$1,RGB(255,255,255),1);');
|
||||
s=s.slice(0,ta)+screen+s.slice(tb);
|
||||
// The full name and growth stage appear in the picture screen; keep list rows uncluttered.
|
||||
s=s.replace('q<3){ right[q]=fn[q];','q<0){ right[q]=fn[q];');
|
||||
s=s.replace('fn=fname(f-1u); *col=fcol(f-1u);','fn=fname(f-1u); *col=WHITE;');
|
||||
|
||||
Reference in new issue
Block a user