Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ghostlady on Wed 11/03/2009 00:17:08

Title: Save Load Quit Gui showing hotspots behind it
Post by: Ghostlady on Wed 11/03/2009 00:17:08
My gui that pops up for the save/load/quit etc. catches hotspots behind it and changes the cursor.  Is there anyway around this?
Title: Re: Save Load Quit Gui showing hotspots behind it
Post by: Ultra Magnus on Wed 11/03/2009 00:35:13
If you mean actually beneath (through) the Gui, simply put if (GUI.GetAtScreenXY(mouse.x, mouse.y)==null) in your cursor switching code.

If you mean anywhere on the screen when the Gui's open, then make a custom bool variable called something like isguiopen, then put if (isguiopen==false) in your cursor switching code, isguiopen=true in the code when you open the Guis and isguiopen=false when you close them.

At least, that's how I does it.
Title: Re: Save Load Quit Gui showing hotspots behind it
Post by: Ghostlady on Wed 11/03/2009 00:42:40
I mean beneath.  I'll try your suggestion.
Title: Re: Save Load Quit Gui showing hotspots behind it
Post by: Khris on Wed 11/03/2009 00:47:50
Just like the Default game's built-in panel, change the GUI's Visibility to "Pause game when shown".
Title: Re: Save Load Quit Gui showing hotspots behind it
Post by: Ghostlady on Wed 11/03/2009 00:54:35
It is set to that in the gui properties.  That's why I was somewhat surprised that the hotspots were showing up in the gui.
Title: Re: Save Load Quit Gui showing hotspots behind it
Post by: Khris on Wed 11/03/2009 01:00:41
In this case, are you using rep_ex_always to change the cursor mode over a hotspot?
Title: Re: Save Load Quit Gui showing hotspots behind it
Post by: Ghostlady on Wed 11/03/2009 01:04:53
I am using this in the rep_ex:

  if (GetLocationType(mouse.x,mouse.y) > 0) {
     if(Mouse.Mode!=eModeUseinv) mouse.UseModeGraphic(eModePointer);}
  else {
     Mouse.UseDefaultGraphic(); }