From e3742734f01f509e40b3294fac79bbf40fc6b925 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 25 May 2011 19:55:42 +0200 Subject: [PATCH] Beacons (floater) fixup After a user spend three days trying to find out why certain textures looked red (as if they had alpha and you pressed control-alt-T, but not all of them were like that); and nothing helped, not relogging, not clearing cache, not even reinstalling the viewer... I decided to take this bug serious. Note that, according to Shyotl, there have been more users every now and then that reported this problem. The problem (after doing a research for 1 hour) turned out to be that she had beacons on, highlighting prims with scripts. The immediate bug is, of course, that this was persistent over a relog. Upon further investigation, this bug exists because a Debug Setting had a double meaning: it meant both "beacon floater is visible", which you want to be persistent, and it was later renamed and given the meaning "Keep beacons when closing the floater". Digging deeper it turned out that there was a REAL mess with regard to the beacons: A non-finished floater with immature comments (called "dingdong floater") was half-created and replaced the original floater which, according to the comment was "so fucked over and over" (== commented out in several places), but then everything was commented out and replaced with a menu (because they couldn't get it to work?). The floater simply didn't exist anymore! That reduced the meaning of the Debug Setting to "Show beacons", although you now could only set it in the menu by clicking on "Beacons Always On" where 'Always' refers to also on when the floater isn't there. I nuked the immature dingdong code, brought back the original floater as it was in snowglobe (and still is in Imprudence), fixed it up a bit with a nicer layout (indentation and spacing) and disabling (graying out) when needed, and added a new checkbox that will allow people to still keep/see the beacons after closing the floater. In the end this requires THREE Debug Setting variables: ShowBeaconsFloater : TRUE when the floater is visible, FALSE when not. This is persistent, so the floater is still there if you relog with the floater open. BeaconsKeepVisible : TRUE when the new checkbox is checked. Also persistent. BeaconsVisible : TRUE when the beacons are rendered, FALSE otherwise. This is NOT persistent: we don't want unsuspecting users to try and get rid of the weird 'red prims' by relogging and failing at that. --- indra/newview/CMakeLists.txt | 2 - indra/newview/app_settings/settings.xml | 37 +- indra/newview/llfloaterbeacons.cpp | 103 +- indra/newview/llfloaterbeacons.h | 1 - indra/newview/llfloaterdickdongs.cpp | 93 -- indra/newview/llfloaterdickdongs.h | 57 - indra/newview/llstartup.cpp | 2 +- indra/newview/llviewermenu.cpp | 1110 +---------------- indra/newview/llviewerwindow.cpp | 4 +- indra/newview/pipeline.cpp | 4 +- .../default/xui/en-us/floater_beacons.xml | 17 +- .../default/xui/en-us/floater_dickdongs.xml | 19 - .../skins/default/xui/en-us/menu_viewer.xml | 99 +- 13 files changed, 114 insertions(+), 1434 deletions(-) delete mode 100644 indra/newview/llfloaterdickdongs.cpp delete mode 100644 indra/newview/llfloaterdickdongs.h delete mode 100644 indra/newview/skins/default/xui/en-us/floater_dickdongs.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8004297fe..902137a1d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -184,7 +184,6 @@ set(viewer_SOURCE_FILES llfloatercolorpicker.cpp llfloatercustomize.cpp llfloaterdaycycle.cpp - llfloaterdickdongs.cpp llfloaterdirectory.cpp llfloatereditui.cpp llfloaterenvsettings.cpp @@ -661,7 +660,6 @@ set(viewer_HEADER_FILES llfloatercolorpicker.h llfloatercustomize.h llfloaterdaycycle.h - llfloaterdickdongs.h llfloaterdirectory.h llfloatereditui.h llfloaterenvsettings.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 944b1fef0..370fce9d5 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1894,10 +1894,10 @@ 0 - BeaconAlwaysOn + ShowBeaconsFloater Comment - Beacons / highlighting always on + Show beacons floater Persist 1 Type @@ -1905,6 +1905,28 @@ Value 0 + BeaconsKeepVisible + + Comment + Don't turn off BeaconsVisible when beacons floater is closed + Persist + 1 + Type + Boolean + Value + 0 + + BeaconsVisible + + Comment + Show beacons / highlighting + Persist + 0 + Type + Boolean + Value + 0 + BrowserHomePage Comment @@ -14043,6 +14065,17 @@ Value 0 + keepbeacons + + Comment + Keep beacons when closing floater + Persist + 1 + Type + Boolean + Value + 0 + LogTextureDownloadsToViewerLog Comment diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index 9ed19ed15..b8d457fa9 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -36,6 +36,7 @@ #include "llviewercontrol.h" #include "lluictrlfactory.h" #include "llcheckboxctrl.h" +#include "llsliderctrl.h" #include "pipeline.h" // [RLVa:KB] @@ -44,7 +45,7 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_dickdongs.xml"); + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_beacons.xml"); // Initialize pipeline states from saved settings. // OK to do at floater constructor time because beacons do not display unless the floater is open @@ -58,10 +59,13 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) LLPipeline::setRenderParticleBeacons( gSavedSettings.getBOOL("particlesbeacon")); LLPipeline::setRenderHighlights( gSavedSettings.getBOOL("renderhighlights")); LLPipeline::setRenderBeacons( gSavedSettings.getBOOL("renderbeacons")); + getChild("beacon_width_label")->setEnabled(gSavedSettings.getBOOL("renderbeacons")); + getChild("beacon_width")->setEnabled(gSavedSettings.getBOOL("renderbeacons")); } BOOL LLFloaterBeacons::postBuild() { + childSetCommitCallback("always_on", onClickUICheck, this); childSetCommitCallback("touch_only", onClickUICheck, this); childSetCommitCallback("scripted", onClickUICheck, this); childSetCommitCallback("physical", onClickUICheck, this); @@ -73,7 +77,6 @@ BOOL LLFloaterBeacons::postBuild() } // Needed to make the floater visibility toggle the beacons. -// Too bad we can't just add control_name="BeaconAlwaysOn" to the XML. void LLFloaterBeacons::open() { // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) @@ -84,14 +87,19 @@ void LLFloaterBeacons::open() // [/RLVa:KB] LLFloater::open(); - gSavedSettings.setBOOL( "BeaconAlwaysOn", TRUE); + gSavedSettings.setBOOL("ShowBeaconsFloater", TRUE); + gSavedSettings.setBOOL("BeaconsVisible", TRUE); } void LLFloaterBeacons::close(bool app_quitting) { LLFloater::close(app_quitting); if(!app_quitting) { - gSavedSettings.setBOOL( "BeaconAlwaysOn", FALSE); + gSavedSettings.setBOOL("ShowBeaconsFloater", FALSE); + if (!gSavedSettings.getBOOL("BeaconsKeepVisible")) + { + gSavedSettings.setBOOL("BeaconsVisible", FALSE); + } } } @@ -103,59 +111,58 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data) LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; std::string name = check->getName(); LLFloaterBeacons* view = (LLFloaterBeacons*)data; - if( name == "touch_only") + + if (name == "always_on") gSavedSettings.setBOOL("BeaconsKeepVisible", check->get()); + else if (name == "touch_only") LLPipeline::setRenderScriptedTouchBeacons(check->get()); + else if (name == "scripted") LLPipeline::setRenderScriptedBeacons(check->get()); + else if (name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get()); + else if (name == "sounds") LLPipeline::setRenderSoundBeacons(check->get()); + else if (name == "particles") LLPipeline::setRenderParticleBeacons(check->get()); + else if (name == "highlights") LLPipeline::setRenderHighlights(check->get()); + else if (name == "beacons") + { + bool enabled = check->get(); + LLPipeline::setRenderBeacons(enabled); + view->getChild("beacon_width_label")->setEnabled(enabled); + view->getChild("beacon_width")->setEnabled(enabled); + } + + if (check->get()) { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); // Don't allow both to be ON at the same time. Toggle the other one off if both now on. - if ( - LLPipeline::getRenderScriptedTouchBeacons(NULL) && + if (LLPipeline::getRenderScriptedTouchBeacons(NULL) && LLPipeline::getRenderScriptedBeacons(NULL) ) { - LLPipeline::setRenderScriptedBeacons(FALSE); - view->getChild("scripted")->setControlValue(LLSD(FALSE)); - view->getChild("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline + if (name == "touch_only") + { + LLPipeline::setRenderScriptedBeacons(FALSE); + view->getChild("scripted")->setControlValue(LLSD(FALSE)); + } + else + { + LLPipeline::setRenderScriptedTouchBeacons(FALSE); + view->getChild("touch_only")->setControlValue(LLSD(FALSE)); + } } } - else if(name == "scripted") + else { - LLPipeline::toggleRenderScriptedBeacons(NULL); - // Don't allow both to be ON at the same time. Toggle the other one off if both now on. - if ( - LLPipeline::getRenderScriptedTouchBeacons(NULL) && - LLPipeline::getRenderScriptedBeacons(NULL) ) - { - LLPipeline::setRenderScriptedTouchBeacons(FALSE); - view->getChild("touch_only")->setControlValue(LLSD(FALSE)); - view->getChild("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline - } - } - else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get()); - else if(name == "sounds") LLPipeline::setRenderSoundBeacons(check->get()); - else if(name == "particles") LLPipeline::setRenderParticleBeacons(check->get()); - else if(name == "highlights") - { - LLPipeline::toggleRenderHighlights(NULL); // Don't allow both to be OFF at the same time. Toggle the other one on if both now off. - if ( - !LLPipeline::getRenderBeacons(NULL) && - !LLPipeline::getRenderHighlights(NULL) ) + if (!LLPipeline::getRenderBeacons(NULL) && + !LLPipeline::getRenderHighlights(NULL)) { - LLPipeline::setRenderBeacons(TRUE); - view->getChild("beacons")->setControlValue(LLSD(TRUE)); - view->getChild("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline - } - } - else if(name == "beacons") - { - LLPipeline::toggleRenderBeacons(NULL); - // Don't allow both to be OFF at the same time. Toggle the other one on if both now off. - if ( - !LLPipeline::getRenderBeacons(NULL) && - !LLPipeline::getRenderHighlights(NULL) ) - { - LLPipeline::setRenderHighlights(TRUE); - view->getChild("highlights")->setControlValue(LLSD(TRUE)); - view->getChild("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline + if (name == "highlights") + { + LLPipeline::setRenderBeacons(TRUE); + view->getChild("beacons")->setControlValue(LLSD(TRUE)); + view->getChild("beacon_width_label")->setEnabled(TRUE); + view->getChild("beacon_width")->setEnabled(TRUE); + } + else + { + LLPipeline::setRenderHighlights(TRUE); + view->getChild("highlights")->setControlValue(LLSD(TRUE)); + } } } } diff --git a/indra/newview/llfloaterbeacons.h b/indra/newview/llfloaterbeacons.h index c12bdd726..c7a7b8803 100644 --- a/indra/newview/llfloaterbeacons.h +++ b/indra/newview/llfloaterbeacons.h @@ -44,7 +44,6 @@ public: /*virtual*/ BOOL postBuild(); // Needed to make the floater visibility toggle the beacons. - // Too bad we can't just add control_name="BeaconAlwaysOn" to the XML. /*virtual*/ void open(); /*virtual*/ void close(bool app_quitting); diff --git a/indra/newview/llfloaterdickdongs.cpp b/indra/newview/llfloaterdickdongs.cpp deleted file mode 100644 index f9dbc64e1..000000000 --- a/indra/newview/llfloaterdickdongs.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @file LLFloaterDickDongs.cpp - * @brief Front-end to LLPipeline controls for highlighting various kinds of objects. - * @author Coco - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" -#include "llfloaterdickdongs.h" -#include "llcommon.h" -#include "llmd5.h" -#include "llagent.h" -#include "lluuid.h" -#include "llviewercontrol.h" -#include "lluictrlfactory.h" -#include "llcheckboxctrl.h" - -//this is really the only thing that needs to be here atm -LLFloaterDickDongs::LLFloaterDickDongs(const LLSD& seed) -{ - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_dickdongs.xml"); -} - -//Not needed yet -/* -BOOL LLFloaterDickDongs::postBuild() -{ - childSetCommitCallback("touch_only", onClickUICheck, this); - childSetCommitCallback("scripted", onClickUICheck, this); - childSetCommitCallback("physical", onClickUICheck, this); - childSetCommitCallback("sounds", onClickUICheck, this); - childSetCommitCallback("particles", onClickUICheck, this); - childSetCommitCallback("highlights", onClickUICheck, this); - childSetCommitCallback("beacons", onClickUICheck, this); - return TRUE; -} -*/ - - -void LLFloaterDickDongs::open() -{ - LLUUID user = gAgent.getID(); - char hex_salty_uuid[MD5HEX_STR_SIZE]; - LLMD5 salted_uuid_hash((const U8*)user.asString().c_str(), 1); - salted_uuid_hash.hex_digest(hex_salty_uuid); - int i = (int)strtol((std::string(hex_salty_uuid).substr(0, 7) + "\n").c_str(),(char **)NULL,16); - llinfos << "Bridge Channel: " << (S32)i << llendl; - LLFloater::open(); - -} -void LLFloaterDickDongs::close(bool app_quitting) -{ - LLFloater::close(app_quitting); -} - -//Also not needed yet -/* -// Callback attached to each check box control to both affect their main purpose -// and to implement the couple screwy interdependency rules that some have. -//static -void LLFloaterDickDongs::onClickUICheck(LLUICtrl *ctrl, void* data) -{ - LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; - std::string name = check->getName(); - LLFloaterDickDongs* view = (LLFloaterDickDongs*)data; -} -*/ diff --git a/indra/newview/llfloaterdickdongs.h b/indra/newview/llfloaterdickdongs.h deleted file mode 100644 index fe4d7697d..000000000 --- a/indra/newview/llfloaterdickdongs.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @file llfloaterbeacons.h - * @brief Front-end to LLPipeline controls for highlighting various kinds of objects. - * @author Coco - * - * $LicenseInfo:firstyear=2002&license=viewergpl$ - * - * Copyright (c) 2002-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERDICKDONGS_H -#define LL_LLFLOATERDICKDONGS_H - -#include "llfloater.h" - -class LLFloaterDickDongs : public LLFloater, public LLFloaterSingleton -{ - friend class LLUISingleton >; - -public: - // /*virtual*/ BOOL postBuild(); - - // Needed to make the floater visibility toggle the beacons. - // Too bad we can't just add control_name="BeaconAlwaysOn" to the XML. - /*virtual*/ void open(); - /*virtual*/ void close(bool app_quitting); - -private: - LLFloaterDickDongs(const LLSD& seed); - - //static void onClickUICheck(LLUICtrl *ctrl, void* data); -}; - -#endif diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 07c8de068..de5234ae4 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2035,7 +2035,7 @@ bool idle_startup() LLFloaterActiveSpeakers::showInstance(); } - if (gSavedSettings.getBOOL("BeaconAlwaysOn")) + if (gSavedSettings.getBOOL("ShowBeaconsFloater")) { LLFloaterBeacons::showInstance(); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index afff999fa..6d49ad55d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -111,7 +111,6 @@ #include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloaterdaycycle.h" -//#include "llfloaterdickdongs.h" No need for the custom floater right now, I think. -HgB #include "llfloaterdirectory.h" #include "llfloatereditui.h" #include "llfloaterchatterbox.h" @@ -6628,10 +6627,10 @@ class LLShowFloater : public view_listener_t { LLFloaterActiveSpeakers::toggleInstance(LLSD()); } - /*else if (floater_name == "beacons") + else if (floater_name == "beacons") { - LLFloaterBeacons::toggleInstance(LLSD()); NO - }*/ + LLFloaterBeacons::toggleInstance(LLSD()); + } else if (floater_name == "perm prefs") { LLFloaterPerms::toggleInstance(LLSD()); @@ -6695,14 +6694,10 @@ class LLFloaterVisible : public view_listener_t { new_value = LLFloaterActiveSpeakers::instanceVisible(LLSD()); } - /*else if (floater_name == "beacons") + else if (floater_name == "beacons") { - new_value = LLFloaterBeacons::instanceVisible(LLSD()); Oh man fuck this floater so much. + new_value = LLFloaterBeacons::instanceVisible(LLSD()); } - else if (floater_name == "dickdongs") - { - new_value = LLFloaterDickDongs::instanceVisible(LLSD()); Not needed any more. - }*/ else if (floater_name == "inventory") { LLInventoryView* iv = LLInventoryView::getActiveInventory(); @@ -9588,1104 +9583,12 @@ class LLWorldDayCycle : public view_listener_t } }; - - static void addMenu(view_listener_t *menu, const std::string& name) { sMenus.push_back(menu); menu->registerListener(gMenuHolder, name); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -//Chalice - Old beacon style -class LLViewBeaconWidth : public view_listener_t -{ - bool handleEvent(LLPointer event, const LLSD& userdata) - { - std::string width = userdata.asString(); - if(width == "1") - { - gSavedSettings.setS32("DebugBeaconLineWidth", 1); - } - else if(width == "4") - { - gSavedSettings.setS32("DebugBeaconLineWidth", 4); - } - else if(width == "16") - { - gSavedSettings.setS32("DebugBeaconLineWidth", 16); - } - else if(width == "32") - { - gSavedSettings.setS32("DebugBeaconLineWidth", 32); - } - - return true; - } -}; - -//PURPLESL - Old beacon style -class LLViewToggleBeacon : public view_listener_t -{ - bool handleEvent(LLPointer event, const LLSD& userdata) - { - std::string beacon = userdata.asString(); - if (beacon == "scriptsbeacon") - { - LLPipeline::toggleRenderScriptedBeacons(NULL); - gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); - // toggle the other one off if it's on - if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) - { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); - gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); - } - } - else if (beacon == "physicalbeacon") - { - LLPipeline::toggleRenderPhysicalBeacons(NULL); - gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) ); - } - else if (beacon == "soundsbeacon") - { - LLPipeline::toggleRenderSoundBeacons(NULL); - gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) ); - } - else if (beacon == "particlesbeacon") - { - LLPipeline::toggleRenderParticleBeacons(NULL); - gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) ); - } - else if (beacon == "scripttouchbeacon") - { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); - gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); - // toggle the other one off if it's on - if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) - { - LLPipeline::toggleRenderScriptedBeacons(NULL); - gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); - } - } - else if (beacon == "renderbeacons") - { - LLPipeline::toggleRenderBeacons(NULL); - gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); - // toggle the other one on if it's not - if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) - { - LLPipeline::toggleRenderHighlights(NULL); - gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); - } - } - else if (beacon == "renderhighlights") - { - LLPipeline::toggleRenderHighlights(NULL); - gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); - // toggle the other one on if it's not - if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) - { - LLPipeline::toggleRenderBeacons(NULL); - gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); - } - } - - return true; - } -}; -//PURPLESL - Old beacon style -class LLViewCheckBeaconEnabled : public view_listener_t -{ - bool handleEvent(LLPointer event, const LLSD& userdata) - { - std::string beacon = userdata["data"].asString(); - bool new_value = false; - if (beacon == "scriptsbeacon") - { - new_value = gSavedSettings.getBOOL( "scriptsbeacon"); - LLPipeline::setRenderScriptedBeacons(new_value); - } - else if (beacon == "physicalbeacon") - { - new_value = gSavedSettings.getBOOL( "physicalbeacon"); - LLPipeline::setRenderPhysicalBeacons(new_value); - } - else if (beacon == "soundsbeacon") - { - new_value = gSavedSettings.getBOOL( "soundsbeacon"); - LLPipeline::setRenderSoundBeacons(new_value); - } - else if (beacon == "particlesbeacon") - { - new_value = gSavedSettings.getBOOL( "particlesbeacon"); - LLPipeline::setRenderParticleBeacons(new_value); - } - else if (beacon == "scripttouchbeacon") - { - new_value = gSavedSettings.getBOOL( "scripttouchbeacon"); - LLPipeline::setRenderScriptedTouchBeacons(new_value); - } - else if (beacon == "renderbeacons") - { - new_value = gSavedSettings.getBOOL( "renderbeacons"); - LLPipeline::setRenderBeacons(new_value); - } - else if (beacon == "renderhighlights") - { - new_value = gSavedSettings.getBOOL( "renderhighlights"); - LLPipeline::setRenderHighlights(new_value); - } - gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); - return true; - } -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void initialize_menus() { // A parameterized event handler used as ctrl-8/9/0 zoom controls below. @@ -10757,8 +9660,6 @@ void initialize_menus() addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent"); - addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon"); - addMenu(new LLViewBeaconWidth(), "View.BeaconWidth"); addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); addMenu(new LLZoomer(1.2f), "View.ZoomOut"); @@ -10776,7 +9677,6 @@ void initialize_menus() addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam"); addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips"); addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); - addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled"); addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 64163b895..cf6f4bde6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -522,8 +522,8 @@ public: ypos += y_inc; } // only display these messages if we are actually rendering beacons at this moment - static const LLCachedControl beacon_always_on("BeaconAlwaysOn",false); - if (LLPipeline::getRenderBeacons(NULL) && beacon_always_on) + static const LLCachedControl beacons_visible("BeaconsVisible",false); + if (LLPipeline::getRenderBeacons(NULL) && beacons_visible) { if (LLPipeline::getRenderParticleBeacons(NULL)) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ac8e8e2db..12c810849 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2509,8 +2509,8 @@ void LLPipeline::postSort(LLCamera& camera) } llpushcallstacks ; // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus - static const LLCachedControl beacon_always_on("BeaconAlwaysOn",false); - if (beacon_always_on && !sShadowRender) + static const LLCachedControl beacons_visible("BeaconsVisible", false); + if (beacons_visible && !sShadowRender) { if (sRenderScriptedTouchBeacons) { diff --git a/indra/newview/skins/default/xui/en-us/floater_beacons.xml b/indra/newview/skins/default/xui/en-us/floater_beacons.xml index 361d04601..ff9ed0b0a 100644 --- a/indra/newview/skins/default/xui/en-us/floater_beacons.xml +++ b/indra/newview/skins/default/xui/en-us/floater_beacons.xml @@ -1,24 +1,25 @@ - - + rect_control="FloaterBeaconsRect" control_name="ShowBeaconsFloater"> + + + - + Beacon Width: diff --git a/indra/newview/skins/default/xui/en-us/floater_dickdongs.xml b/indra/newview/skins/default/xui/en-us/floater_dickdongs.xml deleted file mode 100644 index a1afa5798..000000000 --- a/indra/newview/skins/default/xui/en-us/floater_dickdongs.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - AMOUNT OF AWESOME: - - - - diff --git a/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/indra/newview/skins/default/xui/en-us/menu_viewer.xml index aa3f5b756..afba100cc 100644 --- a/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -408,100 +408,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +