diff options
author | Jacek Antonelli | 2009-09-05 02:21:07 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-09-05 02:21:07 -0500 |
commit | bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304 (patch) | |
tree | 73899f68a266a82d2046371d00f3ed427361d84e /linden/indra/newview/llviewermenu.cpp | |
parent | Applied Kitty Barnett's RLVa 1.0.1h (Restrained Life) patch. (diff) | |
download | meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.zip meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.tar.gz meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.tar.bz2 meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.tar.xz |
Converted RLVa menu items to XUI.
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 6bd38e6..415064d 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -10071,6 +10071,49 @@ class LLAvatarReportAbuse : public view_listener_t | |||
10071 | 10071 | ||
10072 | 10072 | ||
10073 | 10073 | ||
10074 | /////////////// | ||
10075 | // RLVa Main // | ||
10076 | /////////////// | ||
10077 | |||
10078 | |||
10079 | class RLVaMainToggle : public view_listener_t | ||
10080 | { | ||
10081 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10082 | { | ||
10083 | rlvDbgToggleEnabled(NULL); | ||
10084 | return true; | ||
10085 | } | ||
10086 | }; | ||
10087 | |||
10088 | class RLVaMainCheck : public view_listener_t | ||
10089 | { | ||
10090 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10091 | { | ||
10092 | bool new_value = rlvDbgGetEnabled(NULL); | ||
10093 | std::string control_name = userdata["control"].asString(); | ||
10094 | gMenuHolder->findControl(control_name)->setValue(new_value); | ||
10095 | return true; | ||
10096 | } | ||
10097 | }; | ||
10098 | |||
10099 | |||
10100 | |||
10101 | //////////////////// | ||
10102 | // RLVa BEHAVIORS // | ||
10103 | //////////////////// | ||
10104 | |||
10105 | |||
10106 | class RLVaBehaviorsShow : public view_listener_t | ||
10107 | { | ||
10108 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10109 | { | ||
10110 | RlvFloaterBehaviour::show(NULL); | ||
10111 | return true; | ||
10112 | } | ||
10113 | }; | ||
10114 | |||
10115 | |||
10116 | |||
10074 | static void addMenu(view_listener_t *menu, const char *name) | 10117 | static void addMenu(view_listener_t *menu, const char *name) |
10075 | { | 10118 | { |
10076 | sMenus.push_back(menu); | 10119 | sMenus.push_back(menu); |
@@ -10440,4 +10483,11 @@ void initialize_menus() | |||
10440 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); | 10483 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); |
10441 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); | 10484 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); |
10442 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); | 10485 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); |
10486 | |||
10487 | |||
10488 | // RLVa | ||
10489 | addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); | ||
10490 | addMenu(new RLVaMainCheck(), "RLVa.Main.Enabled"); | ||
10491 | addMenu(new RLVaBehaviorsShow(), "RLVa.Behaviors.Show"); | ||
10492 | |||
10443 | } | 10493 | } |