diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-04-30 19:55:00 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-04-30 19:55:00 +0300 |
commit | ccd4215fd4292ed34d68dd7be2c2cc2de92addcc (patch) | |
tree | 528dfa71dde5cb0d5befe6741f0d77575d0e54d9 /indra/newview/llsidepanelappearance.cpp | |
parent | f247dc68df1ae1972a9bca14f774f9dcba75b12e (diff) |
Implemented task EXT-6559 (Appearance panel: Add edit button in place of the image display next to current look).
- Changed the topmost part of the Appearance panel:
* Added new "Edit current outfit" button.
* Implemented COF status display (unsaved/wearing) according to the spec.
* Minor XUI changes (font / dimensions / bg color).
- Removed the temporary "Edit current outfit" button from the bottom of the Appearance panel.
- Removed the temporary "ShowDebugAppearanceEditor" setting.
TODO: use icons from the spec (currently missing).
Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/339/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index f38df19de0..08098e2adb 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -44,6 +44,7 @@ #include "llfoldervieweventlistener.h" #include "llpaneleditwearable.h" #include "llpaneloutfitsinventory.h" +#include "llsidetray.h" #include "lltextbox.h" #include "lluictrlfactory.h" #include "llviewerregion.h" @@ -115,6 +116,8 @@ BOOL LLSidepanelAppearance::postBuild() mEditAppearanceBtn = getChild<LLButton>("editappearance_btn"); mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this)); + childSetAction("edit_outfit_btn", boost::bind(&LLSidepanelAppearance::onEditOutfitButtonClicked, this)); + mEditBtn = getChild<LLButton>("edit_btn"); mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this)); @@ -154,7 +157,7 @@ BOOL LLSidepanelAppearance::postBuild() mCurrentLookName = getChild<LLTextBox>("currentlook_name"); - mOutfitDirtyTag = getChild<LLTextBox>("currentlook_title"); + mOutfitStatus = getChild<LLTextBox>("currentlook_status"); mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook"); @@ -238,6 +241,13 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked() } } +void LLSidepanelAppearance::onEditOutfitButtonClicked() +{ + LLSD key; + key["type"] = "edit_outfit"; + LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); +} + void LLSidepanelAppearance::onEditButtonClicked() { toggleOutfitEditPanel(FALSE); @@ -339,7 +349,11 @@ void LLSidepanelAppearance::updateVerbs() void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) { - mOutfitDirtyTag->setVisible(LLAppearanceMgr::getInstance()->isOutfitDirty()); + // Set current outfit status (wearing/unsaved). + bool dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); + std::string cof_status_str = getString(dirty ? "Unsaved Changes" : "Now Wearing"); + mOutfitStatus->setText(cof_status_str); + if (name == "") { std::string outfit_name; |