Use an array in a GuiBitmapButton?
by Mikael Pettersson · in Game Design and Creative Issues · 06/14/2008 (4:02 pm) · 4 replies
How do i make a GuiBitmapButton that use an array for the different stages?
Im building a Main menu where i need a specific image for every stage and button ... so i placed everyone in a array file. Now ... i need to figure out how to make it in to 5 buttons with 4 stages; normal, hover, pressed and inactive.
i have been checking up on the T3d Demo, specificly the scripts located in "common/unifiedShell" trying to figure out how to specify the coordinates for the different stages and buttons.
Iv previously used arrays in CSS/HTML driven websites ... so i'm not totaly new to the tech. I'm just new to TorqueScript.
Thank you in advance for any help
Best regards
Mikael Pettersson
Im building a Main menu where i need a specific image for every stage and button ... so i placed everyone in a array file. Now ... i need to figure out how to make it in to 5 buttons with 4 stages; normal, hover, pressed and inactive.
i have been checking up on the T3d Demo, specificly the scripts located in "common/unifiedShell" trying to figure out how to specify the coordinates for the different stages and buttons.
Iv previously used arrays in CSS/HTML driven websites ... so i'm not totaly new to the tech. I'm just new to TorqueScript.
Thank you in advance for any help
Best regards
Mikael Pettersson
About the author
Web and interface design consultant.
#2
08/08/2008 (8:47 am)
Yea I know ... but I want a more neat solution though.
#3
08/08/2008 (8:54 am)
What would you call "more neat"?
#4
any way ... a solution where i have the different stages in a singel image file ... i just need to figure out how to switch them .... it's how you make animations in TGB so should be possible in TGEA.
10/07/2008 (12:04 pm)
Ops ... totaly missed this thread ... any way ... a solution where i have the different stages in a singel image file ... i just need to figure out how to switch them .... it's how you make animations in TGB so should be possible in TGEA.
Sailendu Behera
yourButtonName_n for normal stage (_n is not necessary in some versions of torque, it is taken as normal)
yourButtonName_h for hover stage
yourButtonName_d for pressed stage
yourButtonName_i for inactive stage
and in the bitmap field in your button datablock, give the path to yourButtonName without the _n type things. Hope this help. Tell if you have any more problems.
:)