Browse Source

Fixed Menu Bar

The previous update on event bubbling broke the menu bar. This fixes it.
Peter Robinson 3 years ago
parent
commit
29ac9fd4d4

+ 2 - 0
engine/source/gui/editor/guiMenuBarCtrl.cc

@@ -1401,6 +1401,8 @@ void GuiMenuListCtrl::updateSize()
 	resize(mBounds.point, newExtent);
 }
 
+void GuiMenuListCtrl::onTouchDown(const GuiEvent &) { }
+
 void GuiMenuListCtrl::onTouchUp(const GuiEvent &event)
 {
 	GuiMenuItemCtrl *ctrl = GetHitItem(event.mousePoint);

+ 2 - 1
engine/source/gui/editor/guiMenuBarCtrl.h

@@ -216,7 +216,8 @@ public:
 
 	inline void setHoveredItem(GuiMenuItemCtrl *item) { mEnterItemTime = Platform::getVirtualMilliseconds(); mHoveredItem = item; mArmSubMenu = true; }
 
-	virtual void onTouchUp(const GuiEvent &event);
+	virtual void onTouchDown(const GuiEvent& event);
+	virtual void onTouchUp(const GuiEvent& event);
 	void processMenuItem(GuiMenuItemCtrl *ctrl);
 };