Changed menu panels
This commit is contained in:
parent
de93608650
commit
849a381eb4
2 changed files with 41 additions and 83 deletions
|
@ -546,7 +546,6 @@ local SCM CclDefineUI(SCM list)
|
|||
int i;
|
||||
UI* ui;
|
||||
void* v;
|
||||
MenuPanel** menupanel;
|
||||
|
||||
// Get identifier
|
||||
value=gh_car(list);
|
||||
|
@ -1086,71 +1085,27 @@ local SCM CclDefineUI(SCM list)
|
|||
//
|
||||
// Panels
|
||||
//
|
||||
temp=gh_car(list);
|
||||
value=gh_car(list);
|
||||
list=gh_cdr(list);
|
||||
if( gh_eq_p(value,gh_symbol2scm("menu-panels")) ) {
|
||||
sublist=gh_car(list);
|
||||
list=gh_cdr(list);
|
||||
while( !gh_null_p(sublist) ) {
|
||||
MenuPanel** menupanel;
|
||||
|
||||
value=gh_car(temp);
|
||||
temp=gh_cdr(temp);
|
||||
str=gh_scm2newstr(value,NULL);
|
||||
menupanel=&ui->MenuPanels;
|
||||
while( *menupanel ) {
|
||||
menupanel=&(*menupanel)->Next;
|
||||
menupanel=&ui->MenuPanels;
|
||||
while( *menupanel ) {
|
||||
menupanel=&(*menupanel)->Next;
|
||||
}
|
||||
*menupanel=calloc(1,sizeof(**menupanel));
|
||||
value=gh_car(sublist);
|
||||
sublist=gh_cdr(sublist);
|
||||
(*menupanel)->Ident=gh_scm2newstr(value,NULL);
|
||||
value=gh_car(sublist);
|
||||
sublist=gh_cdr(sublist);
|
||||
(*menupanel)->Panel.File=gh_scm2newstr(value,NULL);
|
||||
}
|
||||
}
|
||||
(*menupanel)=calloc(1,sizeof(**menupanel));
|
||||
(*menupanel)->Ident=strdup("panel1");
|
||||
(*menupanel)->Panel.File=str;
|
||||
|
||||
temp=gh_car(list);
|
||||
list=gh_cdr(list);
|
||||
|
||||
value=gh_car(temp);
|
||||
temp=gh_cdr(temp);
|
||||
str=gh_scm2newstr(value,NULL);
|
||||
while( *menupanel ) {
|
||||
menupanel=&(*menupanel)->Next;
|
||||
}
|
||||
(*menupanel)=calloc(1,sizeof(**menupanel));
|
||||
(*menupanel)->Ident=strdup("panel2");
|
||||
(*menupanel)->Panel.File=str;
|
||||
|
||||
temp=gh_car(list);
|
||||
list=gh_cdr(list);
|
||||
|
||||
value=gh_car(temp);
|
||||
temp=gh_cdr(temp);
|
||||
str=gh_scm2newstr(value,NULL);
|
||||
while( *menupanel ) {
|
||||
menupanel=&(*menupanel)->Next;
|
||||
}
|
||||
(*menupanel)=calloc(1,sizeof(**menupanel));
|
||||
(*menupanel)->Ident=strdup("panel3");
|
||||
(*menupanel)->Panel.File=str;
|
||||
|
||||
temp=gh_car(list);
|
||||
list=gh_cdr(list);
|
||||
|
||||
value=gh_car(temp);
|
||||
temp=gh_cdr(temp);
|
||||
str=gh_scm2newstr(value,NULL);
|
||||
while( *menupanel ) {
|
||||
menupanel=&(*menupanel)->Next;
|
||||
}
|
||||
(*menupanel)=calloc(1,sizeof(**menupanel));
|
||||
(*menupanel)->Ident=strdup("panel4");
|
||||
(*menupanel)->Panel.File=str;
|
||||
|
||||
temp=gh_car(list);
|
||||
list=gh_cdr(list);
|
||||
|
||||
value=gh_car(temp);
|
||||
temp=gh_cdr(temp);
|
||||
str=gh_scm2newstr(value,NULL);
|
||||
while( *menupanel ) {
|
||||
menupanel=&(*menupanel)->Next;
|
||||
}
|
||||
(*menupanel)=calloc(1,sizeof(**menupanel));
|
||||
(*menupanel)->Ident=strdup("panel5");
|
||||
(*menupanel)->Panel.File=str;
|
||||
|
||||
temp=gh_car(list);
|
||||
list=gh_cdr(list);
|
||||
|
|
|
@ -364,33 +364,36 @@ local void SaveUi(FILE* file,const UI* ui)
|
|||
ui->Buttons2[i].Width,ui->Buttons2[i].Height);
|
||||
}
|
||||
|
||||
fprintf(file, "\n 'cursors '(");
|
||||
fprintf(file, "\n point %s", ui->Point.Name);
|
||||
fprintf(file, "\n glass %s", ui->Glass.Name);
|
||||
fprintf(file, "\n cross %s", ui->Cross.Name);
|
||||
fprintf(file, "\n yellow %s", ui->YellowHair.Name);
|
||||
fprintf(file, "\n green %s", ui->GreenHair.Name);
|
||||
fprintf(file, "\n red %s", ui->RedHair.Name);
|
||||
fprintf(file, "\n scroll %s", ui->Scroll.Name);
|
||||
fprintf(file,"\n 'cursors '(");
|
||||
fprintf(file,"\n point %s", ui->Point.Name);
|
||||
fprintf(file,"\n glass %s", ui->Glass.Name);
|
||||
fprintf(file,"\n cross %s", ui->Cross.Name);
|
||||
fprintf(file,"\n yellow %s", ui->YellowHair.Name);
|
||||
fprintf(file,"\n green %s", ui->GreenHair.Name);
|
||||
fprintf(file,"\n red %s", ui->RedHair.Name);
|
||||
fprintf(file,"\n scroll %s", ui->Scroll.Name);
|
||||
|
||||
fprintf(file, "\n arrow-e %s", ui->ArrowE.Name);
|
||||
fprintf(file, "\n arrow-ne %s", ui->ArrowNE.Name);
|
||||
fprintf(file, "\n arrow-n %s", ui->ArrowN.Name);
|
||||
fprintf(file, "\n arrow-nw %s", ui->ArrowNW.Name);
|
||||
fprintf(file, "\n arrow-w %s", ui->ArrowW.Name);
|
||||
fprintf(file, "\n arrow-sw %s", ui->ArrowSW.Name);
|
||||
fprintf(file, "\n arrow-s %s", ui->ArrowS.Name);
|
||||
fprintf(file, "\n arrow-se %s", ui->ArrowSE.Name);
|
||||
fprintf(file, ")\n");
|
||||
fprintf(file,"\n arrow-e %s", ui->ArrowE.Name);
|
||||
fprintf(file,"\n arrow-ne %s", ui->ArrowNE.Name);
|
||||
fprintf(file,"\n arrow-n %s", ui->ArrowN.Name);
|
||||
fprintf(file,"\n arrow-nw %s", ui->ArrowNW.Name);
|
||||
fprintf(file,"\n arrow-w %s", ui->ArrowW.Name);
|
||||
fprintf(file,"\n arrow-sw %s", ui->ArrowSW.Name);
|
||||
fprintf(file,"\n arrow-s %s", ui->ArrowS.Name);
|
||||
fprintf(file,"\n arrow-se %s", ui->ArrowSE.Name);
|
||||
fprintf(file,")\n");
|
||||
|
||||
fprintf(file,"\n 'menu-panels '(");
|
||||
menupanel=ui->MenuPanels;
|
||||
while( menupanel ) {
|
||||
fprintf(file," (list \"%s\")\n",menupanel->Panel.File);
|
||||
fprintf(file,"\n %s \"%s\"",
|
||||
menupanel->Ident,menupanel->Panel.File);
|
||||
menupanel=menupanel->Next;
|
||||
}
|
||||
fprintf(file,")\n");
|
||||
|
||||
fprintf(file," (list \"%s\")\n",ui->VictoryBackground.File);
|
||||
fprintf(file," (list \"%s\")",ui->DefeatBackground.File);
|
||||
fprintf(file,"\n (list \"%s\")",ui->VictoryBackground.File);
|
||||
fprintf(file,"\n (list \"%s\")",ui->DefeatBackground.File);
|
||||
|
||||
fprintf(file," )\n\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue