Game Development Community

1.1.2 Mac GuiChunkedBitmapCtrl - mainScreenGui

by Carpenter Software · in Torque Game Builder · 01/09/2007 (10:52 pm) · 2 replies

There is a Discrepancy - Torque Game Builder - Whack-A-Mole Tutorial Part 4.

The tutorial says the following:
"Run TGB and press F10. Select mainScreenGui from the dropdown menu in the middle (as shown in Figure 4.1).... In the tree view to the right you can see that mainScreenGui consists of a GuiChunkedBitmapCtrl and a t2dSceneWindow contained in it. Select the GuiChunkedBitmapCtrl by clicking on it in the tree view. "

After I select "New Project" and use GUI build... and select mainScreenGui under the middle menu as instructed above - I get the following: GuiControl - mainScreenGui but I should get is this: GuiChunkedBitmapCtrl - mainScreenGui.

The tutorial above does not explain how to fix this problem unless I am missing something...

Is there a work around for this?

Thanks Carpenter Software.

#1
01/10/2007 (8:41 am)
I am looking at the file in the folder tools/projectWizard/templates/notools/gui/mainScreen.gui
and also tools/projectWizard/templates/base/gui/mainScreen.gui

I believe the problem with GuiControl - mainScreenGui is coming from these files...see below:

//--- OBJECT WRITE BEGIN ---
new GuiControl(mainScreenGui) {
   canSaveDynamicFields = "0";
   Profile = "GuiBlackContentProfile";
   HorizSizing = "width";
   VertSizing = "height";
   Position = "0 0";
   Extent = "1024 768";
   MinExtent = "8 8";
   canSave = "1";
   Visible = "1";
   useVariable = "0";

   new t2dSceneWindow(sceneWindow2D) {
      canSaveDynamicFields = "0";
      Profile = "GuiContentProfile";
      HorizSizing = "width";
      VertSizing = "height";
      Position = "0 0";
      Extent = "1024 768";
      MinExtent = "8 8";
      canSave = "1";
      Visible = "1";
      lockMouse = "0";
      useWindowMouseEvents = "1";
      useObjectMouseEvents = "0";
   };
};
//--- OBJECT WRITE END ---

I found the one that has the correct file in the folder tools/projectWizard/templates/Fish/gui/mainScreen.gui

//--- OBJECT WRITE BEGIN ---
new GuiChunkedBitmapCtrl(mainScreenGui) {
   canSaveDynamicFields = "0";
   Profile = "GuiContentProfile";
   HorizSizing = "width";
   VertSizing = "height";
   Position = "0 0";
   Extent = "1024 768";
   MinExtent = "8 8";
   canSave = "1";
   Visible = "1";
   bitmap = "~/data/images/logoblack";
   useVariable = "0";
   tile = "0";

   new t2dSceneWindow(sceneWindow2D) {
      canSaveDynamicFields = "0";
      Profile = "GuiContentProfile";
      HorizSizing = "width";
      VertSizing = "height";
      Position = "0 0";
      Extent = "1024 768";
      MinExtent = "8 8";
      canSave = "1";
      Visible = "1";
      lockMouse = "0";
      useWindowMouseEvents = "1";
      useObjectMouseEvents = "0";
   };
};
//--- OBJECT WRITE END ---

edited:
The work around:
(1) Copy the "base" folder and rename the new template as "Mole". The folder is located at "tools/projectWizard/templates/base/".
(2) Copy the mainScreen.gui from "gui" folder from the "Fish" template and paste it into the "gui" folder in the Mole template.
(3) Create a New Project using the Mole Template as your Project Template.
(4) This should correct the discrepancy above.

Have fun Torque-ing

Thanks Carpenter Software
#2
01/11/2007 (6:26 pm)
I finished Whack-A-Mole tutorial. No other problem encountered except the one listed above. This tutorial shows some important features that shows how to manage mouse events and cursors.

Thanks