mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Wipwork for updating the BaseUI
Adds ability to select an actionmap for a GuiInputCtrl which will push it onto the stack, so menus can enact an action map Update of the MainMenuGUI to fit new style and have the logic needed for KBM and gamepad navigation Very early wipwork of OptionsMenu overhaul for new standard
This commit is contained in:
parent
97de2e6b60
commit
616d974212
12 changed files with 746 additions and 492 deletions
|
|
@ -72,6 +72,49 @@ function OptionsMenu::onAdd(%this)
|
|||
callOnModules("populateOptionsMenuCategories", "Game");
|
||||
}
|
||||
|
||||
function OptionsMenu::onWake(%this)
|
||||
{
|
||||
VideoSettingsList.clear();
|
||||
|
||||
for(%i=0; %i < VideoSettingsGroup.getCount(); %i++)
|
||||
{
|
||||
%setting = VideoSettingsGroup.getObject(%i);
|
||||
|
||||
echo(" OptionsMenu::onWake() - video: " @ %setting.class);
|
||||
if(%setting.class $= "SubOptionsGroup")
|
||||
{
|
||||
%entry = addOptionGroup();
|
||||
%entry.text = %setting.displayName;
|
||||
|
||||
if(isObject(%entry))
|
||||
VideoSettingsList.add(%entry);
|
||||
|
||||
for(%s=0; %s < %setting.getCount(); %s++)
|
||||
{
|
||||
%option = %setting.getObject(%s);
|
||||
|
||||
%optionsEntry = addOptionEntry();
|
||||
%optionsEntry-->optionName.text = %option.OptionName;
|
||||
%optionsEntry-->optionDescription.text = %option.Description;
|
||||
%optionsEntry-->optionValue.text = %option.getObject(0).displayName;
|
||||
|
||||
if(isObject(%optionsEntry))
|
||||
VideoSettingsList.add(%optionsEntry);
|
||||
}
|
||||
}
|
||||
else if(%setting.class $= "OptionsSettings")
|
||||
{
|
||||
%entry = addOptionEntry();
|
||||
%entry-->optionName.text = %setting.displayName;
|
||||
%entry-->optionDescription.text = %setting.description;
|
||||
%entry-->optionValue.text = %setting.getObject(0).displayName;
|
||||
|
||||
if(isObject(%entry))
|
||||
VideoSettingsList.add(%entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OptionsMenu::onOpen(%this)
|
||||
{
|
||||
OptionsMenuCategoryList.clear();
|
||||
|
|
@ -1179,3 +1222,70 @@ function addKeybindOption(%label, %description, %bitmapName, %callback, %enabled
|
|||
|
||||
OptionsMenuSettingsList.addSliderRow(%label, %bitmapName, %callback, %enabled, %description);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
function addOptionGroup()
|
||||
{
|
||||
%group = new GuiTextCtrl() {
|
||||
text = "Graphics";
|
||||
position = "0 0";
|
||||
extent = "500 30";
|
||||
profile = "MenuHeaderText";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
|
||||
return %group;
|
||||
|
||||
}
|
||||
|
||||
function addOptionEntry()
|
||||
{
|
||||
%entry = new GuiContainer() {
|
||||
position = "0 0";
|
||||
extent = "500 40";
|
||||
profile = "GuiMenuPanelProfile";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "";
|
||||
position = "1 -1";
|
||||
extent = "250 20";
|
||||
profile = "MenuSubHeaderText";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
internalName = "optionName";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Sets the resolution and detail of shadows";
|
||||
position = "1 17";
|
||||
extent = "250 18";
|
||||
profile = "GuiMLTextProfile";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
internalName = "optionDescription";
|
||||
};
|
||||
|
||||
new GuiContainer() {
|
||||
position = "250 0";
|
||||
extent = "250 40";
|
||||
profile = GuiModelessDialogProfile;
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "height";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "< High >";
|
||||
position = "180 0";
|
||||
extent = "70 40";
|
||||
profile = "GuiMenuTextProfile";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "center";
|
||||
internalName = "optionValue";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return %entry;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue