diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-16 21:17:20 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-16 21:17:20 +0200 |
commit | a0cab8fde8f9cfe8dacf8e8f7b40f28e76774526 (patch) | |
tree | 9c7f27c19b665d431168509d17b35ff9ac329a98 /indra | |
parent | cc8a0e0a9fbfc9069f8b090616369fa8cde0e895 (diff) |
Fixed low priority bug EXT-5425 (Undocked 'Movement Controls' floater became docked after opening from 'World' top menu).
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llbottomtray.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 22 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 6 |
4 files changed, 39 insertions, 4 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 2958565fdf..48c0ec61d8 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -421,6 +421,18 @@ void LLBottomTray::showSnapshotButton(BOOL visible) setTrayButtonVisibleIfPossible(RS_BUTTON_SNAPSHOT, visible); } +void LLBottomTray::toggleMovementControls() +{ + if (mMovementButton) + mMovementButton->onCommit(); +} + +void LLBottomTray::toggleCameraControls() +{ + if (mCamButton) + mCamButton->onCommit(); +} + BOOL LLBottomTray::postBuild() { diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 2eeb0c0017..18c14e5e19 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -94,6 +94,9 @@ public: void showCameraButton(BOOL visible); void showSnapshotButton(BOOL visible); + void toggleMovementControls(); + void toggleCameraControls(); + void onMouselookModeIn(); void onMouselookModeOut(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 24a788aaed..989cfae464 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -44,6 +44,7 @@ #include "llagent.h" #include "llagentwearables.h" #include "llagentpilot.h" +#include "llbottomtray.h" #include "llcompilequeue.h" #include "llconsole.h" #include "lldebugview.h" @@ -7631,6 +7632,24 @@ class LLWorldDayCycle : public view_listener_t } }; +class LLWorldToggleMovementControls : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLBottomTray::getInstance()->toggleMovementControls(); + return true; + } +}; + +class LLWorldToggleCameraControls : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLBottomTray::getInstance()->toggleCameraControls(); + return true; + } +}; + void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) { static LLMenuGL* show_navbar_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_hide_navbar.xml", @@ -7750,6 +7769,9 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess"); view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle"); + view_listener_t::addMenu(new LLWorldToggleMovementControls(), "World.Toggle.MovementControls"); + view_listener_t::addMenu(new LLWorldToggleCameraControls(), "World.Toggle.CameraControls"); + // Tools menu view_listener_t::addMenu(new LLToolsSelectTool(), "Tools.SelectTool"); view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 07a366da7f..e11b18ec31 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -311,8 +311,7 @@ function="Floater.Visible" parameter="moveview" /> <menu_item_check.on_click - function="Floater.Toggle" - parameter="moveview" /> + function="World.Toggle.MovementControls" /> </menu_item_check> <menu_item_check label="View Controls" @@ -322,8 +321,7 @@ function="Floater.Visible" parameter="camera" /> <menu_item_check.on_click - function="Floater.Toggle" - parameter="camera" /> + function="World.Toggle.CameraControls" /> </menu_item_check> <menu_item_check label="Ban Lines" |