Merge pull request #13 from Azaezel/BaseUIUpdate_Wipwork

don't save map population elements when editing
This commit is contained in:
Areloch 2024-01-04 20:27:06 -06:00 committed by GitHub
commit ee37a13190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 7 deletions

View file

@ -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,8 +239,8 @@ $guiContent = new GuiControl(ChooseLevelMenu) {
profile = "MenuMLSubHeaderText";
tooltipProfile = "GuiToolTipProfile";
};
new GuiTextEditCtrl() {
text = "Torque 3D Server";
new GuiTextEditCtrl(serverPassCTRL) {
text = "";
position = "606 4";
extent = "295 22";
horizSizing = "left";
@ -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";

View file

@ -28,8 +28,18 @@ function ChooseLevelMenu::onAdd( %this )
%this.previewButtonSize = "445 120";
}
function ChooseLevelMenu::fillPrefEntries( %this )
{
playerNameCTRL.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)
{
%this.fillPrefEntries();
LevelPreviewArray.clear();
ChooseLevelAssetQuery.clear();
@ -87,6 +97,7 @@ function ChooseLevelMenu::onWake(%this)
textLocation = "left";
textMargin = 120;
groupNum = 2;
cansave = false;
};
LevelPreviewArray.add(%preview);

View file

@ -19,6 +19,7 @@ function OptionsMenu::onAdd(%this)
function OptionsMenu::onWake(%this)
{
%this.optsListCount = -1;
$optionsChangeRequiresRestart = false;
%this.populateVideoSettings();
@ -759,6 +760,7 @@ function OptionsMenu::resetSettings(%this)
// Option types
function addOptionGroup(%displayName)
{
OptionsMenu.optsListCount++;
%group = new GuiTextCtrl() {
text = %displayName;
position = "0 0";
@ -785,6 +787,7 @@ function optionsMenuButton::onHighlighted(%this, %highlighted)
function addOptionEntry(%optionObj)
{
OptionsMenu.optsListCount++;
if(!isObject(%optionObj) || (%optionObj.class !$= "OptionsSettings" && %optionObj.class !$= "AudioOptionsSettings"))
{
error("addOptionsEntry() - attempting to create a new options entry, but was provided an invalid options object");
@ -818,6 +821,7 @@ function addOptionEntry(%optionObj)
class = "OptionsListEntry";
optionsObject = %optionObj;
currentOptionIndex = %qualityLevelIndex;
selectionID = OptionsMenu.optsListCount;
canSave = "0";
new GuiButtonCtrl() {
@ -862,6 +866,7 @@ function addOptionEntry(%optionObj)
text = "<";
profile = GuiMenuButtonProfile;
internalName = "prevValButton";
command = "$MenuList.listPosition = $thisControl.getParent().getParent().selectionID; OptionMenuPrevSetting(1);";
};
new GuiTextCtrl() {
@ -881,6 +886,7 @@ function addOptionEntry(%optionObj)
text = ">";
profile = GuiMenuButtonProfile;
internalName = "nextValButton";
command = "$MenuList.listPosition = $thisControl.getParent().getParent().selectionID; OptionMenuNextSetting(1);";
};
};
};
@ -890,6 +896,7 @@ function addOptionEntry(%optionObj)
function addOptionSlider(%optionName, %optionDesc, %prefName, %sliderMin, %sliderMax, %sliderTicks)
{
OptionsMenu.optsListCount++;
%currentVal = getVariable(%prefName);
%tempVarName = %prefName @ "_tempVar";