Setting guiBitmapButtonControl to inactive?
by Simon Jensen · in Torque Game Builder · 01/18/2007 (10:34 pm) · 4 replies
How do I tell my button to use it's inactive state?
#2
01/19/2007 (5:19 am)
Hrmm. well that just seems to hide my entire gui. What I'm looking for is making the button use the _i (inactive) image and turn off the 'on hover' image.
#3
[code]
new GuiBitmapButtonCtrl (MonkeyButton) {
...
};
[code]
I could call MonkeyButton.setActive (false), and its _i image will appear.
01/19/2007 (7:54 am)
If calling setActive(false) on your button is making it dissappear, it sounds like it's not set up correctly. Assuming that I have a button made up of monkey_n.png, monkey_h.png, monkey_d.png and monkey_i.png, I would reference it as something like "~/data/buttons/monkey". No extension, no underscore anything. If it can't find any of the files, it will warn you in the console. Now assume I defined the button like this:[code]
new GuiBitmapButtonCtrl (MonkeyButton) {
...
};
[code]
I could call MonkeyButton.setActive (false), and its _i image will appear.
#4
[Edit / update]
I must have been tired and/or doing something stupid.
It works just fine now. Thanks again.
01/19/2007 (8:16 am)
Yeah that's pretty much how I've got the gui set up. The down and hover images are working just fine. I'll check the console to see if it cant fint the _i images. new GuiControl (MainMenuContainer){
...
new GuiBitmapBittonCtrl(MainMenuButtonOne){
...
};
new GuiBitmapBittonCtrl(MainMenuButtonTwo){
...
};
};Then when I called MainMenuButtonOne.setActive(false) the entire MainMenuContainer hid.[Edit / update]
I must have been tired and/or doing something stupid.
It works just fine now. Thanks again.
Torque 3D Owner Richard McKinney
Default Studio Name