Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ghostlady on Sat 05/07/2025 21:25:46

Title: Hotspot Gui Text Overlaying a Speech Gui
Post by: Ghostlady on Sat 05/07/2025 21:25:46
I am seeing Hotspot Text sitting on top of a Speech Gui.  If I move the mouse off of the hotspot, it goes away.  How do I stop this from happening?

(https://mysterymanor.net/junk/Hotspot_Gui.png)
Title: Re: Hotspot Gui Text Overlaying a Speech Gui
Post by: eri0o on Sat 05/07/2025 23:08:58
You can change the ZOrder of one so that you can have the order you want.
Title: Re: Hotspot Gui Text Overlaying a Speech Gui
Post by: Ghostlady on Sun 06/07/2025 00:42:52
Currently, the speech gui is sitting at 6 and the overlayhotspot gui is sitting at 9. But both are showing at the same time.
Title: Re: Hotspot Gui Text Overlaying a Speech Gui
Post by: eri0o on Sun 06/07/2025 18:17:06
Visibility is controlled by the Visible property.

The order on screen is controlled by ZOrder - like a "Z axis". The biggest ZOrder puts the thing in front and the next big one behind this one and so on until the lowest value ZOrder on the GUI layer gets drawn.
Title: Re: Hotspot Gui Text Overlaying a Speech Gui
Post by: Ghostlady on Sun 06/07/2025 18:49:55
I made the speech gui a higher number and that worked.  I was thinking it worked in the reverse order. Thank you very much for your help.
Title: Re: Hotspot Gui Text Overlaying a Speech Gui
Post by: Crimson Wizard on Sun 06/07/2025 18:52:26
I don't know how your speech is done (and I cannot see your screenshot, it does not load for me for some reason).
But if yours is a normal blocking speech, then I believe that the common approach is to set hotspot label as not visible when the blocking action is performed.

In a most primitive way this may be done like:
Code (ags) Select
function repeatedly_execute_always()
{
    gHotspotDescription.Visible = IsInterfaceEnabled();
}

EDIT: There's a global settings that hides GUI when the interface is disabled, but unfortunately there is no per-GUI setting like that, so it has to be done in script...
Title: Re: Hotspot Gui Text Overlaying a Speech Gui
Post by: Ghostlady on Tue 08/07/2025 16:26:32
Thank you, this will help.