Added normal and reverse font colors

This commit is contained in:
jsalmon3 2003-05-08 19:47:50 +00:00
parent 849a381eb4
commit e8096b2879
2 changed files with 24 additions and 11 deletions

View file

@ -611,6 +611,23 @@ local SCM CclDefineUI(SCM list)
// Now the real values.
//
value=gh_car(list);
list=gh_cdr(list);
if( gh_eq_p(value,gh_symbol2scm("normal-font-color")) ) {
value=gh_car(list);
list=gh_cdr(list);
free(ui->NormalFontColor);
ui->NormalFontColor=gh_scm2newstr(value,NULL);
}
value=gh_car(list);
list=gh_cdr(list);
if( gh_eq_p(value,gh_symbol2scm("reverse-font-color")) ) {
value=gh_car(list);
list=gh_cdr(list);
free(ui->ReverseFontColor);
ui->ReverseFontColor=gh_scm2newstr(value,NULL);
}
// Filler 1
temp=gh_car(list);
list=gh_cdr(list);

View file

@ -148,14 +148,6 @@ global void InitUserInterface(const char *race_name)
SetViewportMode(VIEWPORT_SINGLE);
}
// FIXME: Can be removed after new config is working
if( !strcmp(race_name,"human") || !strcmp(race_name,"alliance") ) {
TheUI.NormalFontColor=strdup(FontWhite);
TheUI.ReverseFontColor=strdup(FontYellow);
} else {
TheUI.NormalFontColor=strdup(FontYellow);
TheUI.ReverseFontColor=strdup(FontWhite);
}
TheUI.ViewportCursorColor=ColorWhite;
}
@ -291,8 +283,14 @@ local void SaveUi(FILE* file,const UI* ui)
int i;
MenuPanel* menupanel;
fprintf(file,"(define-ui '%s %d %d\t; Selector\n",
fprintf(file,"(define-ui '%s %d %d\t; Selector",
ui->Name,ui->Width,ui->Height);
fprintf(file,"\n 'normal-font-color '%s"
"\n 'reverse-font-color '%s",
ui->NormalFontColor, ui->ReverseFontColor);
fprintf(file,"\n");
fprintf(file," ; Filler 1\n");
fprintf(file," (list \"%s\" %d %d)\n",
ui->Filler[0].File,ui->FillerX[0],ui->FillerY[0]);
@ -493,8 +491,6 @@ global void CleanUserInterface(void)
for( i=0; UI_Table[i]; ++i ) {
ui=UI_Table[i];
// FIXME: not completely written
free(ui->NormalFontColor);
free(ui->ReverseFontColor);
menupanel=ui->MenuPanels;
while( menupanel ) {
tmp=menupanel;