Game Development Community

Problems with GuiBitmapButtonCtrl

by Owen Ortmayer · in Torque Game Engine · 12/19/2003 (11:35 am) · 3 replies

Anyone else had problems with GuiBitmapButtonCtrl in the latest version.

Here's the button code
new GuiBitmapButtonCtrl() {
      profile = "GuiButtonProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "79 91";
      extent = "140 30";
      minExtent = "8 2";
      visible = "1";
      text = "StartMission";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "starter.fps/LAAP/startMission_button.png";
   };


and it gives these warnings

Set::getObject index out of range.
Could not locate texture: starter.fps/LAAP/startMissionButton.png_n
Could not locate texture: starter.fps/LAAP/startMissionButton.png_h
Could not locate texture: starter.fps/LAAP/startMissionButton.png_d
Could not locate texture: starter.fps/LAAP/startMissionButton.png_i


now if I try the same image with a GuiBitmapCtrl it loads in just fine. Wanted to see if anyone else has had problems or if I'm just missing something?

#1
12/19/2003 (11:43 am)
No problem :) just take your startMission_button.png and rename it to startMission_button_n.png and then copy it to startMission_button_h.png, startMission_button_i.png and startMission_button_d.png and all should be fine.

The new control has the ability to use 3 buttons
_n - Normal
_d - depressed
_h - Hightlight
_i - inactive

The only button that I recall being required is the _n one.

-Ron
#2
12/19/2003 (11:44 am)
Ahh I see. Thanks
#3
12/19/2003 (2:08 pm)
Also, you should not include the extention in the gui constructor.

bitmap = "starter.fps/LAAP/startMission_button";

Should look that way.