use correct background for showstats

This commit is contained in:
nehalmistry 2003-03-20 18:57:49 +00:00
parent 29394056af
commit 94faf0d81d
3 changed files with 26 additions and 1 deletions

View file

@ -1251,7 +1251,11 @@ global void ShowStats(void)
callbacks.NetworkEvent=NetworkEvent;
callbacks.SoundReady=WriteSound;
background=LoadGraphic(MenuBackground);
if (GameResult==GameVictory) {
background=LoadGraphic(TheUI.VictoryBackground.File);
} else {
background=LoadGraphic(TheUI.DefeatBackground.File);
}
ResizeGraphic(background,VideoWidth,VideoHeight);
#ifdef USE_OPENGL
MakeTexture(background,background->Width,background->Height);

View file

@ -303,6 +303,9 @@ typedef struct _ui_ {
GraphicConfig Menue2Panel; /// Panel 384 x 256
GraphicConfig VictoryPanel; /// Panel 288 x 128
GraphicConfig ScenarioPanel; /// Panel 352 x 352
GraphicConfig VictoryBackground;
GraphicConfig DefeatBackground;
} UI;
/*----------------------------------------------------------------------------

View file

@ -1225,6 +1225,24 @@ local SCM CclDefineUI(SCM list)
free(ui->ScenarioPanel.File);
ui->ScenarioPanel.File=str;
temp=gh_car(list);
list=gh_cdr(list);
value=gh_car(temp);
temp=gh_cdr(temp);
str=gh_scm2newstr(value,NULL);
free(ui->VictoryBackground.File);
ui->VictoryBackground.File=str;
temp=gh_car(list);
list=gh_cdr(list);
value=gh_car(temp);
temp=gh_cdr(temp);
str=gh_scm2newstr(value,NULL);
free(ui->DefeatBackground.File);
ui->DefeatBackground.File=str;
return SCM_UNSPECIFIED;
}