diff options
| -rw-r--r-- | indra/newview/llstatusbar.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llstatusbar.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/widgets/menu.xml | 2 | 
3 files changed, 14 insertions, 11 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b3b2b9ee5d..0c9c6eaebe 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -122,7 +122,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect)  	mTextTime(NULL),  	mSGBandwidth(NULL),  	mSGPacketLoss(NULL), -	mBtnBuyCurrency(NULL),  	mBtnVolume(NULL),  	mBalance(0),  	mHealth(100), @@ -153,8 +152,10 @@ LLStatusBar::LLStatusBar(const LLRect& rect)  	mTextHealth = getChild<LLTextBox>("HealthText" );  	mTextTime = getChild<LLTextBox>("TimeText" ); -	mBtnBuyCurrency = getChild<LLButton>( "buycurrency" ); -	mBtnBuyCurrency->setClickedCallback( onClickBuyCurrency, this ); +	getChild<LLUICtrl>("buycurrency")->setCommitCallback(  +		boost::bind(&LLStatusBar::onClickBuyCurrency, this)); +	getChild<LLUICtrl>("buyL")->setCommitCallback( +		boost::bind(&LLStatusBar::onClickBuyCurrency, this));  	mBtnVolume = getChild<LLButton>( "volume_btn" );  	mBtnVolume->setClickedCallback( onClickVolume, this ); @@ -362,7 +363,8 @@ void LLStatusBar::refresh()  void LLStatusBar::setVisibleForMouselook(bool visible)  {  	mTextTime->setVisible(visible); -	mBtnBuyCurrency->setVisible(visible); +	getChild<LLUICtrl>("buycurrency")->setVisible(visible); +	getChild<LLUICtrl>("buyL")->setVisible(visible);  	mSGBandwidth->setVisible(visible);  	mSGPacketLoss->setVisible(visible);  	setBackgroundVisible(visible); @@ -382,17 +384,18 @@ void LLStatusBar::setBalance(S32 balance)  {  	std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); +	LLButton* btn_buy_currency = getChild<LLButton>("buycurrency");  	LLStringUtil::format_map_t string_args;  	string_args["[AMT]"] = llformat("%s", money_str.c_str());  	std::string labe_str = getString("buycurrencylabel", string_args); -	mBtnBuyCurrency->setLabel(labe_str); +	btn_buy_currency->setLabel(labe_str);  	// Resize the balance button so that the label fits it, and the button expands to the left.  	// *TODO: LLButton should have an option where to expand.  	{ -		S32 saved_right = mBtnBuyCurrency->getRect().mRight; -		mBtnBuyCurrency->autoResize(); -		mBtnBuyCurrency->translate(saved_right - mBtnBuyCurrency->getRect().mRight, 0); +		S32 saved_right = btn_buy_currency->getRect().mRight; +		btn_buy_currency->autoResize(); +		btn_buy_currency->translate(saved_right - btn_buy_currency->getRect().mRight, 0);  	}  	if (mBalance && (fabs((F32)(mBalance - balance)) > gSavedSettings.getF32("UISndMoneyChangeThreshold"))) @@ -497,7 +500,7 @@ S32 LLStatusBar::getSquareMetersLeft() const  	return mSquareMetersCredit - mSquareMetersCommitted;  } -static void onClickBuyCurrency(void* data) +void LLStatusBar::onClickBuyCurrency()  {  	LLFloaterBuyCurrency::buyCurrency();  } diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 0e98da0fe4..21a98dd753 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -91,6 +91,7 @@ private:  	// simple method to setup the part that holds the date  	void setupDate(); +	void onClickBuyCurrency();  	void onVolumeChanged(const LLSD& newvalue);  	static void onMouseEnterVolume(LLUICtrl* ctrl); @@ -103,7 +104,6 @@ private:  	LLStatGraph *mSGBandwidth;  	LLStatGraph *mSGPacketLoss; -	LLButton	*mBtnBuyCurrency;  	LLButton	*mBtnVolume;  	S32				mBalance; diff --git a/indra/newview/skins/default/xui/en/widgets/menu.xml b/indra/newview/skins/default/xui/en/widgets/menu.xml index 53034afa61..58543338f6 100644 --- a/indra/newview/skins/default/xui/en/widgets/menu.xml +++ b/indra/newview/skins/default/xui/en/widgets/menu.xml @@ -1,7 +1,7 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <menu bg_color="MenuDefaultBgColor"        bg_visible="true" -      drop_shadow="false" +      drop_shadow="true"        tear_off="false"        shortcut_pad="15">  </menu>  | 
