Added normal and reverse font colors
This commit is contained in:
parent
849a381eb4
commit
e8096b2879
2 changed files with 24 additions and 11 deletions
|
@ -611,6 +611,23 @@ local SCM CclDefineUI(SCM list)
|
||||||
// Now the real values.
|
// 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
|
// Filler 1
|
||||||
temp=gh_car(list);
|
temp=gh_car(list);
|
||||||
list=gh_cdr(list);
|
list=gh_cdr(list);
|
||||||
|
|
|
@ -148,14 +148,6 @@ global void InitUserInterface(const char *race_name)
|
||||||
SetViewportMode(VIEWPORT_SINGLE);
|
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;
|
TheUI.ViewportCursorColor=ColorWhite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,8 +283,14 @@ local void SaveUi(FILE* file,const UI* ui)
|
||||||
int i;
|
int i;
|
||||||
MenuPanel* menupanel;
|
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);
|
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," ; Filler 1\n");
|
||||||
fprintf(file," (list \"%s\" %d %d)\n",
|
fprintf(file," (list \"%s\" %d %d)\n",
|
||||||
ui->Filler[0].File,ui->FillerX[0],ui->FillerY[0]);
|
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 ) {
|
for( i=0; UI_Table[i]; ++i ) {
|
||||||
ui=UI_Table[i];
|
ui=UI_Table[i];
|
||||||
// FIXME: not completely written
|
// FIXME: not completely written
|
||||||
free(ui->NormalFontColor);
|
|
||||||
free(ui->ReverseFontColor);
|
|
||||||
menupanel=ui->MenuPanels;
|
menupanel=ui->MenuPanels;
|
||||||
while( menupanel ) {
|
while( menupanel ) {
|
||||||
tmp=menupanel;
|
tmp=menupanel;
|
||||||
|
|
Loading…
Add table
Reference in a new issue