1. //--- OBJECT WRITE BEGIN ---
  2. new GuiChunkedBitmapCtrl(MainMenuGui) {
  3.    canSaveDynamicFields = "0";
  4.    Profile = "GuiContentProfile";
  5.    HorizSizing = "width";
  6.    VertSizing = "height";
  7.    position = "0 0";
  8.    Extent = "640 480";
  9.    MinExtent = "8 8";
  10.    canSave = "1";
  11.    Visible = "1";
  12.    hovertime = "1000";
  13.    useVariable = "0";
  14.    tile = "1";
  15.  
  16.    new GuiChunkedBitmapCtrl() {
  17.       canSaveDynamicFields = "0";
  18.       Profile = "GuiDefaultProfile";
  19.       HorizSizing = "width";
  20.       VertSizing = "height";
  21.       position = "0 0";
  22.       Extent = "640 480";
  23.       MinExtent = "8 2";
  24.       canSave = "1";
  25.       Visible = "1";
  26.       hovertime = "1000";
  27.       bitmap = "./mainMenu/backdrop";
  28.       useVariable = "0";
  29.       tile = "0";
  30.  
  31.       new GuiBitmapButtonCtrl(joinGame) {
  32.          canSaveDynamicFields = "0";
  33.          Profile = "GuiDefaultProfile";
  34.          HorizSizing = "relative";
  35.          VertSizing = "relative";
  36.          position = "28 167";
  37.          Extent = "116 118";
  38.          MinExtent = "8 2";
  39.          canSave = "1";
  40.          Visible = "1";
  41.          Command = "Canvas.setContent(JoinServerGui);";
  42.          hovertime = "1000";
  43.          text = "Button";
  44.          groupNum = "-1";
  45.          buttonType = "PushButton";
  46.          bitmap = "./mainMenu/joingame";
  47.       };
  48.       new GuiChunkedBitmapCtrl() {
  49.          canSaveDynamicFields = "0";
  50.          Profile = "GuiDefaultProfile";
  51.          HorizSizing = "relative";
  52.          VertSizing = "relative";
  53.          position = "208 0";
  54.          Extent = "432 336";
  55.          MinExtent = "8 2";
  56.          canSave = "1";
  57.          Visible = "1";
  58.          hovertime = "1000";
  59.          bitmap = "./mainMenu/menu_image";
  60.          useVariable = "0";
  61.          tile = "0";
  62.       };
  63.       new GuiBitmapButtonCtrl(startGame) {
  64.          canSaveDynamicFields = "0";
  65.          Profile = "GuiDefaultProfile";
  66.          HorizSizing = "relative";
  67.          VertSizing = "relative";
  68.          position = "19 3";
  69.          Extent = "132 133";
  70.          MinExtent = "8 2";
  71.          canSave = "1";
  72.          Visible = "1";
  73.          Command = "Canvas.setContent(startMissionGui);";
  74.          hovertime = "1000";
  75.          text = "Button";
  76.          groupNum = "-1";
  77.          buttonType = "PushButton";
  78.          bitmap = "./mainMenu/startgame";
  79.       };
  80.       new GuiBitmapButtonCtrl(options) {
  81.          canSaveDynamicFields = "0";
  82.          Profile = "GuiDefaultProfile";
  83.          HorizSizing = "relative";
  84.          VertSizing = "relative";
  85.          position = "99 311";
  86.          Extent = "133 126";
  87.          MinExtent = "8 2";
  88.          canSave = "1";
  89.          Visible = "1";
  90.          Command = "Canvas.pushDialog(optionsDlg);";
  91.          hovertime = "1000";
  92.          text = "Button";
  93.          groupNum = "-1";
  94.          buttonType = "PushButton";
  95.          bitmap = "./mainMenu/options";
  96.       };
  97.       new GuiBitmapButtonCtrl(shortCut) {
  98.          canSaveDynamicFields = "0";
  99.          Profile = "GuiDefaultProfile";
  100.          HorizSizing = "relative";
  101.          VertSizing = "relative";
  102.          position = "4 291";
  103.          Extent = "179 31";
  104.          MinExtent = "8 2";
  105.          canSave = "1";
  106.          Visible = "1";
  107.          Command = "Launch();";
  108.          hovertime = "1000";
  109.          text = "Button";
  110.          groupNum = "-1";
  111.          buttonType = "PushButton";
  112.          bitmap = "./mainMenu/shortcut";
  113.       };      
  114.       new GuiBitmapButtonCtrl(quit) {
  115.          canSaveDynamicFields = "0";
  116.          Profile = "GuiDefaultProfile";
  117.          HorizSizing = "relative";
  118.          VertSizing = "relative";
  119.          position = "521 375";
  120.          Extent = "93 93";
  121.          MinExtent = "8 2";
  122.          canSave = "1";
  123.          Visible = "1";
  124.          Command = "quit();";
  125.          hovertime = "1000";
  126.          text = "Button";
  127.          groupNum = "-1";
  128.          buttonType = "PushButton";
  129.          bitmap = "./mainMenu/quit";
  130.       };      
  131.    };
  132. };
  133. //--- OBJECT WRITE END ---
  134.  
  135. function Launch()
  136. {
  137.    %id = SM_missionList.getSelectedId();
  138.    %mission = "starter.RTS/data/missions/winter.mis";    // Here set the proper mission you wanna work on
  139.      
  140.    createServer("SinglePlayer", %mission);
  141.    %conn = new RTSConnection(ServerConnection);
  142.    RootGroup.add(ServerConnection);
  143.    %conn.setConnectArgs("DEFAULT_USER");                      // Here Set the Player Name
  144.    %conn.setJoinPassword("");
  145.    %conn.connectLocal();
  146.    
  147.    // Just auto join
  148.    commandToServer('PlayerReady', true);
  149. }