GUI over walkable area

Started by Reven, Tue 14/03/2006 19:21:37

Previous topic - Next topic

Peder 🚀

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.

Khris

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.

Peder 🚀

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.

monkey0506

It's interface_click and GUIControl.GetAtScreenXY (if this is null, then there is no GUIControl at the coordinates).

Ashen

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(..).
I know what you're thinking ... Don't think that.

monkey0506

Hmm...while the topic is hot and I'm curious (the manual entry 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?

Peder 🚀

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 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..

SMF spam blocked by CleanTalk