コード例 #1
0
void LLFloaterAvatarPicker::onList()
{
	getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());

// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
	if (rlv_handler_t::isEnabled())
	{
		LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");
		LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
		RLV_ASSERT( (pTabs) && (pNearMePanel) );
		if ( (pTabs) && (pNearMePanel) )
		{
			bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
			pTabs->enableTabButton(pTabs->getIndexForPanel(pNearMePanel), fRlvEnable);
			if ( (!fRlvEnable) && (pTabs->getCurrentPanel() == pNearMePanel) )
				pTabs->selectTabByName("SearchPanel");
		}
	}
// [/RLVa:KB]
}
コード例 #2
0
BOOL LLPanelGroupLandMoney::postBuild()
{
	/* This power was removed to make group roles simpler
	bool has_parcel_view     = gAgent.hasPowerInGroup(mGroupID,
													  GP_LAND_VIEW_OWNED);
	bool has_accounting_view = gAgent.hasPowerInGroup(mGroupID,
													  GP_ACCOUNTING_VIEW);
	*/
	
	bool can_view = gAgent.isInGroup(mGroupID);

	mImplementationp->mGroupOverLimitIconp = 
		getChild<LLIconCtrl>("group_over_limit_icon");
	mImplementationp->mGroupOverLimitTextp = 
		getChild<LLTextBox>("group_over_limit_text");

	mImplementationp->mYourContributionEditorp 
		= getChild<LLLineEditor>("your_contribution_line_editor");
	if ( mImplementationp->mYourContributionEditorp )
	{
		LLLineEditor* editor = mImplementationp->mYourContributionEditorp;

	    editor->setCommitCallback(mImplementationp->contributionCommitCallback, this);
		editor->setKeystrokeCallback(mImplementationp->contributionKeystrokeCallback, this);
	}

	mImplementationp->mMapButtonp = getChild<LLButton>("map_button");

	mImplementationp->mGroupParcelsp = 
		getChild<LLScrollListCtrl>("group_parcel_list");

	if ( mImplementationp->mGroupParcelsp )
	{
		mImplementationp->mGroupParcelsp->setCommitCallback(boost::bind(&LLPanelGroupLandMoney::onLandSelectionChanged, this));
		mImplementationp->mGroupParcelsp->setCommitOnSelectionChange(true);
	}

	mImplementationp->mCantViewParcelsText = getString("cant_view_group_land_text");
	mImplementationp->mCantViewAccountsText = getString("cant_view_group_accounting_text");
	mImplementationp->mEmptyParcelsText = getString("epmty_view_group_land_text");
	
	if ( mImplementationp->mMapButtonp )
	{
		mImplementationp->mMapButtonp->setClickedCallback(LLPanelGroupLandMoney::impl::mapCallback, mImplementationp);
	}

	if ( mImplementationp->mGroupOverLimitTextp )
	{
		mImplementationp->mGroupOverLimitTextp->setVisible(FALSE);
	}

	if ( mImplementationp->mGroupOverLimitIconp )
	{
		mImplementationp->mGroupOverLimitIconp->setVisible(FALSE);
	}

	if ( !can_view )
	{
		if ( mImplementationp->mGroupParcelsp )
		{
			mImplementationp->mGroupParcelsp->setCommentText(
							mImplementationp->mCantViewParcelsText);
			mImplementationp->mGroupParcelsp->setEnabled(FALSE);
		}
	}



	LLButton* earlierp, *laterp;
	LLTextEditor* textp;
	LLPanel* panelp;

	LLTabContainer* tabcp = getChild<LLTabContainer>("group_money_tab_container");

	if ( !can_view )
	{
		if ( tabcp )
		{
			S32 i;
			S32 tab_count = tabcp->getTabCount();

			for (i = tab_count - 1; i >=0; --i)
			{
				tabcp->enableTabButton(i, false);
			}
		}
	}

	std::string loading_text = getString("loading_txt");
	
	//pull out the widgets for the L$ details tab
	earlierp = getChild<LLButton>("earlier_details_button", true);
	laterp = getChild<LLButton>("later_details_button", true);
	textp = getChild<LLTextEditor>("group_money_details_text", true);
	panelp = getChild<LLPanel>("group_money_details_tab", true);

	if ( !can_view )
	{
		textp->setText(mImplementationp->mCantViewAccountsText);
	}
	else
	{
		mImplementationp->mMoneyDetailsTabEHp = 
			new LLGroupMoneyDetailsTabEventHandler(earlierp,
												   laterp,
												   textp,
												   tabcp,
												   panelp,
												   loading_text);
	}

	textp = getChild<LLTextEditor>("group_money_planning_text", true);
	panelp = getChild<LLPanel>("group_money_planning_tab", true);

	if ( !can_view )
	{
		textp->setText(mImplementationp->mCantViewAccountsText);
	}
	else
	{
		//Temporally disabled for DEV-11287.
		mImplementationp->mMoneyPlanningTabEHp = 
			new LLGroupMoneyPlanningTabEventHandler(textp,
													tabcp,
													panelp,
													loading_text);
	}

	//pull out the widgets for the L$ sales tab
	earlierp = getChild<LLButton>("earlier_sales_button", true);
	laterp = getChild<LLButton>("later_sales_button", true);
	textp = getChild<LLTextEditor>("group_money_sales_text", true);
	panelp = getChild<LLPanel>("group_money_sales_tab", true);

	if ( !can_view )
	{
		textp->setText(mImplementationp->mCantViewAccountsText);
	}
	else
	{
		mImplementationp->mMoneySalesTabEHp = 
			new LLGroupMoneySalesTabEventHandler(earlierp,
												 laterp,
												 textp,
												 tabcp,
												 panelp,
												 loading_text);
	}

	return LLPanelGroupTab::postBuild();
}
コード例 #3
0
void LLPanelGroupLandMoney::setGroupID(const LLUUID& id)
{
	LLPanelGroupLandMoney::sGroupIDs.removeData(mGroupID);
	LLPanelGroupTab::setGroupID(id);
	LLPanelGroupLandMoney::sGroupIDs.addData(mGroupID, this);


	bool can_view = gAgent.isInGroup(mGroupID);

	mImplementationp->mGroupOverLimitIconp = 
		getChild<LLIconCtrl>("group_over_limit_icon");
	mImplementationp->mGroupOverLimitTextp = 
		getChild<LLTextBox>("group_over_limit_text");

	mImplementationp->mYourContributionEditorp 
		= getChild<LLLineEditor>("your_contribution_line_editor");
	if ( mImplementationp->mYourContributionEditorp )
	{
		LLLineEditor* editor = mImplementationp->mYourContributionEditorp;

	    editor->setCommitCallback(mImplementationp->contributionCommitCallback, this);
		editor->setKeystrokeCallback(mImplementationp->contributionKeystrokeCallback, this);
	}

	mImplementationp->mMapButtonp = getChild<LLButton>("map_button");

	mImplementationp->mGroupParcelsp = 
		getChild<LLScrollListCtrl>("group_parcel_list");

	if ( mImplementationp->mGroupParcelsp )
	{
		mImplementationp->mGroupParcelsp->setCommitCallback(boost::bind(&LLPanelGroupLandMoney::onLandSelectionChanged, this));
		mImplementationp->mGroupParcelsp->setCommitOnSelectionChange(true);
	}

	mImplementationp->mCantViewParcelsText = getString("cant_view_group_land_text");
	mImplementationp->mCantViewAccountsText = getString("cant_view_group_accounting_text");
	
	if ( mImplementationp->mMapButtonp )
	{
		mImplementationp->mMapButtonp->setClickedCallback(LLPanelGroupLandMoney::impl::mapCallback, mImplementationp);
	}

	if ( mImplementationp->mGroupOverLimitTextp )
	{
		mImplementationp->mGroupOverLimitTextp->setVisible(FALSE);
	}

	if ( mImplementationp->mGroupOverLimitIconp )
	{
		mImplementationp->mGroupOverLimitIconp->setVisible(FALSE);
	}

	if ( mImplementationp->mGroupParcelsp )
	{
		mImplementationp->mGroupParcelsp->setEnabled(can_view);
	}

	if ( !can_view && mImplementationp->mGroupParcelsp )
	{
		mImplementationp->mGroupParcelsp->setEnabled(FALSE);
	}


	LLButton* earlierp, *laterp;
	LLTextEditor* textp;
	LLPanel* panelp;

	LLTabContainer* tabcp = getChild<LLTabContainer>("group_money_tab_container");

	if ( tabcp )
	{
		S32 i;
		S32 tab_count = tabcp->getTabCount();

		for (i = tab_count - 1; i >=0; --i)
		{
			tabcp->enableTabButton(i, can_view );
		}
	}

	std::string loading_text = getString("loading_txt");
	
	//pull out the widgets for the L$ details tab
	earlierp = getChild<LLButton>("earlier_details_button", true);
	laterp = getChild<LLButton>("later_details_button", true);
	textp = getChild<LLTextEditor>("group_money_details_text", true);
	panelp = getChild<LLPanel>("group_money_details_tab", true);

	if ( !can_view )
	{
		textp->setText(mImplementationp->mCantViewAccountsText);
	}
	else
	{
		if(mImplementationp->mMoneyDetailsTabEHp == 0)
			mImplementationp->mMoneyDetailsTabEHp = new LLGroupMoneyDetailsTabEventHandler(earlierp,laterp,textp,tabcp,panelp,loading_text);
		mImplementationp->mMoneyDetailsTabEHp->setGroupID(mGroupID);
	}

	textp = getChild<LLTextEditor>("group_money_planning_text", true);
	

	if ( !can_view )
	{
		textp->setText(mImplementationp->mCantViewAccountsText);
	}
	else
	{
		panelp = getChild<LLPanel>("group_money_planning_tab", true);
		if(mImplementationp->mMoneyPlanningTabEHp == 0)
			mImplementationp->mMoneyPlanningTabEHp = new LLGroupMoneyPlanningTabEventHandler(textp,tabcp,panelp,loading_text);
		mImplementationp->mMoneyPlanningTabEHp->setGroupID(mGroupID);
	}

	//pull out the widgets for the L$ sales tab
	textp = getChild<LLTextEditor>("group_money_sales_text", true);


	if ( !can_view )
	{
		textp->setText(mImplementationp->mCantViewAccountsText);
	}
	else
	{
		earlierp = getChild<LLButton>("earlier_sales_button", true);
		laterp = getChild<LLButton>("later_sales_button", true);
		panelp = getChild<LLPanel>("group_money_sales_tab", true);
		if(mImplementationp->mMoneySalesTabEHp == NULL) 
			mImplementationp->mMoneySalesTabEHp = new LLGroupMoneySalesTabEventHandler(earlierp,laterp,textp,tabcp,panelp,loading_text);
		mImplementationp->mMoneySalesTabEHp->setGroupID(mGroupID);
	}

	mImplementationp->mBeenActivated = false;

	activate();
}
コード例 #4
0
void LLFloaterWindLight::syncMenu()
{
	bool err;

	LLWLParamManager * param_mgr = LLWLParamManager::instance();

	LLWLParamSet& currentParams = param_mgr->mCurParams;
	//std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues;

	// blue horizon
	param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err);
	childSetValue("WLBlueHorizonR", param_mgr->mBlueHorizon.r / 2.0);
	childSetValue("WLBlueHorizonG", param_mgr->mBlueHorizon.g / 2.0);
	childSetValue("WLBlueHorizonB", param_mgr->mBlueHorizon.b / 2.0);
	childSetValue("WLBlueHorizonI", 
		std::max(param_mgr->mBlueHorizon.r / 2.0, 
			std::max(param_mgr->mBlueHorizon.g / 2.0, 
				param_mgr->mBlueHorizon.b / 2.0)));

	// haze density, horizon, mult, and altitude
	param_mgr->mHazeDensity = currentParams.getVector(param_mgr->mHazeDensity.mName, err);
	childSetValue("WLHazeDensity", param_mgr->mHazeDensity.r);
	param_mgr->mHazeHorizon = currentParams.getVector(param_mgr->mHazeHorizon.mName, err);
	childSetValue("WLHazeHorizon", param_mgr->mHazeHorizon.r);
	param_mgr->mDensityMult = currentParams.getVector(param_mgr->mDensityMult.mName, err);
	childSetValue("WLDensityMult", param_mgr->mDensityMult.x * 
		param_mgr->mDensityMult.mult);
	param_mgr->mMaxAlt = currentParams.getVector(param_mgr->mMaxAlt.mName, err);
	childSetValue("WLMaxAltitude", param_mgr->mMaxAlt.x);

	// blue density
	param_mgr->mBlueDensity = currentParams.getVector(param_mgr->mBlueDensity.mName, err);
	childSetValue("WLBlueDensityR", param_mgr->mBlueDensity.r / 2.0);
	childSetValue("WLBlueDensityG", param_mgr->mBlueDensity.g / 2.0);
	childSetValue("WLBlueDensityB", param_mgr->mBlueDensity.b / 2.0);
	childSetValue("WLBlueDensityI", 
		std::max(param_mgr->mBlueDensity.r / 2.0, 
		std::max(param_mgr->mBlueDensity.g / 2.0, param_mgr->mBlueDensity.b / 2.0)));

	// Lighting
	
	// sunlight
	param_mgr->mSunlight = currentParams.getVector(param_mgr->mSunlight.mName, err);
	childSetValue("WLSunlightR", param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE);
	childSetValue("WLSunlightG", param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE);
	childSetValue("WLSunlightB", param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE);
	childSetValue("WLSunlightI", 
		std::max(param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE, 
		std::max(param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE)));

	// glow
	param_mgr->mGlow = currentParams.getVector(param_mgr->mGlow.mName, err);
	childSetValue("WLGlowR", 2 - param_mgr->mGlow.r / 20.0f);
	childSetValue("WLGlowB", -param_mgr->mGlow.b / 5.0f);
		
	// ambient
	param_mgr->mAmbient = currentParams.getVector(param_mgr->mAmbient.mName, err);
	childSetValue("WLAmbientR", param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE);
	childSetValue("WLAmbientG", param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE);
	childSetValue("WLAmbientB", param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE);
	childSetValue("WLAmbientI", 
		std::max(param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE, 
		std::max(param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE)));		

	childSetValue("WLSunAngle", param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI);
	childSetValue("WLEastAngle", param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI);

	// Clouds

	// Cloud Color
	param_mgr->mCloudColor = currentParams.getVector(param_mgr->mCloudColor.mName, err);
	childSetValue("WLCloudColorR", param_mgr->mCloudColor.r);
	childSetValue("WLCloudColorG", param_mgr->mCloudColor.g);
	childSetValue("WLCloudColorB", param_mgr->mCloudColor.b);
	childSetValue("WLCloudColorI", 
		std::max(param_mgr->mCloudColor.r, 
		std::max(param_mgr->mCloudColor.g, param_mgr->mCloudColor.b)));

	// Cloud
	param_mgr->mCloudMain = currentParams.getVector(param_mgr->mCloudMain.mName, err);
	childSetValue("WLCloudX", param_mgr->mCloudMain.r);
	childSetValue("WLCloudY", param_mgr->mCloudMain.g);
	childSetValue("WLCloudDensity", param_mgr->mCloudMain.b);

	// Cloud Detail
	param_mgr->mCloudDetail = currentParams.getVector(param_mgr->mCloudDetail.mName, err);
	childSetValue("WLCloudDetailX", param_mgr->mCloudDetail.r);
	childSetValue("WLCloudDetailY", param_mgr->mCloudDetail.g);
	childSetValue("WLCloudDetailDensity", param_mgr->mCloudDetail.b);

	// Cloud extras
	param_mgr->mCloudCoverage = currentParams.getVector(param_mgr->mCloudCoverage.mName, err);
	param_mgr->mCloudScale = currentParams.getVector(param_mgr->mCloudScale.mName, err);
	childSetValue("WLCloudCoverage", param_mgr->mCloudCoverage.x);
	childSetValue("WLCloudScale", param_mgr->mCloudScale.x);

	// cloud scrolling
	bool lockX = !param_mgr->mCurParams.getEnableCloudScrollX();
	bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY();
	childSetValue("WLCloudLockX", lockX);
	childSetValue("WLCloudLockY", lockY);
	childSetValue("DrawClassicClouds", gSavedSettings.getBOOL("SkyUseClassicClouds"));
	
	// disable if locked, enable if not
	if(lockX) 
	{
		childDisable("WLCloudScrollX");
	} else {
		childEnable("WLCloudScrollX");
	}
	if(lockY)
	{
		childDisable("WLCloudScrollY");
	} else {
		childEnable("WLCloudScrollY");
	}

	// *HACK cloud scrolling is off my an additive of 10
	childSetValue("WLCloudScrollX", param_mgr->mCurParams.getCloudScrollX() - 10.0f);
	childSetValue("WLCloudScrollY", param_mgr->mCurParams.getCloudScrollY() - 10.0f);

	param_mgr->mDistanceMult = currentParams.getVector(param_mgr->mDistanceMult.mName, err);
	childSetValue("WLDistanceMult", param_mgr->mDistanceMult.x);

	// Tweak extras

	param_mgr->mWLGamma = currentParams.getVector(param_mgr->mWLGamma.mName, err);
	childSetValue("WLGamma", param_mgr->mWLGamma.x);

	childSetValue("WLStarAlpha", param_mgr->mCurParams.getStarBrightness());

	LLTabContainer* tab = getChild<LLTabContainer>("WindLight Tabs");
	LLPanel* panel = getChild<LLPanel>("Scattering");

	tab->enableTabButton(tab->getIndexForPanel(panel), gSavedSettings.getBOOL("RenderDeferredGI"));
}
コード例 #5
0
// Checked: 2011-11-04 (RLVa-1.4.4a) | Modified: RLVa-1.4.4a
void RlvUIEnabler::onToggleShowInv(bool fQuitting)
{
    if (fQuitting)
        return;	// Nothing to do if the viewer is shutting down

    bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV);

    //
    // When disabling, close any inventory floaters that may be open
    //
    if (!fEnable)
    {
        LLFloaterReg::const_instance_list_t lFloaters = LLFloaterReg::getFloaterList("inventory");
        for (LLFloaterReg::const_instance_list_t::const_iterator itFloater = lFloaters.begin(); itFloater != lFloaters.end(); ++itFloater)
            (*itFloater)->closeFloater();

        LLFloaterReg::const_instance_list_t lSecFloaters = LLFloaterReg::getFloaterList("secondary_inventory");
        for (LLFloaterReg::const_instance_list_t::const_iterator itSecFloater = lSecFloaters.begin(); itSecFloater != lSecFloaters.end(); ++itSecFloater)
            (*itSecFloater)->closeFloater();
    }

    //
    // Enable/disable the "My Outfits" panel on the "My Appearance" sidebar tab
    //
    LLPanelOutfitsInventory* pAppearancePanel = LLPanelOutfitsInventory::findInstance();
    RLV_ASSERT(pAppearancePanel);
    if (pAppearancePanel)
    {
        LLTabContainer* pAppearanceTabs = pAppearancePanel->getAppearanceTabs();
        LLOutfitsList* pMyOutfitsPanel = pAppearancePanel->getMyOutfitsPanel();
        if ( (pAppearanceTabs) && (pMyOutfitsPanel) )
        {
            S32 idxTab = pAppearanceTabs->getIndexForPanel(pMyOutfitsPanel);
            RLV_ASSERT(-1 != idxTab);
            pAppearanceTabs->enableTabButton(idxTab, fEnable);

            // When disabling, switch to the COF tab if "My Outfits" is currently active
            if ( (!fEnable) && (pAppearanceTabs->getCurrentPanelIndex() == idxTab) )
                pAppearanceTabs->selectTabPanel(pAppearancePanel->getCurrentOutfitPanel());
        }

        LLSidepanelAppearance* pCOFPanel = pAppearancePanel->getAppearanceSP();
        RLV_ASSERT(pCOFPanel);
        if ( (!fEnable) && (pCOFPanel) && (pCOFPanel->isOutfitEditPanelVisible()) )
        {
            // TODO-RLVa: we should really just be collapsing the "Add more..." inventory panel (and disable the button)
            pCOFPanel->showOutfitsInventoryPanel();
        }
    }

    //
    // Filter (or stop filtering) opening new inventory floaters
    //
    // <FS:Ansariel> Modified for FIRE-8804
    if (!fEnable)
    {
        addGenericFloaterFilter("inventory");
        addGenericFloaterFilter("secondary_inventory");
    }
    else
    {
        removeGenericFloaterFilter("inventory");
        removeGenericFloaterFilter("secondary_inventory");
    }
}