Gui not turn off [solved]

Started by Volcan, Sat 10/11/2012 03:36:47

Previous topic - Next topic

Volcan

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;

Icey

gGui1.Visible = true;

Remove that

geork

Here's the offending line:
Code: AGS
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

Icey

I got to it first but you gave more advice.

+10xp to the both off us ;)

Volcan

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.

Volcan

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.

SMF spam blocked by CleanTalk