- changed : only prevent teleporting home when both @tplm=n *and* @tploc=n restricted
- changed : visually disable the "Home" button on the navigation bar when unable to teleport home - changed : visually disable the "Go Home" button on the worldmap floater when unable to teleport home --HG-- branch : RLVameow-7.2.2
parent
8c32b5fe60
commit
1c6b4da6e0
|
|
@ -3311,10 +3311,11 @@ void LLAgent::teleportRequest(
|
|||
// Landmark ID = LLUUID::null means teleport home
|
||||
void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0d
|
||||
// TODO-RLVa: [RLVa-1.2.1] Allow teleporting home if @tplm=n restricted but not @tploc=n restricted and vice versa?
|
||||
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
|
||||
// NOTE: we'll allow teleporting home unless both @tplm=n *and* @tploc=n restricted
|
||||
if ( (rlv_handler_t::isEnabled()) &&
|
||||
( (gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)) ||
|
||||
( ( (landmark_asset_id.notNull()) ? gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)
|
||||
: gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC) ) ||
|
||||
((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->isSitting())) ))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -75,6 +75,10 @@
|
|||
|
||||
#include "llwindow.h" // copyTextToClipboard()
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Constants
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
@ -434,6 +438,10 @@ void LLFloaterWorldMap::draw()
|
|||
// childSetEnabled("Clear", (BOOL)tracking_status);
|
||||
childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->isTracking());
|
||||
childSetEnabled("copy_slurl", (mSLURL.isValid()) );
|
||||
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
|
||||
childSetEnabled("Go Home",
|
||||
(!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
|
||||
// [/RLVa:KB]
|
||||
|
||||
setMouseOpaque(TRUE);
|
||||
getDragHandle()->setMouseOpaque(TRUE);
|
||||
|
|
|
|||
|
|
@ -69,6 +69,10 @@ RlvUIEnabler::RlvUIEnabler()
|
|||
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_SHOWWORLDMAP, boost::bind(&RlvUIEnabler::onToggleShowWorldMap, this)));
|
||||
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_UNSIT, boost::bind(&RlvUIEnabler::onToggleUnsit, this)));
|
||||
|
||||
// onToggleTp
|
||||
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_TPLOC, boost::bind(&RlvUIEnabler::onToggleTp, this)));
|
||||
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_TPLM, boost::bind(&RlvUIEnabler::onToggleTp, this)));
|
||||
|
||||
// onUpdateLoginLastLocation
|
||||
#ifdef RLV_EXTENSION_STARTLOCATION
|
||||
m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_TPLOC, boost::bind(&RlvUIEnabler::onUpdateLoginLastLocation, this)));
|
||||
|
|
@ -323,6 +327,16 @@ void RlvUIEnabler::onToggleShowWorldMap()
|
|||
removeGenericFloaterFilter("world_map");
|
||||
}
|
||||
|
||||
// Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
|
||||
void RlvUIEnabler::onToggleTp()
|
||||
{
|
||||
// Disable the navigation bar "Home" button if both @tplm=n *and* @tploc=n restricted
|
||||
LLButton* pNavBarHomeBtn = LLNavigationBar::getInstance()->getChild<LLButton>("home_btn");
|
||||
RLV_ASSERT(pNavBarHomeBtn);
|
||||
if (pNavBarHomeBtn)
|
||||
pNavBarHomeBtn->setEnabled(!(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
|
||||
}
|
||||
|
||||
// Checked: 2010-03-01 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
|
||||
void RlvUIEnabler::onToggleUnsit()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ protected:
|
|||
void onToggleShowMinimap(); // showminimap
|
||||
void onToggleShowNames(); // shownames
|
||||
void onToggleShowWorldMap(); // showworldmap
|
||||
void onToggleTp(); // tploc and tplm
|
||||
void onToggleUnsit(); // unsit
|
||||
void onToggleViewXXX(); // viewnote, viewscript, viewtexture
|
||||
void onUpdateLoginLastLocation(); // tploc and unsit
|
||||
|
|
|
|||
Loading…
Reference in New Issue