Author Topic: First GUI Problems.  (Read 4393 times)

Ok i made a GUI bla bla bla....

But when i test it and press the keyblind for it, nothing happens.


I made it from useing the tutorial at http://forum.blockland.us/index.php?topic=67198.msg1122571#msg1122571.

Heres console.log.

Could you upload the gui?

Ok, il upload it.

Oh wait, Blockland cant upload .zip files.

noedit:Sorry for long reply, i was watching part of a movie.


Be an uber nerd and change the zip's extension to .txt and upload here. I'll take a look at it.

change the zip's extension to .txt and upload here. I'll take a look at it.
Would it do something to the things inside it?


Be an uber nerd
Ugh....

Would it do something to the things inside it?
No. Just do it and add it as attachment.

Ok, Here it is.
Oh god, how to make it into txt?
wait, can i upload the things INSIDE the .zip?

Gah. I knew you wouldn't be able to do it. If you can't figure it out, not my problem. I'm too lazy to explain how it works.

Heres what the .zip folder has.

Client.cs
Description.txt
Testgui.gui

And the things inside them

Client.cs:

exec("./Testgui.gui");
moveMap.bind(keyboard, "\", pushTestgui);

function testcommand()
{
   MessageBoxOK("Thanks!","You have just pressed a button on a test GUI!");
}

Description.txt:

Name: TestGui
Author: K3k0m@n
K3's first Gui!

Testgui.gui:
   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 = "151 43";
      extent = "352 340";
      minExtent = "8 2";
      visible = "1";
      command = "canvas.popdialog(TestGui);";
      accelerator = "escape";
      text = "TestGui";
      maxLength = "255";
      resizeWidth = "1";
      resizeHeight = "1";
      canMove = "1";
      canClose = "1";
      canMinimize = "1";
      canMaximize = "1";
      minSize = "50 50";
      closeCommand = "canvas.popdialog(TestGui);";

      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "top";
         position = "82 172";
         extent = "166 48";
         minExtent = "8 2";
         visible = "1";
         command = "Testcommand();";
         text = "Hai";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "0 230 190 255";
      };
   };
};
//--- OBJECT WRITE END ---
function pushtestgui(%Gui)
{
   %Gui - canvas.pushdialog(TestGui);
}

Thats what i got, any problems?

wouldn't this belong in one of the modding help sections?

wouldn't this belong in one of the modding help sections?
Lol, i fogot about the modding help, anyway this hasnt been moved anyway, so...


exec("./Testgui.gui");
moveMap.bind(keyboard, "\", pushTestgui);
\ is the string escape character. Try using something else.