MyButtonBitmap_n.png" (_h,_d & _i)
by Norv Brooks · in Torque Game Engine · 01/27/2006 (10:57 am) · 8 replies
In making my own bitmaps for GuiButtons, I found that you needed different versions for the different states of the button. I figuered out all but one version. The "_n" is "normal", "_h" is "highlighted", "_d" is "depressed", but what is "_I"?
Thanks for anyone's help.
Norv
Thanks for anyone's help.
Norv
About the author
#2
i'm not sure how to activate/inactivate a button tho.
01/27/2006 (11:00 am)
I've always assumed it's 'inactive'.i'm not sure how to activate/inactivate a button tho.
#3
01/31/2006 (7:36 pm)
It's not parrticularly something used often. I can't say I've ever used it.
#4
02/01/2006 (7:27 am)
Philip - just for the record, you may have used it without knowing. If you use GuiBitmapButtonCtrl, it looks for four bitmaps when it loads. If you don't have all four, "bitmap_n.png", "bitmap_h.png", "bitmap_d.png" & "bitmap_i".png, your code will probably still work, but in the Console Log you'll find statements that those files could not be found.
#5
.setActive(false); // makes the button inactive and uses the _i.png version
or
.setActive(true); // makes the button active
02/01/2006 (7:48 am)
To activitate or deactivate a button (inactive) use or
#6
02/01/2006 (9:16 am)
Good to know, thanks steve.
#7
Lore uses it to make the Launch button inactive while the host is still changing settings (and the mission isn't running yet) You can also use it to make buttons inactive in a demo version, so that they can still see what a full version has but cant access it. Let them wonder whats behind door number 3 as it were. Also can help you from having to design a seperate UI for a future demo version.
May not seem like a big deal now, but when your boss tells you that you need a demo in 2 days, I suggest remembering this post :)
02/01/2006 (9:56 am)
Its the kind of thing that becomes useful when you have a UI shared between people with full or limited access.Lore uses it to make the Launch button inactive while the host is still changing settings (and the mission isn't running yet) You can also use it to make buttons inactive in a demo version, so that they can still see what a full version has but cant access it. Let them wonder whats behind door number 3 as it were. Also can help you from having to design a seperate UI for a future demo version.
May not seem like a big deal now, but when your boss tells you that you need a demo in 2 days, I suggest remembering this post :)
#8
Norv
02/01/2006 (11:53 am)
Orion & Steve - thanks to both of you for the info. I do believe it will be useful.Norv
Torque Owner Norv Brooks