I maybe made a mistake somehow.
gGui1 is not turn off after another gui appears after pressing a button.
Quote
gGui1.Visible = false;
gRestoreGame.Visible = true;
lstRestoreGamesList.FillSaveGameList();
mouse.UseModeGraphic(eModePointer);
gIconbar.Visible = false;
gGui1.Visible = true;
gGui1.Visible = true;
Remove that
Here's the offending line:
gGui1.Visible = false;
gRestoreGame.Visible = true;
lstRestoreGamesList.FillSaveGameList();
mouse.UseModeGraphic(eModePointer);
gIconbar.Visible = false;
gGui1.Visible = true; //HERE!!!!!!!
This should solve it. :) Using a find and replace for terms which MAY contradict a command which isn't working is often a good way to spot these
EDIT: Beaten by Icy :P
I got to it first but you gave more advice.
+10xp to the both off us ;)
Thank you guys.
Now I have another problem:
gGui1 has New game, Restore and Quit buttons.
By removing gGui1.Visible = true;, gGui1 won't show up if Restore gui is closed whitout restoring.
I solved my problem using variables
Quotefunction btnCancelRestore_OnClick(GUIControl *control, MouseButton button)
{
close_restore_game_dialog();
if (Begining == 0)
{
gGui1.Visible = true;
}
}
Don't forget to set Begining to 1 when clicking on New Game.