Applied moap beacon patch.
This commit is contained in:
@@ -16633,6 +16633,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<real>0.40000000596</real>
|
||||
</map>
|
||||
<key>moapbeacon</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Beacon / Highlight media on a prim sources</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>particlesbeacon</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -16765,17 +16776,6 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>keepbeacons</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Keep beacons when closing floater</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ClearBeaconAfterTeleport</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "llviewercontrol.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "pipeline.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
@@ -45,8 +44,6 @@
|
||||
|
||||
LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed)
|
||||
{
|
||||
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
|
||||
// therefore it is OK to not initialize the pipeline state before needed.
|
||||
@@ -59,20 +56,14 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed)
|
||||
LLPipeline::setRenderParticleBeacons( gSavedSettings.getBOOL("particlesbeacon"));
|
||||
LLPipeline::setRenderHighlights( gSavedSettings.getBOOL("renderhighlights"));
|
||||
LLPipeline::setRenderBeacons( gSavedSettings.getBOOL("renderbeacons"));
|
||||
getChild<LLTextBox>("beacon_width_label")->setEnabled(gSavedSettings.getBOOL("renderbeacons"));
|
||||
getChild<LLSliderCtrl>("beacon_width")->setEnabled(gSavedSettings.getBOOL("renderbeacons"));
|
||||
LLPipeline::setRenderMOAPBeacons( gSavedSettings.getBOOL("moapbeacon"));
|
||||
mCommitCallbackRegistrar.add("Beacons.UICheck", boost::bind(&LLFloaterBeacons::onClickUICheck, this,_1));
|
||||
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_beacons.xml");
|
||||
}
|
||||
|
||||
BOOL LLFloaterBeacons::postBuild()
|
||||
{
|
||||
childSetCommitCallback("always_on", onClickUICheck, this);
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -105,64 +96,59 @@ void LLFloaterBeacons::close(bool app_quitting)
|
||||
|
||||
// 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 LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data)
|
||||
|
||||
void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
|
||||
{
|
||||
LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
|
||||
std::string name = check->getName();
|
||||
LLFloaterBeacons* view = (LLFloaterBeacons*)data;
|
||||
|
||||
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<LLTextBox>("beacon_width_label")->setEnabled(enabled);
|
||||
view->getChild<LLSliderCtrl>("beacon_width")->setEnabled(enabled);
|
||||
}
|
||||
|
||||
if (check->get())
|
||||
if (name == "touch_only")
|
||||
{
|
||||
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) &&
|
||||
LLPipeline::getRenderScriptedBeacons(NULL) )
|
||||
{
|
||||
if (name == "touch_only")
|
||||
{
|
||||
LLPipeline::setRenderScriptedBeacons(FALSE);
|
||||
view->getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLPipeline::setRenderScriptedTouchBeacons(FALSE);
|
||||
view->getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE));
|
||||
}
|
||||
LLPipeline::setRenderScriptedBeacons(FALSE);
|
||||
getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
else if (name == "scripted")
|
||||
{
|
||||
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);
|
||||
getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE));
|
||||
}
|
||||
}
|
||||
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 == "moapbeacon") LLPipeline::setRenderMOAPBeacons(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 (name == "highlights")
|
||||
{
|
||||
LLPipeline::setRenderBeacons(TRUE);
|
||||
view->getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE));
|
||||
view->getChild<LLTextBox>("beacon_width_label")->setEnabled(TRUE);
|
||||
view->getChild<LLSliderCtrl>("beacon_width")->setEnabled(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLPipeline::setRenderHighlights(TRUE);
|
||||
view->getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE));
|
||||
}
|
||||
LLPipeline::setRenderBeacons(TRUE);
|
||||
getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE));
|
||||
}
|
||||
}
|
||||
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);
|
||||
getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,11 +46,10 @@ public:
|
||||
// Needed to make the floater visibility toggle the beacons.
|
||||
/*virtual*/ void open();
|
||||
/*virtual*/ void close(bool app_quitting);
|
||||
void onClickUICheck(LLUICtrl *ctrl);
|
||||
|
||||
private:
|
||||
LLFloaterBeacons(const LLSD& seed);
|
||||
|
||||
static void onClickUICheck(LLUICtrl *ctrl, void* data);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,23 +3,68 @@
|
||||
width="250" height="255"
|
||||
name="beacons" title="Beacons"
|
||||
rect_control="FloaterBeaconsRect" control_name="ShowBeaconsFloater">
|
||||
<panel bottom="10" follows="left|top|right|bottom" left="10" width="230" height="230" name="beacons_panel">
|
||||
<check_box bottom_delta="-33" follows="left|top" left="0" name="always_on" label="Keep beacons when closing floater" control_name="keepbeacons" />
|
||||
<check_box bottom_delta="-30" follows="left|top" left="0" name="touch_only" label="Scripted Objects with Touch Only" control_name="scripttouchbeacon" />
|
||||
<check_box bottom_delta="-20" follows="left|top" left="0" name="scripted" label="Scripted Objects" control_name="scriptsbeacon" />
|
||||
<check_box bottom_delta="-20" follows="left|top" left="0" name="physical" label="Physical Objects" control_name="physicalbeacon" />
|
||||
<check_box bottom_delta="-20" follows="left|top" left="0" name="sounds" label="Sound Sources" control_name="soundsbeacon" />
|
||||
<check_box bottom_delta="-20" follows="left|top" left="0" name="particles" label="Particle Sources" control_name="particlesbeacon" />
|
||||
<check_box bottom_delta="-30" follows="left|top" left="0" name="highlights" label="Render Highlights" control_name="renderhighlights" />
|
||||
<check_box bottom_delta="-20" follows="left|top" left="0" name="beacons" label="Render Beacons" control_name="renderbeacons" />
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-15" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="25"
|
||||
mouse_opaque="true" name="beacon_width_label" v_pad="0" width="128">
|
||||
Beacon Width:
|
||||
</text>
|
||||
<slider bottom_delta="-20" can_edit_text="false" enabled="true" width="185" height="16" mouse_opaque="true"
|
||||
decimal_digits="0" increment="1" initial_val="1" left="16" min_val="1.0" max_val="16.0"
|
||||
name="beacon_width" show_text="true" value="1" control_name="DebugBeaconLineWidth"/>
|
||||
</panel>
|
||||
<panel bottom="10" follows="left|top|right|bottom" left="10" width="230" height="230" name="beacons_panel">
|
||||
<check_box bottom_delta="-24" follows="left|top" left="0" control_name="BeaconsKeepVisible" label="Keep beacons when closing floater" name="always_on"/>
|
||||
<check_box bottom_delta="-30" follows="left|top" control_name="renderbeacons" label="Render Beacons" name="beacons">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" control_name="renderhighlights" label="Render Highlights" name="highlights">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
bottom_delta="-20"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
left="20"
|
||||
name="beacon_width_label"
|
||||
width="128">
|
||||
Beacon Width:
|
||||
</text>
|
||||
<slider
|
||||
control_name="DebugBeaconLineWidth"
|
||||
decimal_digits="0"
|
||||
height="16"
|
||||
increment="1"
|
||||
initial_value="1"
|
||||
max_val="16"
|
||||
min_val="1"
|
||||
name="beacon_width"
|
||||
bottom_delta="-14"
|
||||
width="180" />
|
||||
<check_box bottom_delta="-22" follows="left|top" left="0" control_name="physicalbeacon" label="Physical Objects" name="physical">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" control_name="scriptsbeacon" label="Scripted Objects" name="scripted">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" control_name="scripttouchbeacon" label="Scripted Objects with Touch Only" name="touch_only">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" control_name="soundsbeacon" label="Sound Sources" name="sounds">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<check_box bottom_delta="-20" follows="left|top" control_name="particlesbeacon" label="Particle Sources" name="particles">
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
<check_box
|
||||
bottom_delta="-20"
|
||||
follows="left|top"
|
||||
control_name="moapbeacon"
|
||||
height="16"
|
||||
left="0"
|
||||
label="Media sources"
|
||||
name="moapbeacon" >
|
||||
<check_box.commit_callback
|
||||
function="Beacons.UICheck" />
|
||||
</check_box>
|
||||
</panel>
|
||||
</floater>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="beacons" title="Balizas">
|
||||
<panel name="beacons_panel">
|
||||
<check_box name="always_on" label="Mantener balizas activas al cerrar"/>
|
||||
<check_box name="touch_only" label="Solo Objetos con script de toque"/>
|
||||
<check_box name="scripted" label="Objetos con Scripts"/>
|
||||
<check_box name="physical" label="Objetos Materiales"/>
|
||||
<check_box name="sounds" label="Fuentes de Sonidos"/>
|
||||
<check_box name="particles" label="Fuentes de Partículas"/>
|
||||
<check_box name="highlights" label="Activar los Realzados"/>
|
||||
<check_box name="beacons" label="Activar Balizas"/>
|
||||
<text name="beacon_width_label">
|
||||
Ancho de la Baliza:
|
||||
</text>
|
||||
</panel>
|
||||
<check_box label="Mantener balizas activas al cerrar" name="always_on"/>
|
||||
<check_box label="Activar Balizas" name="beacons"/>
|
||||
<check_box label="Activar los Realzados" name="highlights"/>
|
||||
<text name="beacon_width_label">
|
||||
Ancho de la Baliza:
|
||||
</text>
|
||||
<check_box label="Objetos Materiales" name="physical"/>
|
||||
<check_box label="Objetos con Scripts" name="scripted"/>
|
||||
<check_box label="Solo Objetos con script de toque" name="touch_only"/>
|
||||
<check_box label="Fuentes de Sonidos" name="sounds"/>
|
||||
<check_box label="Fuentes de Partículas" name="particles"/>
|
||||
<check_box label="Fuentes de media" name="moapbeacon"/>
|
||||
</panel>
|
||||
</floater>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="beacons" title="Balises">
|
||||
<panel name="beacons_panel">
|
||||
<check_box name="always_on" label="Keep beacons when closing floater"/>
|
||||
<check_box name="touch_only" label="Objets scriptés avec "Toucher" uniquement"/>
|
||||
<check_box name="scripted" label="Objets scriptés"/>
|
||||
<check_box name="physical" label="Objets physiques"/>
|
||||
<check_box name="sounds" label="Sources sonores"/>
|
||||
<check_box name="particles" label="Sources de particules"/>
|
||||
<check_box name="highlights" label="Mettre en surbrillance"/>
|
||||
<check_box name="beacons" label="Montrer les balises"/>
|
||||
<text name="beacon_width_label">
|
||||
Largeur de la balise :
|
||||
</text>
|
||||
<check_box label="Montrer les balises" name="beacons"/>
|
||||
<check_box label="Mettre en surbrillance" name="highlights"/>
|
||||
<text name="beacon_width_label">
|
||||
Largeur de la balise :
|
||||
</text>
|
||||
<check_box label="Objets physiques" name="physical"/>
|
||||
<check_box label="Objets scriptés" name="scripted"/>
|
||||
<check_box label="Objets scriptés avec "Toucher" uniquement" name="touch_only"/>
|
||||
<check_box label="Sources sonores" name="sounds"/>
|
||||
<check_box label="Sources des particules" name="particles"/>
|
||||
<check_box label="Sources des médias" name="moapbeacon"/>
|
||||
</panel>
|
||||
</floater>
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="beacons" title="Balizas">
|
||||
<panel name="beacons_panel">
|
||||
<check_box label="Objetos programados com toque apenas" name="touch_only"/>
|
||||
<check_box label="Objetos programados" name="scripted"/>
|
||||
<check_box label="Objetos físicos" name="physical"/>
|
||||
<check_box label="Fontes de Som" name="sounds"/>
|
||||
<check_box label="Fontes de Partículas" name="particles"/>
|
||||
<check_box label="Renderização de Highlights" name="highlights"/>
|
||||
<check_box label="Renderização de Balizas" name="beacons"/>
|
||||
<text name="beacon_width_label">
|
||||
Largura da Baliza
|
||||
</text>
|
||||
<check_box label="Objetos físicos" name="physical"/>
|
||||
<check_box label="Objetos programados" name="scripted"/>
|
||||
<check_box label="Objetos programados com toque apenas" name="touch_only"/>
|
||||
<check_box label="Fontes de Som" name="sounds"/>
|
||||
<check_box label="Fontes de Partículas" name="particles"/>
|
||||
<check_box label="Fontes de mídia" name="moapbeacon"/>
|
||||
</panel>
|
||||
</floater>
|
||||
|
||||
Reference in New Issue
Block a user