Author Topic: Default key (rebindable)?  (Read 3767 times)

Use a GuiMLTextCtrl to get that multi-line thing. Nothing pops out as wrong. I'll try to load up that gui and see if I get the same problem as you.

EDIT:
It appears to all be in how you structured your GUI. You just listed everything down. Your text lines are set to be clipped to the parent, which is correct, however the parent isn't properly defined.
Code: [Select]
« Last Edit: June 23, 2014, 01:00:22 PM by Thorfin25 »

All the controls supposed to be in your window are not in your window, and thus they don't move around with it.

All the controls supposed to be in your window are not in your window, and thus they don't move around with it.
how do i put them in my window?
i'm pretty new to GUIs

Use a GuiMLTextCtrl to get that multi-line thing. Nothing pops out as wrong. I'll try to load up that gui and see if I get the same problem as you.

EDIT:
It appears to all be in how you structured your GUI. You just listed everything down. Your text lines are set to be clipped to the parent, which is correct, however the parent isn't properly defined.
Code: [Select]
How do I properly define the parent?

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

   new GuiWindowCtrl() {
      profile = "BlockWindowProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "208 161";
      extent = "226 157";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "Could Not Bind";
      maxLength = "255";
      resizeWidth = "1";
      resizeHeight = "1";
      canMove = "0";
      canClose = "0";
      canMinimize = "0";
      canMaximize = "0";
      minSize = "50 50";

      new GuiMLTextCtrl() {
         profile = "GuiMLTextProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "10 46";
         extent = "206 42";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         lineSpacing = "2";
         allowColorChars = "0";
         maxChars = "-1";
         text = "The auto-clicker could not bind to F11. If you want to use the auto-clicker, you need to bind it yourself. Sorry about that!";
         maxBitmapHeight = "-1";
         selectable = "1";
         autoResize = "1";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "66 115";
         extent = "91 38";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         command = "canvas.popdialog(RebindGUI);";
         text = "OK";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button2";
         lockAspectRatio = "0";
         alignLeft = "0";
         alignTop = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
   };
};
//--- OBJECT WRITE END ---

It's just like normal scripts and all it's layering. You want them parented to the window itself, so they go right after it, within another {} layer.

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

   new GuiWindowCtrl() {
      profile = "BlockWindowProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "208 161";
      extent = "226 157";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "Could Not Bind";
      maxLength = "255";
      resizeWidth = "1";
      resizeHeight = "1";
      canMove = "0";
      canClose = "0";
      canMinimize = "0";
      canMaximize = "0";
      minSize = "50 50";

      new GuiMLTextCtrl() {
         profile = "GuiMLTextProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "10 46";
         extent = "206 42";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         lineSpacing = "2";
         allowColorChars = "0";
         maxChars = "-1";
         text = "The auto-clicker could not bind to F11. If you want to use the auto-clicker, you need to bind it yourself. Sorry about that!";
         maxBitmapHeight = "-1";
         selectable = "1";
         autoResize = "1";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "66 115";
         extent = "91 38";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         command = "canvas.popdialog(RebindGUI);";
         text = "OK";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button2";
         lockAspectRatio = "0";
         alignLeft = "0";
         alignTop = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
   };
};
//--- OBJECT WRITE END ---

It's just like normal scripts and all it's layering. You want them parented to the window itself, so they go right after it, within another {} layer.
When I tested this, it still wasn't centered.
Thoughts?

When I tested this, it still wasn't centered.
Thoughts?

Code: [Select]
   new GuiWindowCtrl() {
      profile = "BlockWindowProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      ...
   };

Still not set to "center", "center".

Code: [Select]
   new GuiWindowCtrl() {
      profile = "BlockWindowProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "208 161";
      extent = "226 157";
      minExtent = "8 2";

Yeah center it an position back to 0 0

The gui is centered. Take that out, and make the window ctrl centered.

Code: [Select]
   new GuiWindowCtrl() {
      profile = "BlockWindowProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "208 161";
      extent = "226 157";
      minExtent = "8 2";

Yeah center it an position back to 0 0
Thanks. That worked.