home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2000 February / Gamestar_15_2000-02_cd1.bin / Patche / BZ2BetaPatch101b.exe / addon / bzshell_multi_name.cfg < prev    next >
Text File  |  2000-01-01  |  4KB  |  203 lines

  1. // ================
  2. // BATTLEZONE SHELL
  3. // ================
  4.  
  5. //
  6. // CREATE THE NAME DIALOG
  7. //
  8. CreateControl("GameName", "STATIC")
  9. {
  10.     // inherit root STATIC's dimensions
  11.     Geometry("PARENTWIDTH", "PARENTHEIGHT");
  12.     ColorGroup("BACKGROUND");
  13.     Style("MODAL");
  14.  
  15.     CreateControl("Name", "STATIC")
  16.     {
  17.         ColorGroup("MAGENTA");
  18.         Geometry("HCENTRE", "VCENTRE");
  19.         Position(0, 5);
  20.         Size(200, 140);
  21.         BorderSize(10);
  22.         BevelSize(5);
  23.         TabSize(150, 10);
  24.         Style("OUTLINE", "TABROOT");
  25.         Title("Game Info");
  26.         TitleFont("MEDIUM");
  27.  
  28.         //
  29.         // create the name title
  30.         // 
  31.         CreateControl("NameTitle", "STATIC")
  32.         {
  33.             Geometry("LEFT", "TOP");
  34.             Position(-5, 0);
  35.             Size(40, 10);
  36.             Font("MEDIUM");
  37.             Text("Name");
  38.             JustifyText("LEFT");
  39.             Style("TRANSPARENT");
  40.         }
  41.  
  42.         //
  43.         // create the name edit box
  44.         //
  45.         CreateControl("NameEdit", "EDIT")
  46.         {
  47.             ColorGroup("BLACKBLUE");
  48.             Geometry("LEFT", "TOP");
  49.             Position(0, 20);
  50.             Size(200, 10);
  51.             BorderSize(5);
  52.             BevelSize(5);
  53.             Style("ROLLOVER", "OUTLINE");
  54.             Font("SMALL");
  55.             UseVar("network.session.namebox");
  56.             Cursor("Highlight");
  57.             NotifyParent("Edit::Enter", "Okay");
  58.             MaxLength(33);    // 32 characters + 1 for the end
  59.         }    
  60.  
  61.         //
  62.         // create the password title
  63.         //
  64.         CreateControl("PasswordTitle", "STATIC")
  65.         {
  66.             Geometry("LEFT", "TOP");
  67.             Position(-5, 40);
  68.             Size(80, 10);
  69.             Font("MEDIUM");
  70.             Text("Password");
  71.             JustifyText("LEFT");
  72.             Style("TRANSPARENT");
  73.         }
  74.  
  75.         //
  76.         // create the password edit box
  77.         //
  78.         CreateControl("PasswordEdit", "EDIT")
  79.         {
  80.             ColorGroup("BLACKBLUE");
  81.             Geometry("LEFT", "TOP");
  82.             Position(0, 60);
  83.             Size(200, 10);
  84.             BorderSize(5);
  85.             BevelSize(5);
  86.             Style("ROLLOVER", "OUTLINE");
  87.             Font("SMALL");
  88.             UseVar("network.session.password");
  89.             Cursor("Highlight");
  90.             NotifyParent("Edit::Enter", "Okay");
  91.             MaxLength(21);    // 21 characters + 1 for the end
  92.         }    
  93.  
  94.         //
  95.         // create the server message title
  96.         //
  97.         CreateControl("ServerMsg", "STATIC")
  98.         {
  99.             Geometry("LEFT", "TOP");
  100.             Position(-5, 80);
  101.             Size(200, 10);
  102.             Font("MEDIUM");
  103.             Text("Server Message");
  104.             JustifyText("LEFT");
  105.             Style("TRANSPARENT");
  106.         }
  107.  
  108.         //
  109.         // create the server message edit box
  110.         //
  111.         CreateControl("ServerMsgEdit", "EDIT")
  112.         {
  113.             ColorGroup("BLACKBLUE");
  114.             Geometry("LEFT", "TOP");
  115.             Position(0, 100);
  116.             Size(200, 10);
  117.             BorderSize(5);
  118.             BevelSize(5);
  119.             Style("ROLLOVER", "OUTLINE");
  120.             Font("SMALL");
  121.             UseVar("network.session.servermsg");
  122.             Cursor("Highlight");
  123.             NotifyParent("Edit::Enter", "Okay");
  124.             MaxLength(250);    // limit to reasonable length
  125.         }    
  126.  
  127.         //
  128.         // create the Launch button
  129.         //
  130.         CreateControl("Okay", "BUTTON")
  131.         {
  132.             ColorGroup("BLACKBLUE");
  133.             Geometry("RIGHT", "BOTTOM");
  134.             Position(-10, -5);
  135.             Size(70, 0);
  136.             BorderSize(10);
  137.             BevelSize(5);
  138.             Font("SMALL");
  139.             JustifyText("CENTER");
  140.             Text("OK");
  141.             Style("ROLLOVER", "OUTLINE");
  142.             Cursor("Highlight");
  143.             NotifyParent("Button::Press", "Okay");
  144.         }    
  145.  
  146.         //
  147.         // create the cancel button
  148.         //
  149.         CreateControl("Cancel", "BUTTON")
  150.         {
  151.             ColorGroup("BLACKBLUE");
  152.             Geometry("Left", "BOTTOM");
  153.             Position(10, -5);
  154.             Size(70, 0);
  155.             BorderSize(10);
  156.             BevelSize(5);
  157.             Font("SMALL");
  158.             JustifyText("CENTER");
  159.             Text("Cancel");
  160.             Style("ROLLOVER", "OUTLINE");
  161.             Cursor("Highlight");
  162.             NotifyParent("Button::Press", "Cancel");
  163.  
  164.         }    
  165.  
  166.         OnEvent("Control::Activate")
  167.         {
  168.             Cmd("network.session.listoff");
  169.         }
  170.  
  171.         OnEvent("Control::Deactivate")
  172.         {
  173.             Cmd("network.session.liston");
  174.         }
  175.  
  176.         //
  177.         // handle the Okay event
  178.         //
  179.         OnEvent("Okay")
  180.         {
  181.             FadeOut("|ShellMultiVehicle");
  182.             FadeOut("|GameName");
  183.             FadeOut("|ShellMulti");
  184.             //FadeOut("|ShellMultJoin");
  185.  
  186.             Cmd("network.session.create");
  187.             Cmd("shell.multi.createGame");
  188.             //        FadeIn("|ShellMultiOption");
  189.             FadeIn("|Communications");
  190.         }    
  191.  
  192.         //
  193.         // handle the Cancel event
  194.         //
  195.         OnEvent("Cancel")
  196.         {
  197.             FadeOut("|GameName");
  198.             FadeIn("|ShellMultiJoin");
  199.             Cmd("network.session.autorefreshon");
  200.         }
  201.     }
  202. }
  203.