diff options
author | Andrew Polunin <apolunin@productengine.com> | 2010-06-24 15:32:36 +0300 |
---|---|---|
committer | Andrew Polunin <apolunin@productengine.com> | 2010-06-24 15:32:36 +0300 |
commit | 216ef01f09191ac6571f9dd1b66004b6b35d6296 (patch) | |
tree | 36ef6c10a93cb0d4598d57911d4613b40918f4be /indra | |
parent | 5a3e16390975b2b8c24b07f52fac89d0d6f3c99b (diff) |
EXT-7614 FIXED (\"Shop\" button's title is overlaid with new title)
- Added member mShopBtn (which corresponds to the 'Shop' button) to the LLSidepanelInventory class.
- Added code to the LLSidepanelInventory::updateVerbs() which makes this button visible and enabled by default and hides it when any other button should appear on it's place ('Wear', 'Play' or 'Teleport').
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/630/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 63b6fe5ef0..de59af49da 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -71,8 +71,8 @@ BOOL LLSidepanelInventory::postBuild() mShareBtn = mInventoryPanel->getChild<LLButton>("share_btn"); mShareBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShareButtonClicked, this)); - LLButton* shop_btn = mInventoryPanel->getChild<LLButton>("shop_btn"); - shop_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this)); + mShopBtn = mInventoryPanel->getChild<LLButton>("shop_btn"); + mShopBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this)); mWearBtn = mInventoryPanel->getChild<LLButton>("wear_btn"); mWearBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onWearButtonClicked, this)); @@ -265,6 +265,7 @@ void LLSidepanelInventory::updateVerbs() mPlayBtn->setEnabled(FALSE); mTeleportBtn->setVisible(FALSE); mTeleportBtn->setEnabled(FALSE); + mShopBtn->setVisible(TRUE); mShareBtn->setEnabled(canShare()); @@ -283,16 +284,19 @@ void LLSidepanelInventory::updateVerbs() case LLInventoryType::IT_ATTACHMENT: mWearBtn->setVisible(TRUE); mWearBtn->setEnabled(TRUE); + mShopBtn->setVisible(FALSE); break; case LLInventoryType::IT_SOUND: case LLInventoryType::IT_GESTURE: case LLInventoryType::IT_ANIMATION: mPlayBtn->setVisible(TRUE); mPlayBtn->setEnabled(TRUE); + mShopBtn->setVisible(FALSE); break; case LLInventoryType::IT_LANDMARK: mTeleportBtn->setVisible(TRUE); mTeleportBtn->setEnabled(TRUE); + mShopBtn->setVisible(FALSE); break; default: break; diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 13275d14c0..951fdd630c 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -94,6 +94,7 @@ private: LLButton* mPlayBtn; LLButton* mTeleportBtn; LLButton* mOverflowBtn; + LLButton* mShopBtn; }; |