Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Peder 🚀 on Tue 14/03/2006 19:21:37

Title: GUI over walkable area
Post by: Peder 🚀 on Tue 14/03/2006 19:21:37
Hi,

My main gui that is on all the time is sometimes over walkable areas, is there any way of still being able to walk on those places?
the GUI grapichs is not over the walkable areas
cause my GUI looks a bit like this:

-------
####\
#####\_____________________________
#############################|
#############################!

would the easiest way be to just split it in two and use two GUIs instead??

thanks.
Title: Re: GUI over walkable area
Post by: Khris on Tue 14/03/2006 20:03:21
Are you using the on_interface_click?
If you do, check if the player has actually clicked on a button (GUIObject.GetAtScreenXY(mouse.x, mouse.y)==null, I believe) and call ProcessClick(mouse.x, mouse.y, mouse.Mode); if he didn't, since this ignores GUIs.
Title: Re: GUI over walkable area
Post by: Peder 🚀 on Tue 14/03/2006 20:27:22
Quote from: KhrisMUC on Tue 14/03/2006 20:03:21
Are you using the on_interface_click?
If you do, check if the player has actually clicked on a button (GUIObject.GetAtScreenXY(mouse.x, mouse.y)==null, I believe) and call ProcessClick(mouse.x, mouse.y, mouse.Mode); if he didn't, since this ignores GUIs.

no I dont use that...
thanks Ill try out that.
Title: Re: GUI over walkable area
Post by: monkey0506 on Tue 14/03/2006 22:07:42
It's interface_click and GUIControl.GetAtScreenXY (if this is null, then there is no GUIControl at the coordinates).
Title: Re: GUI over walkable area
Post by: Ashen on Tue 14/03/2006 23:19:47
You can also give GUIs their own control functions (like you can the individual Buttons, etc), which are called when the mouse is clicked on the GUI, but not on any Control.
That might be easier than messing about with interface_click and GUIControl.GetAtScreenXY(..).
Title: Re: GUI over walkable area
Post by: monkey0506 on Tue 14/03/2006 23:39:57
Hmm...while the topic is hot and I'm curious (the manual entry (http://www.adventuregamestudio.co.uk/manual/GUI.Clickable.htm) is a bit unclear)...does setting a GUI's clickable property (GUI.Clickable) affect it's GUIControls?  i.e., if a GUI is not clickable, can you still click on clickable controls?
Title: Re: GUI over walkable area
Post by: Peder 🚀 on Tue 14/03/2006 23:58:11
Quote from: monkey_05_06 on Tue 14/03/2006 23:39:57
Hmm...while the topic is hot and I'm curious (the manual entry (http://www.adventuregamestudio.co.uk/manual/GUI.Clickable.htm) is a bit unclear)...does setting a GUI's clickable property (GUI.Clickable) affect it's GUIControls?Ã,  i.e., if a GUI is not clickable, can you still click on clickable controls?

I tested that out and it doesnt work..