mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-24 00:53:47 +00:00
Template changes
This commit is contained in:
parent
ed36cf2c5c
commit
40acf75238
14 changed files with 762 additions and 2330 deletions
|
|
@ -3,10 +3,12 @@ function JoinServerMenu::onWake()
|
|||
{
|
||||
// Double check the status. Tried setting this the control
|
||||
// inactive to start with, but that didn't seem to work.
|
||||
JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
|
||||
JoinServerJoinBtn.setActive(JoinServerList.getCount() > 0);
|
||||
|
||||
JoinServerButtonHolder.setActive();
|
||||
|
||||
JoinServerList.setAsActiveMenuList();
|
||||
|
||||
JoinServerMenuInputHandler.setFirstResponder();
|
||||
}
|
||||
|
||||
|
|
@ -16,7 +18,7 @@ function JoinServerButtonHolder::onWake(%this)
|
|||
%this-->backButton.set("btn_b", "Escape", "Back", "JoinServerMenu.backOut();");
|
||||
%this-->refreshButton.set("btn_y", "R", "Refresh", "JoinServerMenu.refresh();");
|
||||
%this-->queryLANButton.set("btn_a", "Q", "Query LAN", "JoinServerMenu.queryLan();");
|
||||
%this-->queryInternetButton.set("btn_x", "E", "Query Internet", "JoinServerMenu.query();");
|
||||
%this-->queryInternetButton.set("btn_x", "E", "Query Online", "JoinServerMenu.query();");
|
||||
}
|
||||
|
||||
function JoinServerMenuInputHandler::onInputEvent(%this, %device, %action, %state)
|
||||
|
|
@ -110,23 +112,23 @@ function JoinServerMenu::update(%this)
|
|||
{
|
||||
// Copy the servers into the server list.
|
||||
JS_queryStatus.setVisible(false);
|
||||
JS_serverList.clear();
|
||||
JoinServerList.clear();
|
||||
%sc = getServerCount();
|
||||
for( %i = 0; %i < %sc; %i ++ ) {
|
||||
setServerInfo(%i);
|
||||
JS_serverList.addRow( %i,
|
||||
$ServerInfo::Name TAB
|
||||
$ServerInfo::Ping TAB
|
||||
$ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB
|
||||
$ServerInfo::Version TAB
|
||||
$ServerInfo::MissionName
|
||||
);
|
||||
%serverBtn = new GuiButtonCtrl(){
|
||||
text = $ServerInfo::Name TAB
|
||||
$ServerInfo::Ping TAB
|
||||
$ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB
|
||||
$ServerInfo::Version TAB
|
||||
$ServerInfo::MissionName;
|
||||
profile = GuiJoinServerButtonProfile;
|
||||
extent = JoinServerList.extent.x SPC 30;
|
||||
};
|
||||
JoinServerList.add(%serverBtn);
|
||||
}
|
||||
JS_serverList.sort(0);
|
||||
JS_serverList.setSelectedRow(0);
|
||||
JS_serverList.scrollVisible(0);
|
||||
|
||||
JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
|
||||
JoinServerJoinBtn.setActive(JoinServerList.getCount() > 0);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
|
@ -141,11 +143,9 @@ function onServerQueryStatus(%status, %msg, %value)
|
|||
|
||||
switch$ (%status) {
|
||||
case "start":
|
||||
JoinServerJoinBtn.setActive(false);
|
||||
JoinServerQryInternetBtn.setActive(false);
|
||||
JS_statusText.setText(%msg);
|
||||
JS_statusBar.setValue(0);
|
||||
JS_serverList.clear();
|
||||
JoinServerList.clear();
|
||||
|
||||
case "ping":
|
||||
JS_statusText.setText("Ping Servers");
|
||||
|
|
@ -156,7 +156,6 @@ function onServerQueryStatus(%status, %msg, %value)
|
|||
JS_statusBar.setValue(%value);
|
||||
|
||||
case "done":
|
||||
JoinServerQryInternetBtn.setActive(true);
|
||||
JS_queryStatus.setVisible(false);
|
||||
JS_status.setText(%msg);
|
||||
JoinServerMenu.update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue