From fb98b06dba60400f101053a255427218739b4379 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 28 Sep 2008 20:19:51 -0500 Subject: Added event callbacks for Attached Lights and Attached Particles and updated their XUI menu entries to use the new event callbacks. Those menu entries now work. --- linden/indra/newview/llviewermenu.cpp | 31 ++++++++++++++++++++++ .../skins/default/xui/en-us/menu_viewer.xml | 6 ++--- 2 files changed, 33 insertions(+), 4 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 9687e11..8165e55 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -8295,6 +8295,33 @@ class LLAdvancedCheckDisableTextures : public view_listener_t +//////////////////////////////////////// +// RENDER ATTACHED LIGHTS / PARTICLES // +//////////////////////////////////////// + + +class LLToggleRenderAttachedLights : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + menu_toggle_control((void *)"RenderAttachedLights"); + LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); + return true; + } +}; + +class LLToggleRenderAttachedParticles : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + menu_toggle_control((void *)"RenderAttachedParticles"); + LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); + return true; + } +}; + + + ////////////////////////// // DUMP SCRIPTED CAMERA // ////////////////////////// @@ -9956,6 +9983,10 @@ void initialize_menus() addMenu(new LLAdvancedToggleDisableTextures(), "Advanced.ToggleDisableTextures"); addMenu(new LLAdvancedCheckDisableTextures(), "Advanced.CheckDisableTextures"); + // Advanced > Render (top level menu) + addMenu(new LLToggleRenderAttachedLights(), "ToggleRenderAttachedLights"); + addMenu(new LLToggleRenderAttachedParticles(), "ToggleRenderAttachedParticles"); + // Advanced > World addMenu(new LLAdvancedDumpScriptedCamera(), "Advanced.DumpScriptedCamera"); addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache"); diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 40de54f..f82f254 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1418,13 +1418,11 @@ - + - + -- cgit v1.1