Game Development Community

Inactive button(solved)

by Nir Ziso · in Torque Game Builder · 10/31/2006 (8:10 am) · 3 replies

I use guiBitmapButtonCtrl and put 4 images like this

pic_i
pic_h
pic_n
pic_d

sometimes i want this picture to became disable the option is pic_i inactive
when i set the image this image like this:

%temppic.bitmap="~/Data/images/pic_i";

but then i get this message on the console:

Could not locate texture: somefolder/Data/images/pic_h
Could not locate texture: somefolder/Data/images/pic_d
Could not locate texture: somefolder/Data/images/pic_n

why?

i there is away to set the inactive option pic_i in another way?

#1
10/31/2006 (8:20 am)
While I haven't played with TGB a whole lot I would think it would be the same as TGE and TSE, someone correct if I'm wrong.

When you set the bitmap of a button you leave off the state portion of the name.

So it would look like this:
%temppic.bitmap = "~/Data/image/pic";

Then if you want that button to become inactive you just set it's state to inactive and it will display the correct image. Like so:

YourButtonGuiControl.setActive(false);
#2
10/31/2006 (8:32 am)
It was my understanding that you should set the bitmap to 'pic', not to pic_h or pic_d.
Then you do something like %temppic.bitmap.setActive(false);
Here is a post from the TGE forums, if you can access it.
www.garagegames.com/mg/forums/result.thread.php?qt=13131
#3
10/31/2006 (12:14 pm)
Scott and daniel thanke alot for your help!!!