mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 13:25:36 +00:00
Refactors the Popup menus and GuiMenuBars to remove unneeded duplication and platform-specific/deprecated code.
This commit is contained in:
parent
48f50d19c3
commit
253dd02096
29 changed files with 1343 additions and 5870 deletions
|
|
@ -42,6 +42,7 @@ class GuiPopupMenuBackgroundCtrl;
|
|||
class GuiPopupMenuTextListCtrl : public GuiTextListCtrl
|
||||
{
|
||||
friend class GuiPopupMenuBackgroundCtrl;
|
||||
friend class PopupMenu;
|
||||
|
||||
private:
|
||||
typedef GuiTextListCtrl Parent;
|
||||
|
|
@ -51,10 +52,12 @@ private:
|
|||
public:
|
||||
bool isSubMenu; // Indicates that this text list is in a submenu
|
||||
Point2I maxBitmapSize;
|
||||
GuiMenuBar::Menu* mMenu;
|
||||
|
||||
GuiMenuBar* mMenuBar;
|
||||
PopupMenu* mPopup;
|
||||
|
||||
S32 mLastHighlightedMenuIdx;
|
||||
|
||||
GuiPopupMenuTextListCtrl();
|
||||
|
||||
// GuiControl overloads:
|
||||
|
|
@ -70,16 +73,21 @@ class GuiPopupMenuBackgroundCtrl : public GuiControl
|
|||
{
|
||||
typedef GuiControl Parent;
|
||||
|
||||
protected:
|
||||
GuiPopupMenuTextListCtrl *mTextList;
|
||||
|
||||
public:
|
||||
GuiPopupMenuBackgroundCtrl(GuiPopupMenuTextListCtrl* textList);
|
||||
GuiPopupMenuBackgroundCtrl();
|
||||
void onMouseDown(const GuiEvent &event);
|
||||
void onMouseUp(const GuiEvent &event);
|
||||
void onMouseMove(const GuiEvent &event);
|
||||
void onMouseDragged(const GuiEvent &event);
|
||||
|
||||
void close();
|
||||
|
||||
void clearPopups();
|
||||
|
||||
S32 findPopupMenu(PopupMenu* menu);
|
||||
|
||||
Vector<PopupMenu*> mPopups;
|
||||
GuiMenuBar* mMenuBarCtrl;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue