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

  1. // ================
  2. // BATTLEZONE SHELL
  3. // ================
  4.  
  5. //
  6. // CREATE SHELL MULTIPLAYER GAME SELECTION PAGE
  7. //
  8. CreateControl("ShellMultiJoin", "WINDOW")
  9. {
  10.     Style("TRANSPARENT", "INERT");
  11.     Geom("PARENTWIDTH", "PARENTHEIGHT");
  12.  
  13.     CreateControl("Select", "WINDOW")
  14.     {
  15.         ColorGroup("MAGENTA");
  16.  
  17.         Geometry("LEFT", "BOTTOM");
  18.         Position(20, -30);
  19.         Size(600, 230);
  20.         BorderSize(10);
  21.         BevelSize(5);
  22.         TabSize(150, 10);
  23.         Title("Game Servers");
  24.         TitleFont("MEDIUM");
  25.         Style("LEFTTAB", "OUTLINE");
  26.  
  27.         //
  28.         // create the "all" filter button
  29.         //
  30.         Createcontrol("All", "BUTTON")
  31.         {
  32.             ColorGroup("LISTBOX");
  33.  
  34.             Geometry("LEFT", "TOP");
  35.             Position(0, 0);
  36.             Size(90, 10);
  37.             BorderSize(5);
  38.             BevelSize(3);
  39.             Style("ROLLOVER", "RADIO", "OUTLINE");
  40.             Cursor("Highlight");
  41.             Font("SMALL");
  42.             Text("All Games");
  43.             Value(0);
  44.             UseVar("network.session.filter");
  45.         }
  46.  
  47.         //
  48.         // create the "deathmatch" filter button
  49.         //
  50.         CreateControl("Deathmatch", "BUTTON")
  51.         {
  52.             ColorGroup("BLACKBLUE");
  53.  
  54.             Geometry("LEFT", "TOP");
  55.             Position(105, 0);
  56.             Size(90, 10);
  57.             BorderSize(5);
  58.             BevelSize(3);
  59.             Style("ROLLOVER", "RADIO", "OUTLINE");
  60.             Cursor("Highlight");
  61.             Font("SMALL");
  62.             Text("Deathmatch");
  63.             Value(1);
  64.             UseVar("network.session.filter");
  65.         }
  66.  
  67.         //
  68.         // create the "strategy" filter button
  69.         //
  70.         CreateControl("Strategy", "BUTTON")
  71.         {
  72.             ColorGroup("BLACKBLUE");
  73.  
  74.             Geometry("LEFT", "TOP");
  75.             Position(210, 0);
  76.             Size(90, 10);
  77.             BorderSize(5);
  78.             BevelSize(3);
  79.             Style("ROLLOVER", "RADIO", "OUTLINE");
  80.             Cursor("Highlight");
  81.             Font("SMALL");
  82.             Text("Strategy");
  83.             Value(2);
  84.             UseVar("network.session.filter");
  85.         }
  86.  
  87.         //
  88.         // create the refresh button for the impatient
  89.         //
  90.         CreateControl("Refresh", "BUTTON")
  91.         {
  92.             ColorGroup("MAGENTA");
  93.  
  94.             Geometry("LEFT", "TOP");
  95.             Position(325, 0);
  96.             Size(90, 10);
  97.             BorderSize(5);
  98.             BevelSize(3);
  99.             Style("ROLLOVER", "OUTLINE");
  100.             Cursor("Highlight");
  101.             Font("SMALL");
  102.             Text("Refresh");
  103.             NotifyParent("Button::Press", "Refresh");
  104.         }
  105.     
  106.         CreateControl("ConnectTitle", "STATIC")
  107.         {
  108.             Geometry("LEFT", "TOP");
  109.             Position(440, 0);
  110.             Size(80, 10);
  111.             Font("TINY");
  112.             Text("Connection:");
  113.             JustifyText("LEFT");
  114.             Style("TRANSPARENT");
  115.         }
  116.  
  117.         CreateControl("LanOnly", "BUTTON")
  118.         {
  119.             ColorGroup("MAGENTA");
  120.             Position(500, 0);
  121.             Size(100, 10);
  122.             BorderSize(5);
  123.             BevelSize(3);
  124.             Font("TINY");
  125.             Style("ROLLOVER", "Toggle", "OUTLINE");
  126.             Text("Lan Only"); // Text changed by code to stuff from Localize.odf
  127.             Cursor("Highlight");
  128.             UseVar("network.lanonly");
  129.         }
  130.  
  131.         // These static controls are the column titles for the columns of
  132.         // player info
  133.         CreateControl("ColumnTitle1", "BUTTON")
  134.         {
  135.             ColorGroup("LISTBOX");
  136.             Geometry("LEFT", "TOP");
  137.             JustifyText("LEFT");
  138.             Position(10, 20);
  139.             Size(150, 15);
  140.             Font("SMALL");
  141.             Text("Game Name");
  142.             Style("TRANSPARENT", "ROLLOVER");
  143.             Cursor("Highlight");
  144.             NotifyParent("Button::Press", "SortName");
  145.         }
  146.         CreateControl("ColumnTitle2", "BUTTON")
  147.         {
  148.             ColorGroup("LISTBOX");
  149.             Geometry("LEFT", "TOP");
  150.             JustifyText("LEFT");
  151.             Position(200, 20);
  152.             Size(30, 15);
  153.             Font("SMALL");
  154.             Text("Pwd");
  155.             Style("TRANSPARENT", "ROLLOVER");
  156.             Cursor("Highlight");
  157.             NotifyParent("Button::Press", "SortPwd");
  158.         }
  159.         CreateControl("ColumnTitle3", "BUTTON")
  160.         {
  161.             ColorGroup("LISTBOX");
  162.             Geometry("LEFT", "TOP");
  163.             JustifyText("LEFT");
  164.             Position(230, 20);
  165.             Size(60, 15);
  166.             Font("SMALL");
  167.             Text("Ping");
  168.             Style("TRANSPARENT", "ROLLOVER");
  169.             Cursor("Highlight");
  170.             NotifyParent("Button::Press", "SortPing");
  171.         }
  172.         CreateControl("ColumnTitle4", "BUTTON")
  173.         {
  174.             ColorGroup("LISTBOX");
  175.             Geometry("LEFT", "TOP");
  176.             JustifyText("LEFT");
  177.             Position(290, 20);
  178.             Size(60, 15);
  179.             Font("SMALL");
  180.             Text("Players");
  181.             Style("TRANSPARENT", "ROLLOVER");
  182.             Cursor("Highlight");
  183.             NotifyParent("Button::Press", "SortPlayers");
  184.         }
  185.         CreateControl("ColumnTitle5", "BUTTON")
  186.         {
  187.             ColorGroup("LISTBOX");
  188.             Geometry("LEFT", "TOP");
  189.             JustifyText("LEFT");
  190.             Position(350, 20);
  191.             Size(150, 15);
  192.             Font("SMALL");
  193.             Text("Map Name");
  194.             Style("TRANSPARENT", "ROLLOVER");
  195.             Cursor("Highlight");
  196.             NotifyParent("Button::Press", "SortMap");
  197.         }
  198.         CreateControl("ColumnTitle6", "BUTTON")
  199.         {
  200.             ColorGroup("LISTBOX");
  201.             Geometry("LEFT", "TOP");
  202.             JustifyText("LEFT");
  203.             Position(500, 20);
  204.             Size(100, 15);
  205.             Font("SMALL");
  206.             Text("Game Type");
  207.             Style("TRANSPARENT", "ROLLOVER");
  208.             Cursor("Highlight");
  209.             NotifyParent("Button::Press", "SortType");
  210.         }
  211.  
  212.         //
  213.         // create the server list scroll bar
  214.         //
  215.         CreateControl("SelectionSlider", "LISTSLIDER")
  216.         {
  217.             Orientation("VERTICAL");
  218.             Geometry("LEFT", "TOP");
  219.             Position(590, 35);
  220.             Size(10, 200);
  221.             Style("BUTTONS", "ROLLOVER");
  222.             Cursor("Highlight");
  223.             // Do NOT use a var for this slider!
  224.             // It's controlled automagically by association
  225.         }
  226.  
  227.         //
  228.         // create the server list column listboxen
  229.         //
  230.         CreateControl("SessionList1", "LISTBOX")
  231.         {
  232.             ColorGroup("LISTBOX");
  233.             Geometry("LEFT", "TOP");
  234.             Position(0, 35);
  235.             Size(210, 200);
  236.             CellSize(210, 10);
  237.             Font("Tiny");
  238.             UseVar("network.session.namecrc");
  239.             UseSlider("<SelectionSlider");
  240.         }
  241.         CreateControl("SessionList2", "LISTBOX")
  242.         {
  243.             ColorGroup("LISTBOX");
  244.             Geometry("LEFT", "TOP");
  245.             Position(210, 35);
  246.             Size(20, 200);
  247.             CellSize(20, 10);
  248.             Font("Tiny");
  249.             UseVar("network.session.namecrc");
  250.             UseSlider("<SelectionSlider");
  251.         }
  252.         CreateControl("SessionList3", "LISTBOX")
  253.         {
  254.             ColorGroup("LISTBOX");
  255.             Geometry("LEFT", "TOP");
  256.             Position(230, 35);
  257.             Size(60, 200);
  258.             CellSize(60, 10);
  259.             Font("Tiny");
  260.             UseVar("network.session.namecrc");
  261.             UseSlider("<SelectionSlider");
  262.         }
  263.         CreateControl("SessionList4", "LISTBOX")
  264.         {
  265.             ColorGroup("LISTBOX");
  266.             Geometry("LEFT", "TOP");
  267.             Position(290, 35);
  268.             Size(60, 200);
  269.             CellSize(60, 10);
  270.             Font("Tiny");
  271.             UseVar("network.session.namecrc");
  272.             UseSlider("<SelectionSlider");
  273.         }
  274.         CreateControl("SessionList5", "LISTBOX")
  275.         {
  276.             ColorGroup("LISTBOX");
  277.             Geometry("LEFT", "TOP");
  278.             Position(350, 35);
  279.             Size(150, 200);
  280.             CellSize(150, 10);
  281.             Font("Tiny");
  282.             UseVar("network.session.namecrc");
  283.             UseSlider("<SelectionSlider");
  284.         }
  285.         CreateControl("SessionList6", "LISTBOX")
  286.         {
  287.             ColorGroup("LISTBOX");
  288.             Geometry("LEFT", "TOP");
  289.             Position(500, 35);
  290.             Size(90, 200);
  291.             CellSize(90, 10);
  292.             Font("Tiny");
  293.             UseVar("network.session.namecrc");
  294.             UseSlider("<SelectionSlider");
  295.         }
  296.  
  297.         OnEvent("Refresh")
  298.         {
  299.             Cmd("network.enumsessions");
  300.         }
  301.  
  302.         OnEvent("SortName")
  303.         {
  304.             Cmd("network.sortname");
  305.         }
  306.         OnEvent("SortPwd")
  307.         {
  308.             Cmd("network.sortpwd");
  309.         }
  310.         OnEvent("SortPing")
  311.         {
  312.             Cmd("network.sortping");
  313.         }
  314.         OnEvent("SortPlayers")
  315.         {
  316.             Cmd("network.sortplayers");
  317.         }
  318.         OnEvent("SortMap")
  319.         {
  320.             Cmd("network.sortmap");
  321.         }
  322.         OnEvent("SortType")
  323.         {
  324.             Cmd("network.sorttype");
  325.         }
  326.  
  327.         OnEvent("Control::Activate")
  328.         {
  329.             cmd("shell.background multip_1.tga");
  330.             Cmd("network.session.autorefreshon");
  331.         }
  332.  
  333.         OnEvent("Control::Deactivate")
  334.         {
  335.             Cmd("network.session.autorefreshoff");
  336.         }
  337.     }
  338.  
  339.     //
  340.     // create the "launch" button
  341.     //
  342.     CreateControl("Join", "BUTTON")
  343.     {
  344.         ColorGroup("MAGENTA");
  345.         Position(270, 20);
  346.         //Position(395, 20);
  347.         Size(95, 0);
  348.         BorderSize(10);
  349.         BevelSize(5);
  350.         Font("MEDIUM");
  351.         Style("ROLLOVER", "OUTLINE");
  352.         Text("Join Game");
  353.         Cursor("Highlight");
  354.         NotifyParent("Button::Press", "Join");
  355.     }
  356.  
  357.     //
  358.     // create the "create" button
  359.     //
  360.     CreateControl("Create", "BUTTON")
  361.     {
  362.         ColorGroup("MAGENTA");
  363.         Position(145, 20);
  364.         //Position(270, 20);
  365.         Size(95, 0);
  366.         BorderSize(10);
  367.         BevelSize(5);
  368.         Font("MEDIUM");
  369.         Style("ROLLOVER", "OUTLINE");
  370.         Text("New Game");
  371.         Cursor("Highlight");
  372.         NotifyParent("Button::Press", "Create");
  373.     }
  374.  
  375.     // handle the create event
  376.     OnEvent("Create")
  377.     {
  378.         FadeOut("|NetworkScanning");
  379.         FadeIn("|GameName");
  380.     }
  381.  
  382.     // handle the launch event
  383.     OnEvent("Join")
  384.     {
  385.         FadeOut("|NetworkScanning");
  386.         Cmd("network.session.join");
  387.     }
  388. }
  389.  
  390.