Game Development Community

Gui Bitmap Button Trouble

by Sventhors · in Game Design and Creative Issues · 02/12/2006 (10:44 am) · 4 replies

I have been trying to add an image to my button and I have been trying to search this forum but I cant find any help. I think I saw that gui bit map button was not working in 1.4. Is that true?

I found mostly old ones for 1.3. If working, could u use _h _n and so on?

I have gotten an image to show up when use GuiBitmap also, I have gotten Theora to work?

I have been making different format of buttons in Photoshop. like bmp, png, bmp.

is there a general guidline. Also, is there list of Commands besides the user guide.

Also, is there explantions of all the Gui choices in the New Control.

Thanks:)

#1
02/12/2006 (11:39 am)
I have gotten the GUI button to work fine in 1.4 let me tell you what i have learned

make your 4 button states

save the 4 button states

yourbutton_i.png
yourbutton_h.png
yourbutton_n.png
yourbutton_d.png

now what the _ means

h is for highlight
n is for normal
d is for down
i is for inactive

now when you add a guibitmapbutton control for the image to load, click the find button click on any of your button states for example

c:/torque/example/client/ui/yourbutton_n.png
now just go into that line and remove the _n.png

so it should read
c:/torque/example/client/ui/yourbutton

the control auto uses the refrence of that name to corrisponde to which picture to use in whatever state

when the button is just sitting there it knows to use the _n, when you put your mouse over it , it uses the _h
when you click the button it knows to use the _d, and lets say you using like a spell button and there is a recycle time to use it you can call the button to use the _i ( inactive) button. took me like 3 minutes to figure out how to just take off everything but the name itself in the bitmap area


hope this helps
#2
02/12/2006 (11:50 am)
Thanks Got I got it to work. Needed to make four states. Thanks:)
#3
02/12/2006 (11:57 am)
Thanks Got I got it to work. Needed to make four states. Thanks:)
#4
02/19/2006 (11:27 am)
Just out of curiousity, rather than using relative paths, will an absolute path work?