diff options
author | James Cook <james@lindenlab.com> | 2009-07-21 19:00:58 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-07-21 19:00:58 +0000 |
commit | 9ad6434bb7a3fdced7d9095a4c788a22b7bf028a (patch) | |
tree | 7205b05943817946cfaeff15459aa20f016811e8 /indra/llui/llmenugl.h | |
parent | cef46d16453873691406c22be39ce0ee5e8076d1 (diff) |
DEV-34977 Context menu fails to open in Build mode. Product Engine implemented context menus as spawning on right-mouse-up, which interacts poorly with LLToolPie and recycled pie menu code. Changed context menu spawn to right-mouse-down, which allows click-drag-select behavior like the Mac. Eliminated unnecessary LLContextMenu::handleMouseUp and handleMouseDown methods -- these are handled in the LLMenuGL base class. Added handleRightMouseUp to LLMenuHolderGL to hide menus on right-mouse-up outside the menu. Reviewed with Richard.
Diffstat (limited to 'indra/llui/llmenugl.h')
-rw-r--r-- | indra/llui/llmenugl.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 897b43a614..7d5cc25e1e 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -662,13 +662,9 @@ public: virtual void show (S32 x, S32 y); virtual void hide (); - - virtual BOOL handleHover ( S32 x, S32 y, MASK mask ); - virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask ); virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleRightMouseUp ( S32 x, S32 y, MASK mask ); - virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask ); virtual bool addChild (LLView* view, S32 tab_group = 0); @@ -677,6 +673,11 @@ public: protected: BOOL mHoveredAnyItem; LLMenuItemGL* mHoverItem; + + // Cursor position when the menu was spawned, in menu-local coords + // Used to allow single right-click within a slop region to spawn the menu + S32 mSpawnMouseX; + S32 mSpawnMouseY; }; @@ -756,6 +757,7 @@ public: virtual void draw(); virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleRightMouseUp( S32 x, S32 y, MASK mask ); virtual const LLRect getMenuRect() const { return getLocalRect(); } virtual BOOL hasVisibleMenu() const; |