mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
function ChooseLevelMenu::fillPrefEntries( %this ) utility method to set gui elements to prefs
This commit is contained in:
parent
2fee2902f6
commit
e4342079f1
|
|
@ -187,7 +187,7 @@ $guiContent = new GuiControl(ChooseLevelMenu) {
|
|||
profile = "MenuMLSubHeaderText";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
new GuiTextEditCtrl(playerNameCTRL) {
|
||||
text = "Visitor";
|
||||
position = "606 4";
|
||||
extent = "295 22";
|
||||
|
|
@ -213,8 +213,8 @@ $guiContent = new GuiControl(ChooseLevelMenu) {
|
|||
profile = "MenuMLSubHeaderText";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
text = "Torque 3D Server";
|
||||
new GuiTextEditCtrl(serverNameCTRL) {
|
||||
text = "";
|
||||
position = "606 4";
|
||||
extent = "295 22";
|
||||
horizSizing = "left";
|
||||
|
|
@ -239,7 +239,7 @@ $guiContent = new GuiControl(ChooseLevelMenu) {
|
|||
profile = "MenuMLSubHeaderText";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
new GuiTextEditCtrl(serverPassCTRL) {
|
||||
text = "";
|
||||
position = "606 4";
|
||||
extent = "295 22";
|
||||
|
|
@ -265,7 +265,7 @@ $guiContent = new GuiControl(ChooseLevelMenu) {
|
|||
profile = "MenuMLSubHeaderText";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
new GuiTextEditCtrl(serverInfoCTRL) {
|
||||
text = "This is a Torque 3D server.";
|
||||
position = "606 4";
|
||||
extent = "295 22";
|
||||
|
|
@ -291,7 +291,7 @@ $guiContent = new GuiControl(ChooseLevelMenu) {
|
|||
profile = "MenuMLSubHeaderText";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiTextEditCtrl(JoinServerPlayerNameTxt) {
|
||||
new GuiTextEditCtrl(serverMaxPlayersCTRL) {
|
||||
text = "64";
|
||||
position = "606 4";
|
||||
extent = "295 22";
|
||||
|
|
|
|||
|
|
@ -26,6 +26,16 @@ function ChooseLevelMenu::onAdd( %this )
|
|||
new AssetQuery(ChooseLevelAssetQuery);
|
||||
|
||||
%this.previewButtonSize = "445 120";
|
||||
%this.fillPrefEntries();
|
||||
}
|
||||
|
||||
function ChooseLevelMenu::fillPrefEntries( %this )
|
||||
{
|
||||
serverNameCTRL.setText($Pref::Player::Name);
|
||||
serverNameCTRL.setText($Pref::Server::Name);
|
||||
serverPassCTRL.setText($Pref::Server::Password);
|
||||
serverInfoCTRL.setText($Pref::Server::Info);
|
||||
serverMaxPlayersCTRL.setText($Pref::Server::MaxPlayers);
|
||||
}
|
||||
|
||||
function ChooseLevelMenu::onWake(%this)
|
||||
|
|
|
|||
Loading…
Reference in a new issue