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

I know you figured this out already but you might find this useful: http://forum.blockland.us/index.php?topic=182190.0

You can automatically have the engine center the GUI. While in the GUI editor (I'm assuming this is what you used), put "center" for horizSizing and vertSizing. There's no need for using the getWord(getRes() blah blah blah thing.
When I do it, the text and button stay in the same place.

When I do it, the text and button stay in the same place.
Make it centered, using the vertSizing and horizSizing, then hit f10 to make the gui come up, then hit f10 again to go back into the editor. It should be centered now.

Make it centered, using the vertSizing and horizSizing, then hit f10 to make the gui come up, then hit f10 again to go back into the editor. It should be centered now.
every single thing, or just the background. i'm confused.
it puts the text in one line of garbled mess, and sticks the button over it
« Last Edit: June 22, 2014, 06:24:46 PM by AWESOME :D »

bump

i want to get this fixed to put out an update asap



different issue
trying to center a gui.
can you help with that?
i know you did with the rtb downloader

it's not working
Code: [Select]
function PushRebindGUI()
{
canvas.pushDialog(RebindGUI);

%x = getWord(getRes(), 0);
%y = getWord(getRes(), 1);
%x = %x/2-112;
%y = %y/2-79;
        RebindGUI.Position = %x@" "@%y;
}

If you have that GUI editor, you can make it center in the middle in the Gui options (Such as the window)

AWSOME, when you're using the GUI Editor, and doing the horizSizing and vertSizing to center, make sure that you apply that to what you want to center, not the entire GUI, unless you actually want to do that.


Code: [Select]
%x SPC %y

Same difference, I like using @" "@ in something small rather than SPC

Same difference, I like using @" "@ in something small rather than SPC

I'm not sure I'm understanding what people are saying.
If I put "center center" on everything, it gets centered, but the text
appears in one line of garbled mess, and a button is placed over it.

If I apply "center center" to just the background, the background gets
centered and the text and button stay in the same place.

My text is in 3 separate lines, because I didn't know how to continue
to the next line (if possible).

Throw your .gui and client.cs files up, I can show you what you should do. And if you have one your profiles too.

Throw your .gui and client.cs files up, I can show you what you should do. And if you have one your profiles too.
client.cs
Code: [Select]
//You probably shouldn't ever have to change this.
exec("./gui/AutoClickGUI.gui");
exec("./gui/RebindGUI.gui");
exec("./updater/Support_UpdaterDownload.cs");
if($Pref::AutoClicker::Speed <= 32)
{
$Pref::AutoClicker::Speed = 32;
}
function rapid(){commandtoserver('Activatestuff'); $Click = schedule($Pref::AutoClicker::Speed,0,rapid);}
function ToggleAutoClick(%a)
{
if(!%a)
return;
if(AutoClickGUI.isAwake())
canvas.popdialog(AutoClickGUI);
else
canvas.pushdialog(AutoClickGUI);
}
$remapDivision[$remapCount] = "Auto-Clicker";
$remapName[$remapCount] = "Toggle GUI";
$remapCmd[$remapCount] = "ToggleAutoClick";
$remapCount++;
if(movemap.getBinding(ToggleAutoClick) $= "")
{
if(movemap.getCommand(keyboard,f11) $= "")
movemap.bind(keyboard,f11,ToggleAutoClick);
else
canvas.schedule(33,pushdialog,RebindGUI);
}

RebindGUI.gui
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 = "224 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 GuiTextCtrl() {
      profile = "GuiTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "228 207";
      extent = "183 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "The auto-clicker could not bind to F11.";
      maxLength = "255";
   };
   new GuiTextCtrl() {
      profile = "GuiTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "223 220";
      extent = "189 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "If you want to use the auto-clicker, you";
      maxLength = "255";
   };
   new GuiTextCtrl() {
      profile = "GuiTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "222 233";
      extent = "196 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "need to bind it yourself. Sorry about that!";
      maxLength = "255";
   };
   new GuiBitmapButtonCtrl() {
      profile = "BlockButtonProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "274 264";
      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 ---