use correct background for showstats
This commit is contained in:
parent
29394056af
commit
94faf0d81d
3 changed files with 26 additions and 1 deletions
src
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue