Game Development Community

Push new Gui to front but still Control PlayGui?

by Steve Acaster · in Torque 3D Professional · 08/16/2010 (2:56 pm) · 2 replies

I'm not terribly up on GUIs ... amongst many things! ;) ... and was wondering if there was a way in-game to push a GUI dialog to the front, but retain the control over the underneath PlayGui.

So a new gui would overlay the playgui, but the player would still have mouse control of the playgui and thus the player.

I checked the chm but didn't see anything that appeared to help ... (or if it did I damn well didn't understand it ...)

#1
08/16/2010 (3:13 pm)
Yes, it's possible, if noCursor=1 on the gui you're pushing on top.

I don't have the code in front of me, but every time you push a gui on top, the script checks all the guis on the screen to find out if they all have noCursor=1, if one doesn't, then the cursor is shown, otherwise, the cursor is hidden, and the input is processed through the movemap bindings.
#2
08/16/2010 (3:35 pm)
Doh! I'd tried that ... but used it as a function instead of a variable!

Sticking noCursor in as a variable of the Gui works as desired.

Thanks, Tim. :)