From 616d9742123d00ff3ea2e05f4d47b6982f870e75 Mon Sep 17 00:00:00 2001 From: Areloch Date: Wed, 6 Dec 2023 19:50:51 -0600 Subject: [PATCH] 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 --- .../source/gui/editor/guiInspectorTypes.cpp | 39 ++ Engine/source/gui/editor/guiInspectorTypes.h | 14 + Engine/source/gui/utility/guiInputCtrl.cpp | 18 + Engine/source/gui/utility/guiInputCtrl.h | 3 + .../rendering/scripts/graphicsOptions.tscript | 318 ++++++++------- Templates/BaseGame/game/data/UI/UI.tscript | 6 +- .../game/data/UI/guis/MainMenuButtons.tscript | 11 +- .../BaseGame/game/data/UI/guis/mainMenu.gui | 188 +++++---- .../game/data/UI/guis/mainMenu.tscript | 122 ++++-- .../game/data/UI/guis/optionsMenu.gui | 379 +++++++++--------- .../game/data/UI/guis/optionsMenu.tscript | 110 +++++ .../game/data/UI/scripts/profiles.tscript | 30 +- 12 files changed, 746 insertions(+), 492 deletions(-) diff --git a/Engine/source/gui/editor/guiInspectorTypes.cpp b/Engine/source/gui/editor/guiInspectorTypes.cpp index 8da27c273..7cb489163 100644 --- a/Engine/source/gui/editor/guiInspectorTypes.cpp +++ b/Engine/source/gui/editor/guiInspectorTypes.cpp @@ -40,6 +40,7 @@ #include "gui/editor/editorFunctions.h" #include "math/mEase.h" #include "math/mathTypes.h" +#include "sim/actionMap.h" //----------------------------------------------------------------------------- @@ -387,6 +388,44 @@ void GuiInspectorTypeGuiProfile::consoleInit() ConsoleBaseType::getType( TYPEID< GuiControlProfile >() )->setInspectorFieldType("GuiInspectorTypeGuiProfile"); } +//----------------------------------------------------------------------------- +// GuiInspectorTypeActionMap +//----------------------------------------------------------------------------- +IMPLEMENT_CONOBJECT(GuiInspectorTypeActionMap); + +ConsoleDocClass(GuiInspectorTypeActionMap, + "@brief Inspector field type for ActionMap\n\n" + "Editor use only.\n\n" + "@internal" +); + +void GuiInspectorTypeActionMap::_populateMenu(GuiPopUpMenuCtrl* menu) +{ + // Add the action maps to the menu. + //First add a blank entry so you can clear the action map + menu->addEntry("", 0); + + SimGroup* grp = Sim::getRootGroup(); + SimSetIterator iter(grp); + for (; *iter; ++iter) + { + ActionMap* actionMap = dynamic_cast(*iter); + if (!actionMap) + continue; + + menu->addEntry(actionMap->getName(), actionMap->getId()); + } + + menu->sort(); +} + +void GuiInspectorTypeActionMap::consoleInit() +{ + Parent::consoleInit(); + + ConsoleBaseType::getType(TYPEID< ActionMap >())->setInspectorFieldType("GuiInspectorTypeActionMap"); +} + //----------------------------------------------------------------------------- // GuiInspectorTypeCheckBox //----------------------------------------------------------------------------- diff --git a/Engine/source/gui/editor/guiInspectorTypes.h b/Engine/source/gui/editor/guiInspectorTypes.h index 31b21a186..d5cb90f93 100644 --- a/Engine/source/gui/editor/guiInspectorTypes.h +++ b/Engine/source/gui/editor/guiInspectorTypes.h @@ -186,6 +186,20 @@ public: virtual void _populateMenu( GuiPopUpMenuCtrl *menu ); }; +//----------------------------------------------------------------------------- +// GuiInspectorTypeActionMap Class +//----------------------------------------------------------------------------- +class GuiInspectorTypeActionMap : public GuiInspectorTypeMenuBase +{ +private: + typedef GuiInspectorTypeMenuBase Parent; +public: + DECLARE_CONOBJECT(GuiInspectorTypeActionMap); + static void consoleInit(); + + virtual void _populateMenu(GuiPopUpMenuCtrl* menu); +}; + //----------------------------------------------------------------------------- // GuiInspectorTypeCheckBox Class //----------------------------------------------------------------------------- diff --git a/Engine/source/gui/utility/guiInputCtrl.cpp b/Engine/source/gui/utility/guiInputCtrl.cpp index f5f41b486..31d2a2e86 100644 --- a/Engine/source/gui/utility/guiInputCtrl.cpp +++ b/Engine/source/gui/utility/guiInputCtrl.cpp @@ -64,6 +64,7 @@ GuiInputCtrl::GuiInputCtrl() mSendModifierEvents(false), mIgnoreMouseEvents(false) { + mActionmap = nullptr; } //------------------------------------------------------------------------------ @@ -80,6 +81,7 @@ void GuiInputCtrl::initPersistFields() "If true, Make events will be sent for modifier keys (Default false)."); addField("ignoreMouseEvents", TypeBool, Offset(mIgnoreMouseEvents, GuiInputCtrl), "If true, any events from mouse devices will be passed through."); + addField("actionMap", TYPEID(), Offset(mActionmap, GuiInputCtrl), "The name of an action map to push/pop on the input stack alongside the wake/sleep of this control."); endGroup("GuiInputCtrl"); Parent::initPersistFields(); @@ -103,6 +105,12 @@ bool GuiInputCtrl::onWake() if( !smDesignTime && !mIgnoreMouseEvents) mouseLock(); + + if(mActionmap != nullptr) + { + SimSet* actionMapSet = Sim::getActiveActionMapSet(); + actionMapSet->pushObject(mActionmap); + } setFirstResponder(); @@ -115,6 +123,13 @@ void GuiInputCtrl::onSleep() { Parent::onSleep(); mouseUnlock(); + + if (mActionmap != nullptr) + { + SimSet* actionMapSet = Sim::getActiveActionMapSet(); + actionMapSet->removeObject(mActionmap); + } + clearFirstResponder(); } @@ -158,6 +173,9 @@ bool GuiInputCtrl::onInputEvent( const InputEventInfo &event ) if (mIgnoreMouseEvents && event.deviceType == MouseDeviceType) return false; + if (mActionmap != nullptr) + return false; + char deviceString[32]; if ( event.action == SI_MAKE ) { diff --git a/Engine/source/gui/utility/guiInputCtrl.h b/Engine/source/gui/utility/guiInputCtrl.h index 269569693..5b87cc53f 100644 --- a/Engine/source/gui/utility/guiInputCtrl.h +++ b/Engine/source/gui/utility/guiInputCtrl.h @@ -26,6 +26,7 @@ #ifndef _GUIMOUSEEVENTCTRL_H_ #include "gui/utility/guiMouseEventCtrl.h" #endif +#include "sim/actionMap.h" /// A control that locks the mouse and reports all keyboard input events @@ -38,6 +39,8 @@ protected: bool mSendModifierEvents; bool mIgnoreMouseEvents; + ActionMap* mActionmap; + public: typedef GuiMouseEventCtrl Parent; diff --git a/Templates/BaseGame/game/core/rendering/scripts/graphicsOptions.tscript b/Templates/BaseGame/game/core/rendering/scripts/graphicsOptions.tscript index 19b7f50cd..681873a01 100644 --- a/Templates/BaseGame/game/core/rendering/scripts/graphicsOptions.tscript +++ b/Templates/BaseGame/game/core/rendering/scripts/graphicsOptions.tscript @@ -54,153 +54,199 @@ function GraphicsOptionsMenuGroup::applySetting(%this, %settingName) } } -new SimGroup( MeshQualityGroup ) -{ - class = "GraphicsOptionsMenuGroup"; - - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "High"; +//Primary Group(Video, Audio, Controls) +//Sub Grouping(Basic, Advanced, or Display, Graphics) - key["$pref::TS::detailAdjust"] = 1.5; - key["$pref::TS::skipRenderDLs"] = 0; - }; - new ArrayObject( ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Medium"; - - key["$pref::TS::detailAdjust"] = 1.0; - key["$pref::TS::skipRenderDLs"] = 0; - }; - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Low"; - - key["$pref::TS::detailAdjust"] = 0.75; - key["$pref::TS::skipRenderDLs"] = 0; - }; - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Lowest"; - - key["$pref::TS::detailAdjust"] = 0.5; - key["$pref::TS::skipRenderDLs"] = 1; - }; -}; - -new SimGroup( MeshDrawDistQualityGroup ) -{ - class = "GraphicsOptionsMenuGroup"; - - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "High"; - - key["$pref::useStaticObjectFade"] = false; - key["$pref::staticObjectFadeStart"] = 75; - key["$pref::staticObjectFadeEnd"] = 100; - key["$pref::staticObjectUnfadeableSize"] = 75; - - }; - new ArrayObject( ) - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Medium"; - - key["$pref::useStaticObjectFade"] = true; - key["$pref::staticObjectFadeStart"] = 75; - key["$pref::staticObjectFadeEnd"] = 100; - key["$pref::staticObjectUnfadeableSize"] = 75; - }; - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Low"; - - key["$pref::useStaticObjectFade"] = true; - key["$pref::staticObjectFadeStart"] = 50; - key["$pref::staticObjectFadeEnd"] = 75; - key["$pref::staticObjectUnfadeableSize"] = 100; - }; - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Lowest"; - - key["$pref::useStaticObjectFade"] = true; - key["$pref::staticObjectFadeStart"] = 25; - key["$pref::staticObjectFadeEnd"] = 50; - key["$pref::staticObjectUnfadeableSize"] = 200; - }; -}; - -new SimGroup( TextureQualityGroup ) +new SimGroup(VideoSettingsGroup) { - class = "GraphicsOptionsMenuGroup"; + class = "PrimaryOptionsGroup"; + displayName = "Video"; - new ArrayObject() + new SimGroup(BasicVideoSettingsGroup) { - class = "GraphicsQualityLevel"; - caseSensitive = true; + class = "SubOptionsGroup"; + displayName = "Basic"; - displayName = "High"; - - key["$pref::Video::textureReductionLevel"] = 0; - key["$pref::Reflect::refractTexScale"] = 1.25; - }; - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Medium"; - - key["$pref::Video::textureReductionLevel"] = 0; - key["$pref::Reflect::refractTexScale"] = 1; - }; - new ArrayObject() - { - class = "GraphicsQualityLevel"; - caseSensitive = true; - - displayName = "Low"; + new SimGroup() + { + class = "OptionsSettings"; + + OptionName = "Graphical Quality"; + Description = "Controls the general graphical quality"; + + new ArrayObject() + { + class = "OptionsQualityLevel"; + caseSensitive = true; - key["$pref::Video::textureReductionLevel"] = 1; - key["$pref::Reflect::refractTexScale"] = 0.75; + displayName = "High"; + + key["$pref::TS::detailAdjust"] = 1.5; + key["$pref::TS::skipRenderDLs"] = 0; + key["$pref::useStaticObjectFade"] = false; + key["$pref::staticObjectFadeStart"] = 75; + key["$pref::staticObjectFadeEnd"] = 100; + key["$pref::staticObjectUnfadeableSize"] = 75; + }; + }; }; - new ArrayObject() + + /*new SimGroup(AdvancedVideoSettingsGroup) { - class = "GraphicsQualityLevel"; - caseSensitive = true; + groupName = "Advanced"; - displayName = "Lowest"; - - key["$pref::Video::textureReductionLevel"] = 2; - key["$pref::Reflect::refractTexScale"] = 0.5; - }; + new SimGroup( MeshQualityGroup ) + { + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::TS::detailAdjust"] = 1.5; + key["$pref::TS::skipRenderDLs"] = 0; + }; + new ArrayObject( ) + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::TS::detailAdjust"] = 1.0; + key["$pref::TS::skipRenderDLs"] = 0; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::TS::detailAdjust"] = 0.75; + key["$pref::TS::skipRenderDLs"] = 0; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::TS::detailAdjust"] = 0.5; + key["$pref::TS::skipRenderDLs"] = 1; + }; + }; + + new SimGroup( MeshDrawDistQualityGroup ) + { + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::useStaticObjectFade"] = false; + key["$pref::staticObjectFadeStart"] = 75; + key["$pref::staticObjectFadeEnd"] = 100; + key["$pref::staticObjectUnfadeableSize"] = 75; + + }; + new ArrayObject( ) + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::useStaticObjectFade"] = true; + key["$pref::staticObjectFadeStart"] = 75; + key["$pref::staticObjectFadeEnd"] = 100; + key["$pref::staticObjectUnfadeableSize"] = 75; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::useStaticObjectFade"] = true; + key["$pref::staticObjectFadeStart"] = 50; + key["$pref::staticObjectFadeEnd"] = 75; + key["$pref::staticObjectUnfadeableSize"] = 100; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::useStaticObjectFade"] = true; + key["$pref::staticObjectFadeStart"] = 25; + key["$pref::staticObjectFadeEnd"] = 50; + key["$pref::staticObjectUnfadeableSize"] = 200; + }; + }; + + new SimGroup( TextureQualityGroup ) + { + class = "GraphicsOptionsMenuGroup"; + + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "High"; + + key["$pref::Video::textureReductionLevel"] = 0; + key["$pref::Reflect::refractTexScale"] = 1.25; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Medium"; + + key["$pref::Video::textureReductionLevel"] = 0; + key["$pref::Reflect::refractTexScale"] = 1; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Low"; + + key["$pref::Video::textureReductionLevel"] = 1; + key["$pref::Reflect::refractTexScale"] = 0.75; + }; + new ArrayObject() + { + class = "GraphicsQualityLevel"; + caseSensitive = true; + + displayName = "Lowest"; + + key["$pref::Video::textureReductionLevel"] = 2; + key["$pref::Reflect::refractTexScale"] = 0.5; + }; + }; + + };*/ }; +//Fields have display name, populated by group. Direct name association to the fieldset + new SimGroup( GroundCoverDensityGroup ) { class = "GraphicsOptionsMenuGroup"; diff --git a/Templates/BaseGame/game/data/UI/UI.tscript b/Templates/BaseGame/game/data/UI/UI.tscript index 3baad2bd5..455067910 100644 --- a/Templates/BaseGame/game/data/UI/UI.tscript +++ b/Templates/BaseGame/game/data/UI/UI.tscript @@ -41,7 +41,7 @@ function UI::initClient(%this) %this.queueExec("./scripts/profiles"); //Navigation Utility Scripts - %this.queueExec("./scripts/menuNavigation"); + //%this.queueExec("./scripts/menuNavigation"); //Now gui files %this.queueExec("./scripts/menuInputHandling"); @@ -49,8 +49,8 @@ function UI::initClient(%this) %this.queueExec("./guis/mainMenu"); %this.queueExec("./guis/mainMenu.gui"); - %this.queueExec("./guis/mainMenuButtons"); - %this.queueExec("./guis/mainMenuButtons.gui"); + //%this.queueExec("./guis/mainMenuButtons"); + //%this.queueExec("./guis/mainMenuButtons.gui"); %this.queueExec("./guis/chooseLevelDlg"); %this.queueExec("./guis/chooseLevelDlg.gui"); diff --git a/Templates/BaseGame/game/data/UI/guis/MainMenuButtons.tscript b/Templates/BaseGame/game/data/UI/guis/MainMenuButtons.tscript index be79f9dd3..1a79ff5fb 100644 --- a/Templates/BaseGame/game/data/UI/guis/MainMenuButtons.tscript +++ b/Templates/BaseGame/game/data/UI/guis/MainMenuButtons.tscript @@ -94,16 +94,7 @@ function openJoinServerMenu() MainMenuGui.pushPage(JoinServerMenu); } -function openOptionsMenu() -{ - //Here, like the other commands, we add a new page onto the stack - //In this case, we'll push the OptionsMenu control onto the stack. This will - //invoke the canClose() and then onClose() functions for MainMenuButtonList - //before calling the onOpen() for OptionsMenu then displaying. - //The options menu additionally has an example of why we may want to capitalize on the - //canClose() call. - MainMenuGui.pushPage(OptionsMenu); -} + function openWorldEditorBtn() { diff --git a/Templates/BaseGame/game/data/UI/guis/mainMenu.gui b/Templates/BaseGame/game/data/UI/guis/mainMenu.gui index 69ceaf317..7d6374594 100644 --- a/Templates/BaseGame/game/data/UI/guis/mainMenu.gui +++ b/Templates/BaseGame/game/data/UI/guis/mainMenu.gui @@ -1,40 +1,41 @@ //--- OBJECT WRITE BEGIN --- $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { BitmapAsset = "UI:backgrounddark_image"; - extent = "1024 768"; + extent = "1280 720"; minExtent = "8 8"; horizSizing = "width"; vertSizing = "height"; profile = "GuiDefaultProfile"; tooltipProfile = "GuiToolTipProfile"; isContainer = "1"; - superClass = "UINavigation"; - canSaveDynamicFields = "0"; - + canSaveDynamicFields = "1"; + + new GuiInputCtrl(MainMenuInputHandler) { + sendAxisEvents = "0"; + sendBreakEvents = "0"; + ignoreMouseEvents = "1"; + position = "-50 0"; + extent = "2186 851"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiInputCtrlProfile"; + tooltipProfile = "GuiToolTipProfile"; + //class = "MenuInputHandler"; + actionMap = MainMenuActionMap; + }; new GuiBitmapCtrl(SideBackgroundImage) { - bitmapAsset = "UI:menu_side_background_image"; - color = "255 255 255 255"; - wrap = "0"; - position = "0 0"; + BitmapAsset = "UI:menu_side_background_image"; + position = "0 -48"; extent = "900 600"; - minExtent = "8 2"; - horizSizing = "right"; vertSizing = "top"; profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; }; - new GuiBitmapCtrl(MainMenuAppLogo) { BitmapAsset = "UI:Torque_3D_logo_image"; - position = "550 30"; + position = "462 30"; extent = "360 100"; - horizSizing = "left"; + horizSizing = "center"; profile = "GuiDefaultProfile"; tooltipProfile = "GuiToolTipProfile"; canSaveDynamicFields = "1"; @@ -46,98 +47,95 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { useModifiers = "0"; useStates = "1"; }; - new GuiControl(MainMenuButtonHolder) { - position = "143 711"; - extent = "736 40"; - horizSizing = "center"; + new GuiPanel(MainMenuButtonPanel) { + position = "0 683"; + extent = "1281 40"; + horizSizing = "width"; vertSizing = "top"; + profile = "GuiMenuPanelProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiIconButtonCtrl(MainMenuGoButton) { + BitmapAsset = "UI:Keyboard_Black_Return_image"; + sizeIconToButton = "1"; + makeIconSquare = "1"; + textLocation = "Center"; + text = "Go"; + position = "1115 0"; + extent = "140 40"; + horizSizing = "left"; + vertSizing = "center"; + profile = "GuiMenuButtonProfile"; + command = "activateSelected();"; + tooltipProfile = "GuiToolTipProfile"; + }; + }; + new GuiStackControl(MainMenuButtonList) { + padding = "5"; + dynamicSize = "0"; + position = "440 185"; + extent = "400 322"; + horizSizing = "center"; + vertSizing = "center"; profile = "GuiDefaultProfile"; tooltipProfile = "GuiToolTipProfile"; - isContainer = "1"; - class = "MenuInputButtonContainer"; + superClass = "MenuList"; - new GuiIconButtonCtrl() { - BitmapAsset = "UI:Keyboard_Black_Return_image"; - sizeIconToButton = "1"; - makeIconSquare = "1"; - textLocation = "Right"; - text = "Go"; - position = "11 0"; - extent = "140 40"; + new GuiButtonCtrl(MainMenuSinglePlayerBtn) { + text = "Single Player"; + extent = "400 40"; profile = "GuiMenuButtonProfile"; - command = "MainMenuButtonList.activate();"; + command = "openSinglePlayerMenu();"; tooltipProfile = "GuiToolTipProfile"; - internalName = "button1"; - class = "MenuInputButton"; }; - new GuiIconButtonCtrl() { - BitmapAsset = "UI:Keyboard_Black_Return_image"; - sizeIconToButton = "1"; - makeIconSquare = "1"; - textLocation = "Right"; - text = "Go"; - position = "155 0"; - extent = "140 40"; + new GuiButtonCtrl(MainMenuCreateSrvrBtn) { + text = "Create Server"; + position = "0 45"; + extent = "400 40"; profile = "GuiMenuButtonProfile"; - command = "MainMenuButtonList.activate();"; + command = "openMultiPlayerMenu();"; tooltipProfile = "GuiToolTipProfile"; - internalName = "button2"; - class = "MenuInputButton"; }; - new GuiIconButtonCtrl() { - BitmapAsset = "UI:Keyboard_Black_Return_image"; - sizeIconToButton = "1"; - makeIconSquare = "1"; - textLocation = "Right"; - text = "Go"; - position = "299 0"; - extent = "140 40"; + new GuiButtonCtrl(MainMenuJoinSrvrBtn) { + text = "Join Server"; + position = "0 90"; + extent = "400 40"; profile = "GuiMenuButtonProfile"; - command = "MainMenuButtonList.activate();"; + command = "openJoinServerMenu();"; tooltipProfile = "GuiToolTipProfile"; - internalName = "button3"; - class = "MenuInputButton"; }; - new GuiIconButtonCtrl() { - BitmapAsset = "UI:Keyboard_Black_Return_image"; - sizeIconToButton = "1"; - makeIconSquare = "1"; - textLocation = "Right"; - text = "Go"; - position = "443 0"; - extent = "140 40"; + new GuiButtonCtrl(MainMenuOptionBtn) { + text = "Options"; + position = "0 135"; + extent = "400 40"; profile = "GuiMenuButtonProfile"; - command = "MainMenuButtonList.activate();"; + command = "Canvas.pushDialog(OptionsMenu);"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiButtonCtrl(MainMenuWorldEditBtn) { + text = "Open World Editor (F11)"; + position = "0 180"; + extent = "400 40"; + profile = "GuiMenuButtonProfile"; + command = "openWorldEditorBtn();"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiButtonCtrl(MainMenuGuiEditBtn) { + text = "Open GUI Editor (F10)"; + position = "0 225"; + extent = "400 40"; + profile = "GuiMenuButtonProfile"; + command = "openGUIEditorBtn();"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiButtonCtrl(MainMenuExitBtn) { + text = "Exit"; + position = "0 270"; + extent = "400 40"; + profile = "GuiMenuButtonProfile"; + command = "quit();"; tooltipProfile = "GuiToolTipProfile"; - internalName = "button4"; - class = "MenuInputButton"; - }; - new GuiIconButtonCtrl() { - BitmapAsset = "UI:Keyboard_Black_Return_image"; - sizeIconToButton = "1"; - makeIconSquare = "1"; - textLocation = "Right"; - text = "Go"; - position = "587 0"; - extent = "140 40"; - profile = "GuiMenuButtonProfile"; - command = "MainMenuButtonList.activate();"; - tooltipProfile = "GuiToolTipProfile"; - internalName = "button5"; - class = "MenuInputButton"; }; - }; - new GuiInputCtrl(MainMenuInputHandler) { - sendAxisEvents = "1"; - sendBreakEvents = "1"; - ignoreMouseEvents = "1"; - position = "-50 0"; - extent = "10 10"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiInputCtrlProfile"; - tooltipProfile = "GuiToolTipProfile"; - class = "MenuInputHandler"; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript b/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript index ec4fa44f7..9ec352dc1 100644 --- a/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript +++ b/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript @@ -1,52 +1,90 @@ function MainMenuGui::onAdd(%this) { - $activeControllerName = "K&M"; //default input type } function MainMenuGui::onWake(%this) { - //In the BaseUI example case, the MainMenuGUI acts as our background - //So it's a logical control to set as our UINavigation as well. So we - //set the MainMenuGUI's superClass to UINavigation to integrate it into - //that namespace to open up page navigation - - //At the same time, the MainMenuGUI control has the button holder, set to - //the MenuInputButtonContainer class, allowing us to set it as the active button - //holder here, prepping it for catching any button inputs to active commands - //Specifically, it sets the $activeMenuButtonContainer to be this, which allows - //other controls to manage what the behavior of the buttons is consistently - //without needing to worry about hardcoded names - MainMenuButtonHolder.setActive(); - - //We also have the MainMenuInputHandler, a GuiInputCtrl with the MenuInputHandler class - //This allows us to catch any input/axis event and pass it along to the active menuList - //or button containers to navigate the menus - //We set up this catch by making said control our first responder, here - MainMenuInputHandler.setFirstResponder(); - - //We also go ahead and mark for any future pages being added to the UINavigation's page stack - //to be prompted to resize when added. This isn't required, but helps keep pages formated to - //the current size of the UINavigation, which is useful when dealing with aspect ratio or resolution - //changes. - %this.resizePages = true; - //Lastly, we go ahead and display some actual navigable content up on our main menu here - //In this case, we set the MainMenuButtons as our root page, so we always come back - //to having the main menu buttons on screen if every other page is closed. - //This will ultimately call MainMenuButtons::onOpen(), so to see where the navigation - //chain continues, see that function. - %this.setRootPage(MainMenuButtons); - - %this.refreshPage(); + MainMenuButtonList.listPosition = 0; } -function MainMenuButtonHolder::onWake(%this) +if(!isObject( MainMenuActionMap ) ) { - //Because the blan slate MainMenuGUI doesn't have anything we need to bother with inputs on - //we just go ahead and disable all the buttons in our MainMenuButtonHolder to have - // a clean slate - %this-->button1.disable(); - %this-->button2.disable(); - %this-->button3.disable(); - %this-->button4.disable(); - %this-->button5.disable(); + new ActionMap(MainMenuActionMap){}; + + MainMenuActionMap.bind( keyboard, w, mainMenuNavigateUp ); + MainMenuActionMap.bind( keyboard, s, mainMenuNavigateDown ); + MainMenuActionMap.bind( gamepad, yaxis, "D", "-0.23 0.23", mainMenuStickNavigate ); + MainMenuActionMap.bind( gamepad, upov, mainMenuNavigateUp ); + MainMenuActionMap.bind( gamepad, dpov, mainMenuNavigateDown ); + + MainMenuActionMap.bind( keyboard, Enter, activateSelected ); + MainMenuActionMap.bind( gamepad, btn_a, activateSelected ); +} + +function mainMenuNavigateUp(%val) +{ + if(%val) + { + MainMenuButtonList.listPosition -= 1; + if(MainMenuButtonList.listPosition < 0) + MainMenuButtonList.listPosition = 0; + + MainMenuGUI.syncGUI(); + } +} + +function mainMenuNavigateDown(%val) +{ + if(%val) + { + MainMenuButtonList.listPosition += 1; + if(MainMenuButtonList.listPosition >= MainMenuButtonList.getCount()) + MainMenuButtonList.listPosition = MainMenuButtonList.getCount()-1; + + MainMenuGUI.syncGUI(); + } +} + +function mainMenuStickNavigate(%val) +{ + if(%val == -1) + mainMenuNavigateUp(1); + else if(%val == 1) + mainMenuNavigateDown(1); +} + +function MainMenuGUI::syncGUI(%this) +{ + MainMenuButtonList.callOnChildren("setHighlighted", false); + + %btn = MainMenuButtonList.getObject(MainMenuButtonList.listPosition); + %btn.setHighlighted(true); + + // + //Update the button imagery to comply to the last input device we'd used + %device = Canvas.getLastInputDevice(); + if(%device $= "mouse") + %device = "keyboard"; + + %binding = MainMenuActionMap.getBinding("activateSelected"); + + %bindingCount = getFieldCount(%binding); + for(%i=0; %i < %bindingCount; %i+=2) + { + %mapDevice = stripTrailingNumber(getField(%binding, %i)); + if(%mapDevice $= %device) + { + %button = getField(%binding, %i+1); + break; + } + } + + %assetId = getButtonBitmap(%device, %button); + MainMenuGoButton.setBitmap(%assetId); +} + +function activateSelected() +{ + %btn = MainMenuButtonList.getObject(MainMenuButtonList.listPosition); + %btn.performClick(); } \ No newline at end of file diff --git a/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui b/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui index 8a85fd848..33eae9db5 100644 --- a/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui +++ b/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui @@ -1,226 +1,211 @@ //--- OBJECT WRITE BEGIN --- -$guiContent = new GuiControl(OptionsMenu) { - extent = "1024 768"; - profile = "GuiNonModalDefaultProfile"; - tooltipProfile = "GuiToolTipProfile"; - isContainer = "1"; +$guiContent = new GuiChunkedBitmapCtrl(OptionsMenu) { + BitmapAsset = "UI:backgrounddark_image"; + extent = "1280 720"; + minExtent = "8 8"; horizSizing = "width"; vertSizing = "height"; - canSaveDynamicFields = "0"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + isContainer = "1"; + canSaveDynamicFields = "1"; + currentCategory = "Graphics"; + optionsCategories = "17233"; + unappliedChanges = "17234"; new GuiControl(OptionsMenuContainer) { - position = "48 56"; - extent = "928 655"; + position = "208 32"; + extent = "870 655"; horizSizing = "aspectCenter"; vertSizing = "center"; profile = "GuiDefaultProfile"; tooltipProfile = "GuiToolTipProfile"; isContainer = "1"; + }; + new GuiInputCtrl(MainMenuInputHandler) { + ignoreMouseEvents = "1"; + ActionMap = "MainMenuActionMap"; + position = "-49 0"; + extent = "2186 851"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiInputCtrlProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiStackControl(OptionsMenuCategoryList) { + stackingType = "Horizontal"; + padding = "10"; + dynamicSize = "0"; + position = "398 80"; + extent = "471 40"; + horizSizing = "center"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + superClass = "MenuList"; - new GuiBitmapBarCtrl() { - BitmapAsset = "UI:panel_low_image"; - position = "0 40"; - extent = "927 618"; - horizSizing = "width"; - profile = "GuiDefaultProfile"; + new GuiButtonCtrl() { + text = "Video"; + extent = "100 40"; + profile = "GuiMenuButtonProfile"; + command = "populateDisplaySettingsList();"; tooltipProfile = "GuiToolTipProfile"; }; - new GuiBitmapBarCtrl() { - BitmapAsset = "UI:panel_image"; - extent = "927 40"; - horizSizing = "width"; - profile = "GuiDefaultProfile"; + new GuiButtonCtrl() { + text = "Audio"; + position = "110 0"; + extent = "100 40"; + profile = "GuiMenuButtonProfile"; + command = "populateAudioSettingsList();"; tooltipProfile = "GuiToolTipProfile"; }; + new GuiButtonCtrl() { + text = "Keyboard & Mouse"; + position = "220 0"; + extent = "140 40"; + profile = "GuiMenuButtonProfile"; + command = "populateKeyboardMouseSettingsList();"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiButtonCtrl() { + text = "Gamepad"; + position = "370 0"; + extent = "100 40"; + profile = "GuiMenuButtonProfile"; + command = "populateGamepadSettingsList();"; + tooltipProfile = "GuiToolTipProfile"; + }; + }; + new GuiScrollCtrl(OptionsMenuSettingsScroll) { + hScrollBar = "alwaysOff"; + vScrollBar = "dynamic"; + position = "331 128"; + extent = "618 555"; + horizSizing = "center"; + vertSizing = "height"; + profile = "GuiMenuScrollProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiStackControl(VideoSettingsList) { + padding = "5"; + changeChildSizeToFit = "0"; + position = "1 1"; + extent = "603 245"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + superClass = "MenuList"; + visible = true; + }; + new GuiStackControl(AudioSettingsList) { + padding = "5"; + changeChildSizeToFit = "0"; + position = "1 1"; + extent = "603 245"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + superClass = "MenuList"; + visible = false; + }; + new GuiStackControl(ControlSettingsList) { + padding = "5"; + changeChildSizeToFit = "0"; + position = "1 1"; + extent = "603 245"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + superClass = "MenuList"; + visible = false; + }; + }; + new GuiPanel(OptionMenuTitlePanel) { + extent = "1281 80"; + horizSizing = "width"; + profile = "GuiMenuPanelProfile"; + tooltipProfile = "GuiToolTipProfile"; + new GuiTextCtrl() { text = "OPTIONS"; - position = "22 7"; + position = "22 23"; extent = "220 28"; profile = "MenuHeaderText"; tooltipProfile = "GuiToolTipProfile"; }; - new GuiTextCtrl(OptionName) { - position = "3 606"; - extent = "293 17"; - horizSizing = "width"; - profile = "MenuSubHeaderText"; + }; + new GuiPanel(MainMenuButtonPanel) { + position = "0 683"; + extent = "1281 40"; + horizSizing = "width"; + vertSizing = "top"; + profile = "GuiMenuPanelProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiIconButtonCtrl() { + BitmapAsset = "UI:Keyboard_Black_Return_image"; + sizeIconToButton = "1"; + makeIconSquare = "1"; + textLocation = "Center"; + text = "Apply"; + position = "1115 0"; + extent = "140 40"; + horizSizing = "left"; + vertSizing = "center"; + profile = "GuiMenuButtonProfile"; + command = "MainMenuSelectButton(1);"; tooltipProfile = "GuiToolTipProfile"; + internalName = "button4"; + class = "MenuInputButton"; }; - new GuiMLTextCtrl(OptionDescription) { - text = "This is a placeholder text for an option."; - position = "3 625"; - extent = "293 14"; - horizSizing = "width"; - profile = "GuiMLTextProfile"; + new GuiIconButtonCtrl() { + BitmapAsset = "UI:Keyboard_Black_Escape_image"; + sizeIconToButton = "1"; + makeIconSquare = "1"; + textLocation = "Center"; + text = "Back"; + position = "16 0"; + extent = "140 40"; + horizSizing = "left"; + vertSizing = "center"; + profile = "GuiMenuButtonProfile"; + command = "MainMenuSelectButton(1);"; tooltipProfile = "GuiToolTipProfile"; - }; - new GuiSplitContainer() { - splitPoint = "250 100"; - fixedPanel = "FirstPanel"; - fixedSize = "250"; - position = "0 48"; - extent = "928 555"; - horizSizing = "width"; - profile = "GuiMenuScrollProfile"; - tooltipProfile = "GuiToolTipProfile"; - - new GuiPanel() { - docking = "Client"; - extent = "248 555"; - profile = "GuiOverlayProfile"; - tooltipProfile = "GuiToolTipProfile"; - internalName = "Panel1"; - - new GuiStackControl(OptionsMenuCategoryList) { - padding = "10"; - dynamicSize = "0"; - extent = "248 555"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiDefaultProfile"; - tooltipProfile = "GuiToolTipProfile"; - superClass = "MenuList"; - - new GuiButtonCtrl() { - text = "Display"; - extent = "248 35"; - profile = "GuiMenuButtonProfile"; - command = "populateDisplaySettingsList();"; - tooltipProfile = "GuiToolTipProfile"; - }; - new GuiButtonCtrl() { - text = "Graphics"; - position = "0 45"; - extent = "248 35"; - profile = "GuiMenuButtonProfile"; - command = "populateGraphicsSettingsList();"; - tooltipProfile = "GuiToolTipProfile"; - }; - new GuiButtonCtrl() { - text = "Audio"; - position = "0 90"; - extent = "248 35"; - profile = "GuiMenuButtonProfile"; - command = "populateAudioSettingsList();"; - tooltipProfile = "GuiToolTipProfile"; - }; - new GuiButtonCtrl() { - text = "Keyboard & Mouse"; - position = "0 135"; - extent = "248 35"; - profile = "GuiMenuButtonProfile"; - command = "populateKeyboardMouseSettingsList();"; - tooltipProfile = "GuiToolTipProfile"; - }; - new GuiButtonCtrl() { - text = "Gamepad"; - position = "0 180"; - extent = "248 35"; - profile = "GuiMenuButtonProfile"; - command = "populateGamepadSettingsList();"; - tooltipProfile = "GuiToolTipProfile"; - }; - new GuiButtonCtrl() { - text = "Example Options"; - position = "0 225"; - extent = "248 35"; - profile = "GuiMenuButtonProfile"; - command = "testExampleOptions();"; - tooltipProfile = "GuiToolTipProfile"; - }; - }; - }; - new GuiPanel() { - docking = "Client"; - position = "252 0"; - extent = "676 555"; - profile = "GuiOverlayProfile"; - tooltipProfile = "GuiToolTipProfile"; - internalName = "panel2"; - - new GuiScrollCtrl(OptionsMenuSettingsScroll) { - hScrollBar = "alwaysOff"; - vScrollBar = "dynamic"; - extent = "676 554"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiMenuScrollProfile"; - tooltipProfile = "GuiToolTipProfile"; - - new GuiStackControl(OptionsMenuSettingsList) { - padding = "5"; - changeChildSizeToFit = "0"; - position = "1 1"; - extent = "661 170"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiDefaultProfile"; - tooltipProfile = "GuiToolTipProfile"; - superClass = "MenuList"; - new GuiGameSettingsCtrl() { - PreviousBitmapAsset = "UI:previousOption_n_image"; - NextBitmapAsset = "UI:nextOption_n_image"; - columnSplit = "198"; - useMouseEvents = "1"; - extent = "661 30"; - horizSizing = "width"; - profile = "GuiMenuButtonProfile"; - tooltipProfile = "GuiToolTipProfile"; - class = "MenuOptionsButton"; - }; - new GuiGameSettingsCtrl() { - PreviousBitmapAsset = "UI:previousOption_n_image"; - NextBitmapAsset = "UI:nextOption_n_image"; - columnSplit = "198"; - useMouseEvents = "1"; - position = "0 35"; - extent = "661 30"; - horizSizing = "width"; - profile = "GuiMenuButtonProfile"; - tooltipProfile = "GuiToolTipProfile"; - class = "MenuOptionsButton"; - }; - new GuiGameSettingsCtrl() { - PreviousBitmapAsset = "UI:previousOption_n_image"; - NextBitmapAsset = "UI:nextOption_n_image"; - columnSplit = "198"; - useMouseEvents = "1"; - position = "0 70"; - extent = "661 30"; - horizSizing = "width"; - profile = "GuiMenuButtonProfile"; - tooltipProfile = "GuiToolTipProfile"; - class = "MenuOptionsButton"; - }; - new GuiGameSettingsCtrl() { - PreviousBitmapAsset = "UI:previousOption_n_image"; - NextBitmapAsset = "UI:nextOption_n_image"; - columnSplit = "198"; - useMouseEvents = "1"; - position = "0 105"; - extent = "661 30"; - horizSizing = "width"; - profile = "GuiMenuButtonProfile"; - tooltipProfile = "GuiToolTipProfile"; - class = "MenuOptionsButton"; - }; - new GuiGameSettingsCtrl() { - PreviousBitmapAsset = "UI:previousOption_n_image"; - NextBitmapAsset = "UI:nextOption_n_image"; - columnSplit = "198"; - useMouseEvents = "1"; - position = "0 140"; - extent = "661 30"; - horizSizing = "width"; - profile = "GuiMenuButtonProfile"; - tooltipProfile = "GuiToolTipProfile"; - class = "MenuOptionsButton"; - }; - }; - }; + internalName = "button4"; + class = "MenuInputButton"; }; }; - + new GuiIconButtonCtrl() { + BitmapAsset = "UI:Keyboard_Black_E_image"; + iconLocation = "Center"; + sizeIconToButton = "1"; + makeIconSquare = "1"; + position = "899 80"; + extent = "50 40"; + horizSizing = "left"; + vertSizing = "center"; + profile = "GuiMenuButtonProfile"; + command = "MainMenuSelectButton(1);"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "button4"; + class = "MenuInputButton"; + }; + new GuiIconButtonCtrl() { + BitmapAsset = "UI:Keyboard_Black_Q_image"; + iconLocation = "Center"; + sizeIconToButton = "1"; + makeIconSquare = "1"; + position = "331 80"; + extent = "50 40"; + horizSizing = "left"; + vertSizing = "center"; + profile = "GuiMenuButtonProfile"; + command = "MainMenuSelectButton(1);"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "button4"; + class = "MenuInputButton"; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript b/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript index a8db2ba83..5bdc09e92 100644 --- a/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript +++ b/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript @@ -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; +} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/UI/scripts/profiles.tscript b/Templates/BaseGame/game/data/UI/scripts/profiles.tscript index 16d2caa45..8a3e1fa9e 100644 --- a/Templates/BaseGame/game/data/UI/scripts/profiles.tscript +++ b/Templates/BaseGame/game/data/UI/scripts/profiles.tscript @@ -87,27 +87,32 @@ if( !isObject( GuiMenuButtonProfile ) ) new GuiControlProfile( GuiMenuButtonProfile ) { opaque = true; - border = true; + border = false; fontSize = 18; fontType = "Arial Bold"; - fontColor = $TextMediumEmphasisColor; - fontColorHL = $TextMediumEmphasisColor; - fontColorNA = $TextDisabledColor; - fontColorSEL = $TextMediumEmphasisColor; - fillColor = "40 40 40"; - fillColorHL = "49 34 37"; + fontColor = "200 200 200 255"; + fontColorHL = "0 0 0 255"; + fontColorNA = "108 108 108 255"; + fontColorSEL = "200 200 200 255"; + fillColor = "0 0 0 0"; + fillColorHL = "255 255 255 255"; fillColorNA = "40 40 40"; borderColor = "87 87 87"; borderColorNA = "0 0 0"; borderColorHL = "194 64 64"; - fixedExtent = false; + fixedExtent = 0; justify = "center"; canKeyFocus = false; //bitmapAsset = "UI:menu_button_image"; hasBitmapArray = false; soundButtonDown = "UI:buttonClick"; soundButtonOver = "UI:buttonHover"; - category = "Core"; + category = "BaseUI"; + fontColors[0] = "200 200 200 255"; + fontColors[2] = "108 108 108 255"; + fontColors[3] = "200 200 200 255"; + fontColors[5] = "Magenta"; + fontColorLinkHL = "Magenta"; }; if( !isObject( GuiHighlightMenuButtonProfile ) ) @@ -555,3 +560,10 @@ singleton GuiControlProfile(SliderBitmapGUIProfile) opaque = false; borderColor = "0 0 0 255"; }; + +singleton GuiControlProfile(GuiMenuPanelProfile) +{ + category = "BaseUI"; + opaque = true; + fillcolor = "15 15 15 255"; +};