mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
don't save map population elements when editing
track addOption entry/slider/group position in the overall list, and use that found key to hook in the "<" and ">" subelements for selection purposes
This commit is contained in:
parent
c809dbb4be
commit
5e334eb196
2 changed files with 8 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ function ChooseLevelMenu::onWake(%this)
|
||||||
textLocation = "left";
|
textLocation = "left";
|
||||||
textMargin = 120;
|
textMargin = 120;
|
||||||
groupNum = 2;
|
groupNum = 2;
|
||||||
|
cansave = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
LevelPreviewArray.add(%preview);
|
LevelPreviewArray.add(%preview);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ function OptionsMenu::onAdd(%this)
|
||||||
|
|
||||||
function OptionsMenu::onWake(%this)
|
function OptionsMenu::onWake(%this)
|
||||||
{
|
{
|
||||||
|
%this.optsListCount = -1;
|
||||||
$optionsChangeRequiresRestart = false;
|
$optionsChangeRequiresRestart = false;
|
||||||
|
|
||||||
%this.populateVideoSettings();
|
%this.populateVideoSettings();
|
||||||
|
|
@ -759,6 +760,7 @@ function OptionsMenu::resetSettings(%this)
|
||||||
// Option types
|
// Option types
|
||||||
function addOptionGroup(%displayName)
|
function addOptionGroup(%displayName)
|
||||||
{
|
{
|
||||||
|
OptionsMenu.optsListCount++;
|
||||||
%group = new GuiTextCtrl() {
|
%group = new GuiTextCtrl() {
|
||||||
text = %displayName;
|
text = %displayName;
|
||||||
position = "0 0";
|
position = "0 0";
|
||||||
|
|
@ -785,6 +787,7 @@ function optionsMenuButton::onHighlighted(%this, %highlighted)
|
||||||
|
|
||||||
function addOptionEntry(%optionObj)
|
function addOptionEntry(%optionObj)
|
||||||
{
|
{
|
||||||
|
OptionsMenu.optsListCount++;
|
||||||
if(!isObject(%optionObj) || (%optionObj.class !$= "OptionsSettings" && %optionObj.class !$= "AudioOptionsSettings"))
|
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");
|
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";
|
class = "OptionsListEntry";
|
||||||
optionsObject = %optionObj;
|
optionsObject = %optionObj;
|
||||||
currentOptionIndex = %qualityLevelIndex;
|
currentOptionIndex = %qualityLevelIndex;
|
||||||
|
selectionID = OptionsMenu.optsListCount;
|
||||||
canSave = "0";
|
canSave = "0";
|
||||||
|
|
||||||
new GuiButtonCtrl() {
|
new GuiButtonCtrl() {
|
||||||
|
|
@ -862,6 +866,7 @@ function addOptionEntry(%optionObj)
|
||||||
text = "<";
|
text = "<";
|
||||||
profile = GuiMenuButtonProfile;
|
profile = GuiMenuButtonProfile;
|
||||||
internalName = "prevValButton";
|
internalName = "prevValButton";
|
||||||
|
command = "$MenuList.listPosition = $thisControl.getParent().getParent().selectionID; OptionMenuPrevSetting(1);";
|
||||||
};
|
};
|
||||||
|
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
|
|
@ -881,6 +886,7 @@ function addOptionEntry(%optionObj)
|
||||||
text = ">";
|
text = ">";
|
||||||
profile = GuiMenuButtonProfile;
|
profile = GuiMenuButtonProfile;
|
||||||
internalName = "nextValButton";
|
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)
|
function addOptionSlider(%optionName, %optionDesc, %prefName, %sliderMin, %sliderMax, %sliderTicks)
|
||||||
{
|
{
|
||||||
|
OptionsMenu.optsListCount++;
|
||||||
%currentVal = getVariable(%prefName);
|
%currentVal = getVariable(%prefName);
|
||||||
|
|
||||||
%tempVarName = %prefName @ "_tempVar";
|
%tempVarName = %prefName @ "_tempVar";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue