Game Development Community

GuiT2DObjectCtrl is possibly broken in B3

by Patrick Shaw · in Torque Game Builder · 05/29/2007 (12:37 pm) · 0 replies

Hi,
I created a guiT2DObjectCtrl from the gui editor and set the "SceneObject" field to "testObject". Here is the resulting gui file....

//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(gameTestGUi) {
   canSaveDynamicFields = "0";
   isContainer = "1";
   Profile = "GuiDefaultProfile";
   HorizSizing = "right";
   VertSizing = "bottom";
   Position = "0 0";
   Extent = "800 600";
   MinExtent = "8 2";
   canSave = "1";
   Visible = "1";
   hovertime = "1000";
  
   new guiT2DObjectCtrl(testControl) {
      canSaveDynamicFields = "0";
      Profile = "GuiDefaultProfile";
      HorizSizing = "right";
      VertSizing = "bottom";
      position = "0 0";
      Extent = "960 120";
      MinExtent = "8 2";
      canSave = "1";
      Visible = "1";
      hovertime = "1000";
      groupNum = "-1";
      buttonType = "RadioButton";
      useMouseEvents = "0";
      renderMargin = "0";
   };
};
//--- OBJECT WRITE END ---

Note that the "SceneObject" field is missing from the resulting gui file. When I load the file in my game, I get the following error:

game/gui/testGui.gui (0): Unable to instantiate non-conobject class guiT2DObjectCtrl.