mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 05:15:34 +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
|
|
@ -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<ActionMap*>(*iter);
|
||||
if (!actionMap)
|
||||
continue;
|
||||
|
||||
menu->addEntry(actionMap->getName(), actionMap->getId());
|
||||
}
|
||||
|
||||
menu->sort();
|
||||
}
|
||||
|
||||
void GuiInspectorTypeActionMap::consoleInit()
|
||||
{
|
||||
Parent::consoleInit();
|
||||
|
||||
ConsoleBaseType::getType(TYPEID< ActionMap >())->setInspectorFieldType("GuiInspectorTypeActionMap");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GuiInspectorTypeCheckBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue