diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
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"); |