diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-24 09:37:21 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-24 09:37:21 -0800 |
commit | 4efc8d9b6b6b095ebaa343cd72a5cb874e7636fd (patch) | |
tree | e55dd3fd60fd14fdb03a8e170c5bf498bbf93112 /indra/newview/llviewermenu.cpp | |
parent | 6fde9c8fdba47ab9fb7cfda8e12225fc5a64deae (diff) | |
parent | b518a3a5f0d13a6dedfcd60918369076b48f5ece (diff) |
merge.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 620c700077..2a9c738c97 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6479,21 +6479,27 @@ void menu_toggle_attached_particles(void* user_data) LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); } -class LLAdvancedHandleAttchedLightParticles: public view_listener_t +class LLAdvancedHandleAttachedLightParticles: public view_listener_t { bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); + + // toggle the control + gSavedSettings.setBOOL(control_name, + !gSavedSettings.getBOOL(control_name)); + + // update internal flags if (control_name == "RenderAttachedLights") -{ + { menu_toggle_attached_lights(NULL); -} + } else if (control_name == "RenderAttachedParticles") -{ + { menu_toggle_attached_particles(NULL); -} + } return true; -} + } }; class LLSomethingSelected : public view_listener_t @@ -7763,7 +7769,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedVectorizePerfTest(), "Advanced.VectorizePerfTest"); view_listener_t::addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest"); view_listener_t::addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest"); - view_listener_t::addMenu(new LLAdvancedHandleAttchedLightParticles(), "Advanced.HandleAttchedLightParticles"); + view_listener_t::addMenu(new LLAdvancedHandleAttachedLightParticles(), "Advanced.HandleAttachedLightParticles"); #ifdef TOGGLE_HACKED_GODLIKE_VIEWER |