Пример #1
0
        public void update()
        {
            // Copy the servers into the server list.
            ((GuiWindowCtrl)"JS_queryStatus").setVisible(false);

            GuiTextListCtrl JS_serverList = "JS_serverList";

            JS_serverList.clear();

            int sc = Util.getServerCount();

            for (int i = 0; i < sc; i++)
            {
                Util.setServerInfo((uint)i);
                JS_serverList.addRow(i, sGlobal["$ServerInfo::Name"] + '\t' + sGlobal["$ServerInfo::Ping"] + "\t" + sGlobal["$ServerInfo::PlayerCount"] + "/" + sGlobal["$ServerInfo::MaxPlayers"] + "/t" + sGlobal["$ServerInfo::Version"] + "\t" + sGlobal["$ServerInfo::MissionName"], -1);
            }
            JS_serverList.sort("0");
            JS_serverList.setSelectedRow(0);
            JS_serverList.scrollVisible(0);
            ((GuiButtonCtrl)"JS_joinServer").setActive(JS_serverList.rowCount() > 0);
        }