diff options
| author | Richard Linden <none@none> | 2010-09-22 19:11:29 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2010-09-22 19:11:29 -0700 |
| commit | abe758d45fa3dd3524a4c7a9667e4f02c3de8eac (patch) | |
| tree | 7ac140c51c22a42c693b0930898e0996a807ecb8 /indra/newview/llstatusbar.cpp | |
| parent | 264b549bcb991f4cdd6889f06b8f7fbe8740e32a (diff) | |
| parent | b124d45b4ef714acfe629af554768950dcdd5f2c (diff) | |
merge
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
| -rw-r--r-- | indra/newview/llstatusbar.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 2c15ff9aed..c3e4775fe1 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -33,6 +33,7 @@ #include "llagentcamera.h" #include "llbutton.h" #include "llcommandhandler.h" +#include "llfirstuse.h" #include "llviewercontrol.h" #include "llfloaterbuycurrency.h" #include "llbuycurrencyhtml.h" @@ -41,6 +42,7 @@ #include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" +#include "llhints.h" #include "llhudicon.h" #include "llnavigationbar.h" #include "llkeyboard.h" @@ -126,7 +128,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBalanceTimer = new LLFrameTimer(); mHealthTimer = new LLFrameTimer(); - LLUICtrlFactory::getInstance()->buildPanel(this,"panel_status_bar.xml"); + buildFromFile("panel_status_bar.xml"); } LLStatusBar::~LLStatusBar() @@ -174,6 +176,8 @@ BOOL LLStatusBar::postBuild() mMediaToggle->setClickedCallback( &LLStatusBar::onClickMediaToggle, this ); mMediaToggle->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterNearbyMedia, this)); + LLHints::registerHintTarget("linden_balance", getChild<LLView>("balance_bg")->getHandle()); + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); // Adding Net Stat Graph @@ -321,6 +325,11 @@ void LLStatusBar::creditBalance(S32 credit) void LLStatusBar::setBalance(S32 balance) { + if (balance > getBalance() && getBalance() != 0) + { + LLFirstUse::receiveLindens(); + } + std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); LLTextBox* balance_box = getChild<LLTextBox>("balance"); @@ -443,6 +452,7 @@ void LLStatusBar::onClickBuyCurrency() // open a currency floater - actual one open depends on // value specified in settings.xml LLBuyCurrencyHTML::openCurrencyFloater(); + LLFirstUse::receiveLindens(false); } void LLStatusBar::onMouseEnterVolume() |
