Game Development Community

GuiBitmapButtonCtrl.cc (inactive state ?)

by Gilles Jr Lafrance · in Torque Game Engine · 10/02/2003 (6:16 am) · 3 replies

If I understand this right, the guiBitmapButtonCtrl can have 4 textures :

button_n (Normal) ---> No mouse over
button_h (Hilight)---> Mouse over
button_d (Depressed)-> Button pressed
button_i (Inactive)-->

The one I don't understand is "Inactive"

Do this one can be use for say : The user don't have access to the next level, so the button can't be pressed (inactive state) until we give him access ?

If so, what is the command to set it so the button can't be pressed. Is there already something ready for this ?

Eric tryed to set the texture and it's working (it show the button_i) but the button is still active.

Any infos or tips will be appreciated :) Thanks !

Gilles Jr

#1
10/02/2003 (6:37 am)
Sounds about right; the inactive could be a grayed out image of your button, thus indicating not available.

-Ron
#2
10/02/2003 (6:47 am)
Thanks Ron,

But do you know how we can make it "unpushable" when in inactive state ? Actually, the button is greyed out, but it is still pressable. Just not sure if it's already in the engine or we have to do it :)

Thanks.

Gilles Jr
#3
11/04/2003 (3:21 pm)
I just fell on this thread. To make a follow-up, the command is:

To make the control (in this case, a button) inactive: (it will load the _i bitmap and won't be possible to use the button)
yourGuiControl.setActive(false);

To make it active is the same thing, just make it true.

If that helps anyone :-)