Poll

Did you find this helpful?

Yes
No

Author Topic: [Tutorial] Making a Gui  (Read 44838 times)

This was very useful. I do think that someone should put a list of all the controls and what they do.


EDIT: What do both the GUIPlayerView and the GUIObjectView controls do?
« Last Edit: May 31, 2009, 12:30:35 PM by Steemer »

Well, I'm pretty sure the player view is like when you're playing in game, you can see the world, it's basically the in-game screen ("as in the Play Gui"). And you know the minifig you see when you open up your Avatar options? That is an object view. It allows you to see an object (Obviously).

UPDATE: I have found a book and a wiki page that contains a lot of information not only on GUI's but on Torque in General. Here is the book (it's only a preview so you can't view all of it) It goes through all of the GUI controls and how to use them. And there's the Wiki page, it has a lot on GUI's as well. Hope this helps you all, I find the rest of that book to be useful as well.

UPDATE: I have found a book and a wiki page that contains a lot of information not only on GUI's but on Torque in General. Here is the book (it's only a preview so you can't view all of it) It goes through all of the GUI controls and how to use them. And there's the Wiki page, it has a lot on GUI's as well. Hope this helps you all, I find the rest of that book to be useful as well.

Those will be useful, thanks.




With the coming of Blockland v12, Badspot has granted us the use oif the GUI Animated Bitmap control, due to his need of it for the Ghosting thing at the bottom. I don't know much about this new thing, but you can explore it's properties if you want.

I don't get the message though.....


Code: [Select]
//--- OBJECT WRITE BEGIN ---
new GuiControl(Joincit) {
   profile = "GuiDefaultProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   position = "0 0";
   extent = "640 480";
   minExtent = "8 2";
   visible = "1";

   new GuiWindowCtrl() {
      profile = "GuiWindowProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "112 184";
      extent = "96 98";
      minExtent = "8 2";
      visible = "1";
      maxLength = "255";
      resizeWidth = "1";
      resizeHeight = "1";
      canMove = "1";
      canClose = "1";
      canMinimize = "1";
      canMaximize = "1";
      minSize = "50 50";

      new GuiBitmapButtonCtrl() {
         profile = "GuiDefaultProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "17 46";
         extent = "60 28";
         minExtent = "8 2";
         visible = "1";
         text = "    Join us!";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
   };
};
//--- OBJECT WRITE END ---
function pushtestgui(%Gui)
{
   %Gui = canvas.pushDialog(Joincit);
}



You never set a command for the button. On the GUI creator screen, there's a field called "Command" you fill that in with a command, for example:

testbutton();

That could be your command and then you would put this in the client.cs:
Code: [Select]
function testbutton()
{
   messageboxOk("Test","Thanks for pushing the test GUI button!");
}
Or something like that. Re-read the creating part of the Tutorial, I haven't read through this in a while.

I should prolly bump this shouldn't I?


I get an error. Any help with this? I checked the console for any errors, but it executed fine.

EDIT: Never mind, I appeared that there was a mix up with this other GUI. it works now.
« Last Edit: July 23, 2009, 12:57:12 PM by No2mad2 »

What did you do, show me the code.