Files
SingularityViewer/indra/newview/llfloaterbeacons.h
Aleric Inglewood e3742734f0 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.
2011-05-25 19:55:42 +02:00

57 lines
1.9 KiB
C++

/**
* @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_LLFLOATERBEACONS_H
#define LL_LLFLOATERBEACONS_H
#include "llfloater.h"
class LLFloaterBeacons : public LLFloater, public LLFloaterSingleton<LLFloaterBeacons>
{
friend class LLUISingleton<LLFloaterBeacons, VisibilityPolicy<LLFloater> >;
public:
/*virtual*/ BOOL postBuild();
// Needed to make the floater visibility toggle the beacons.
/*virtual*/ void open();
/*virtual*/ void close(bool app_quitting);
private:
LLFloaterBeacons(const LLSD& seed);
static void onClickUICheck(LLUICtrl *ctrl, void* data);
};
#endif