コード例 #1
0
// Per-frame updates of visibility
void LLToolBar::refresh()
{
	BOOL show = gSavedSettings.getBOOL("ShowToolBar");
	BOOL mouselook = gAgent.cameraMouselook();
	setVisible(show && !mouselook);

	BOOL sitting = FALSE;
	if (gAgent.getAvatarObject())
	{
		sitting = gAgent.getAvatarObject()->mIsSitting;
	}

	childSetEnabled("fly_btn", (gAgent.canFly() || gAgent.getFlying()) && !sitting );

	childSetEnabled("build_btn", LLViewerParcelMgr::getInstance()->agentCanBuild() );

	// Check to see if we're in build mode
	BOOL build_mode = LLToolMgr::getInstance()->inEdit();
	// And not just clicking on a scripted object
	if (LLToolGrab::getInstance()->getHideBuildHighlight())
	{
		build_mode = FALSE;
	}
	gSavedSettings.setBOOL("BuildBtnState", build_mode);

	if (isInVisibleChain())
	{
		updateCommunicateList();
	}
}
コード例 #2
0
// Per-frame updates of visibility
void LLToolBar::refresh()
{
	if(!isAgentAvatarValid())
		return;

	static LLCachedControl<bool> show("ShowToolBar", true);
	static LLCachedControl<bool> ascent_fly_always_enabled("AscentFlyAlwaysEnabled", true);
	static LLCachedControl<bool> ascent_build_always_enabled("AscentBuildAlwaysEnabled", true);
	BOOL mouselook = gAgentCamera.cameraMouselook();
	setVisible(show && !mouselook);

	BOOL sitting = FALSE;
	static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
	if (continue_flying_on_unsit)
	{
		sitting = false;
	}
	else if (gAgentAvatarp)
	{
		sitting = gAgentAvatarp->isSitting();
	}

	mFlyBtn->setEnabled((gAgent.canFly() || gAgent.getFlying() || ascent_fly_always_enabled) && !sitting );
	mBuildBtn->setEnabled((LLViewerParcelMgr::getInstance()->allowAgentBuild() || ascent_build_always_enabled));

	// Check to see if we're in build mode
	BOOL build_mode = LLToolMgr::getInstance()->inEdit();
	// And not just clicking on a scripted object
	if (LLToolGrab::getInstance()->getHideBuildHighlight())
	{
		build_mode = FALSE;
	}
	static LLCachedControl<bool> build_btn_state("BuildBtnState",false);
	if(build_btn_state!=(bool)build_mode)
		build_btn_state = build_mode;

// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
	// Called per-frame so this really can't be slow
	if (rlv_handler_t::isEnabled())
	{
		// If we're rez-restricted, we can still edit => allow build floater
		// If we're edit-restricted, we can still rez => allow build floater
		mBuildBtn->setEnabled(!(gRlvHandler.hasBehaviour(RLV_BHVR_REZ) && gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)));

		mMapBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP));
		mRadarBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP));
		mInventoryBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
	}
// [/RLVa:KB]

	if (isInVisibleChain())
	{
		updateCommunicateList();
	}
}
コード例 #3
0
// Per-frame updates of visibility
void LLToolBar::refresh()
{
	BOOL show = gSavedSettings.getBOOL("ShowToolBar");
	BOOL mouselook = gAgent.cameraMouselook();
	setVisible(show && !mouselook);

	if (isInVisibleChain())
	{
		updateCommunicateList();
	}
}
コード例 #4
0
// Per-frame updates of visibility
void LLToolBar::refresh()
{
	BOOL show = sShowToolBar;
	BOOL mouselook = gAgent.cameraMouselook();
	setVisible(show && !mouselook);

	BOOL sitting = FALSE;
	if (gAgent.getAvatarObject())
	{
		sitting = gAgent.getAvatarObject()->mIsSitting;
	}

	childSetEnabled("fly_btn", (gAgent.canFly() || gAgent.getFlying()) && !sitting );

	childSetEnabled("build_btn", LLViewerParcelMgr::getInstance()->agentCanBuild() );

	// Check to see if we're in build mode
	BOOL build_mode = LLToolMgr::getInstance()->inEdit();
	// And not just clicking on a scripted object
	if (LLToolGrab::getInstance()->getHideBuildHighlight())
	{
		build_mode = FALSE;
	}
	//gSavedSettings.setBOOL("BuildBtnState", build_mode);
	LLAgent::sBuildBtnState = build_mode;

// [RLVa:KB] - Version: 1.23.4 | Alternate: Emerald-370 | Checked: 2009-07-10 (RLVa-1.0.0g)
	// Called per-frame so this really can't be slow
	if (rlv_handler_t::isEnabled())
	{
		// If we're rez-restricted, we can still edit => allow build floater
		// If we're edit-restricted, we can still rez => allow build floater
		childSetEnabled("build_btn", !(gRlvHandler.hasBehaviour(RLV_BHVR_REZ) && gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) );

		childSetEnabled("map_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP) );
		childSetEnabled("radar_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP) );
		childSetEnabled("inventory_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV) );

		// Emerald-specific
		childSetEnabled("avatar_list_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
	}
// [/RLVa:KB]

	if (isInVisibleChain())
	{
		updateCommunicateList();
	}
}
コード例 #5
0
// Per-frame updates of visibility
void LLToolBar::refresh()
{
	static const LLCachedControl<bool> show_toolbar("ShowToolBar", true);
	bool show = show_toolbar;
	if (show && gAgentCamera.cameraMouselook())
	{
		static const LLCachedControl<bool> hidden("LiruMouselookHidesToolbar");
		show = !hidden;
	}
	setVisible(show);
	if (!show) return; // Everything below this point manipulates visible UI, anyway

	updateCommunicateList();

	if (!isAgentAvatarValid()) return;

	static const LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
	mFlyBtn->setEnabled((gAgent.canFly() || gAgent.getFlying()) && (continue_flying_on_unsit || !gAgentAvatarp->isSitting()));
	static const LLCachedControl<bool> ascent_build_always_enabled("AscentBuildAlwaysEnabled", true);
	mBuildBtn->setEnabled(ascent_build_always_enabled || LLViewerParcelMgr::getInstance()->allowAgentBuild());

	// Check to see if we're in build mode
	// And not just clicking on a scripted object
	bool build_mode = LLToolMgr::getInstance()->inEdit() && !LLToolGrab::getInstance()->getHideBuildHighlight();
	static LLCachedControl<bool> build_btn_state("BuildBtnState",false);
	if (build_btn_state != build_mode)
		build_btn_state = build_mode;

// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
	// Called per-frame so this really can't be slow
	if (rlv_handler_t::isEnabled())
	{
		// If we're rez-restricted, we can still edit => allow build floater
		// If we're edit-restricted, we can still rez => allow build floater
		mBuildBtn->setEnabled(!(gRlvHandler.hasBehaviour(RLV_BHVR_REZ) && gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)));

		mMapBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP));
		mRadarBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP));
		mInventoryBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
	}
// [/RLVa:KB]
}