mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
Implements the right-mouse popup menus in the editor in SDL to make it match to Windows.
This commit is contained in:
parent
95c0bcd411
commit
818b617972
5 changed files with 442 additions and 26 deletions
29
Engine/source/platformSDL/menus/guiPlatformGenericMenuBar.h
Normal file
29
Engine/source/platformSDL/menus/guiPlatformGenericMenuBar.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include "gui/editor/guiMenuBar.h"
|
||||
#include "platformSDL/menus/PlatformSDLPopupMenuData.h"
|
||||
#include "platform/menus/popupMenu.h"
|
||||
|
||||
class GuiPlatformGenericMenuBar : public GuiMenuBar
|
||||
{
|
||||
typedef GuiMenuBar Parent;
|
||||
public:
|
||||
DECLARE_CONOBJECT(GuiPlatformGenericMenuBar);
|
||||
|
||||
virtual void menuItemSelected(Menu *menu, MenuItem *item)
|
||||
{
|
||||
AssertFatal(menu && item, "");
|
||||
|
||||
PopupMenu *popupMenu = PlatformPopupMenuData::mMenuMap[menu];
|
||||
AssertFatal(popupMenu, "");
|
||||
|
||||
popupMenu->handleSelect(item->id);
|
||||
|
||||
Parent::menuItemSelected(menu, item);
|
||||
}
|
||||
|
||||
protected:
|
||||
/// menu id / item id
|
||||
Map<CompoundKey<U32, U32>, String> mCmds;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue