From 36fccc3888c5dc318a8a235da8a5cae4faeb637d Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 30 Apr 2008 23:30:09 +0000 Subject: svn merge -r 86190:86191 maint-ui-11-merge (EFFECTIVE MERGE: -r 84579:85724 maint-ui-11-qa). --- indra/newview/llviewermenu.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2cb60785d3..0a7a14dbfa 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3163,6 +3163,21 @@ class LLWorldFly : public view_listener_t } }; +class LLWorldEnableFly : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + BOOL sitting = FALSE; + if (gAgent.getAvatarObject()) + { + sitting = gAgent.getAvatarObject()->mIsSitting; + } + gMenuHolder->findControl(userdata["control"].asString())->setValue(!sitting); + return true; + } +}; + + void handle_agent_stop_moving(void*) { // stop agent @@ -7766,6 +7781,7 @@ void initialize_menus() addMenu(new LLWorldChat(), "World.Chat"); addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); addMenu(new LLWorldFly(), "World.Fly"); + addMenu(new LLWorldEnableFly(), "World.EnableFly"); addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); -- cgit v1.2.3