Poll

Which feature would you most like to see in RTB next?

Friends List + Messaging [1-2 Months Dev Time]
167 (78.4%)
Online/Ingame Gallery System & Save Repository [2-3 Months Dev Time]
20 (9.4%)
Online/Ingame Clan System [4-5 Months Dev Time]
26 (12.2%)

Total Members Voted: 212

Author Topic: Return to Blockland v3  (Read 135696 times)

I like how the new RTB v3 website is faster than v2's.

I think he only lets the super-awesome people in if they missed it.

If I missed it I wouldn't have gotten in.

Well, Jirue's super lovey!

Donate. :D

Wait, then the really desperate people will be sending a bunch of money to Ephialtes.

BUT THAT'S A GOOD THING.

But then there would...ah, forget it.

I think he only lets the super-awesome people in if they missed it.

If I missed it I wouldn't have gotten in.
I'm super-awesome and you know it  :cookieMonster:

Now for some information on the GUI Downloading in RTB3. The downloader currently supports the following controls:

  • GuiBitmapButtonCtrl
  • GuiButtonCtrl
  • GuiBitmapCtrl
  • GuiTextEditCtrl
  • GuiTextCtrl
  • GuiMLTextCtrl
  • GuiSwatchCtrl
  • GuiWindowCtrl
  • GuiScrollCtrl

And the buttons are allowed to use the following commands:

  • commandtoserver
  • canvas.pushDialog
  • canvas.popDialog

Parameters of the commandtoserver function call may consist of the following:

  • A quoted value, e.g. "hello"
  • An unquoted value, e.g. 400
  • A value obtained from an element within the gui, e.g. MyTextBox.getValue()

Finally, here is an example GUI file that will download perfectly and exhibits all/most of the features.

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

   new GuiWindowCtrl() {
      profile = "BlockWindowProfile";
      horizSizing = "center";
      vertSizing = "center";
      position = "132 105";
      extent = "375 270";
      minExtent = "8 8";
      visible = "1";
      text = "RTB GUI Transfer Example";
      maxLength = "255";
      resizeWidth = "0";
      resizeHeight = "0";
      canMove = "1";
      canClose = "1";
      canMinimize = "0";
      canMaximize = "0";
      minSize = "50 50";
      closeCommand = "Canvas.popDialog(RTB_Example);";
         helpTag = "0";

      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "top";
         position = "254 231";
         extent = "107 26";
         minExtent = "8 2";
         visible = "1";
         command = "canvas.popDialog(RTB_Example);";
         text = "Close Window";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "0 0 255 255";
            helpTag = "0";
      };
      new GuiTextEditCtrl(RTB_MessageBox) {
         profile = "GuiTextEditProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "130 197";
         extent = "113 18";
         minExtent = "8 2";
         visible = "1";
         maxLength = "255";
         historySize = "0";
         password = "0";
         tabComplete = "0";
         sinkAllKeyEvents = "0";
      };
      new GuiTextCtrl() {
         profile = "GuiTextProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "17 197";
         extent = "108 18";
         minExtent = "8 2";
         visible = "1";
         text = "Send a chat message:";
         maxLength = "255";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "top";
         position = "14 231";
         extent = "107 26";
         minExtent = "8 2";
         visible = "1";
         command = "commandtoserver(\'light\');";
         text = "Toggle Light";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 0 255";
            helpTag = "0";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "top";
         position = "134 231";
         extent = "107 26";
         minExtent = "8 2";
         visible = "1";
         command = "commandtoserver(\'wtf\');canvas.popDialog(RTB_Example);";
         text = "WTF Emote";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 0 0 255";
            helpTag = "0";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "top";
         position = "254 193";
         extent = "107 25";
         minExtent = "8 2";
         visible = "1";
         command = "commandtoserver(\'messageSent\',RTB_MessageBox.getValue());canvas.popDialog(RTB_Example);";
         text = "Send";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
            helpTag = "0";
      };
      new GuiScrollCtrl() {
         profile = "GuiScrollProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "13 35";
         extent = "346 152";
         minExtent = "8 2";
         visible = "1";
         willFirstRespond = "1";
         hScrollBar = "alwaysOff";
         vScrollBar = "alwaysOn";
         constantThumbHeight = "0";
         childMargin = "2 0";
         rowHeight = "40";
         columnWidth = "30";

         new GuiMLTextCtrl() {
            profile = "GuiMLTextProfile";
            horizSizing = "right";
            vertSizing = "bottom";
            position = "3 1";
            extent = "344 154";
            minExtent = "8 2";
            visible = "1";
            lineSpacing = "2";
            allowColorChars = "0";
            maxChars = "-1";
            text = "This stretched the living crap out of my crap browser.";
            maxBitmapHeight = "-1";
            selectable = "1";
         };
      };
   };
};
//--- OBJECT WRITE END ---

 Notice how it can be saved straight out of the GUI Editor and RTB will do the rest of the work. In order to get it to download to a client, all you need to do is call this function:

Code: [Select]
RTB_registerGUI("Add-Ons/System_ReturnToBlockland/RTB_Example.gui");
Also notice how RTB breaks up large text fields into multiple commands to the client to avoid being limited by the character limits in commandtoclient commands. There will be more formal documentation on this system when RTB3 is released.
« Last Edit: July 24, 2009, 12:14:54 PM by Rotondo »

TAKE DOWN THE PAGE STRETCH

GET RID OF THE LATIN OR WHATEVER THAT IS

Tom

So we get the GUI to them, how are they opened? Is there some kind of commandToClient('PushRTBGUI', "RTB_Example.gui"); ?

You can use:

Code: [Select]
commandtoclient('RTB_openGui',RTB_Example);
and

Code: [Select]
commandtoclient('RTB_closeGui',RTB_Example);
Note that those two functions only work on RTB-downloaded GUI.

How would we make custom client functions, I think you stated above, but will there be strict guidelines, limiting the flexibility of GUI's? Or is there a way we can code our own custom functions.

There is no coding. This is for static GUI only and cannot access any client-side functions apart from the three listed above.

It's limited in my opinion then, but at least it's something.

Are you adding an avatar function?

wtf's with the page stretch? D:

Warning - while you were typing a new reply has been posted. You may wish to review your post.

forget no.

It certainly stops people from posting, must be Ephi's plan. I clicked reply and I couldn't find the box to type in.

Of course it's limited, I mentioned this repeatedly during the planning stages. There is no way to safely download a script from the server to the client and I do not intend to attempt anything like this.

On another note, I have also added in a killswitch to the gui downloading which I can flip from the RTB server incase some jackass finds some way to run clientside commands through it. This is not likely though, but it's best to be prepared.

The page does not stretch for me, get a better browser that supports text wrapping.