[Question] About GUI functionality
by St. · in Torque Game Engine Advanced · 04/15/2009 (12:55 pm) · 6 replies
I've decided to add some complex GUIs to my game and stumbled upon a fairly shameful problem of not knowing how some things work.
1) I've added an in-game window (a separate .gui) that's being opened upon pressing a button (a simple toggle function,
, but while it is open I can only "operate" on that window and can not click on anything else (e.g. on Spellbank's icons from the AFX demo). Is it possible to have that separate GUI and not "block all" other GUI "layers"?
2) Is there any other materials/guides/tutorials on GUI creation other than the basic one in the documentation (e.g. with different misc topics explained like my first question)? I haven't found anything similar on the forums and TDN didn't help me as well.
1) I've added an in-game window (a separate .gui) that's being opened upon pressing a button (a simple toggle function,
if (%this.isAwake()){
Canvas.popDialog(%this);
}else{
Canvas.pushDialog(%this);
}), but while it is open I can only "operate" on that window and can not click on anything else (e.g. on Spellbank's icons from the AFX demo). Is it possible to have that separate GUI and not "block all" other GUI "layers"?
2) Is there any other materials/guides/tutorials on GUI creation other than the basic one in the documentation (e.g. with different misc topics explained like my first question)? I haven't found anything similar on the forums and TDN didn't help me as well.
About the author
#2
That's the "Modeless" profile, which can be "clicked-through".
04/15/2009 (1:53 pm)
You can set the profile field on GUI (which used as container for your window) to be "GuiModelessDialogProfile".That's the "Modeless" profile, which can be "clicked-through".
#3
Yes, that's the current "hack" I'm using, but I can't say that I like it as I don't want every single window to be implemented in one file.
To Fyodor "bank" Osokin:
Thanks, I'll try that! ;)
But will I be able to click on that window's elements? E.g. if it's another spellbank and I'm trying to trigger its spells.
04/15/2009 (2:07 pm)
To Jaimi McEntire:Yes, that's the current "hack" I'm using, but I can't say that I like it as I don't want every single window to be implemented in one file.
To Fyodor "bank" Osokin:
Thanks, I'll try that! ;)
But will I be able to click on that window's elements? E.g. if it's another spellbank and I'm trying to trigger its spells.
#4
04/15/2009 (2:43 pm)
You need to have a look at the profiles as Fyodor mentions and use one that is not set as Modal
#5
04/16/2009 (2:04 pm)
The GuiModelessDialogProfile profile makes only the GUI element using it click-through, the children remains clickable. So you use it on your GUI root GuiCtrl, and it'll allow clicks on the other gui layers bellow it, while your windows will still be clickable.
#6
Thanks a lot! ;) That's exactly what I needed.
04/17/2009 (1:16 am)
Just managed to get my hands on it and GuiModelessDialogProfile works indeed!Thanks a lot! ;) That's exactly what I needed.
Associate Jaimi McEntire
King of Flapjacks