Skip to content
Snippets Groups Projects
Commit 399bd564 authored by Jonathan Yap's avatar Jonathan Yap
Browse files

STORM-653 As a user i would like to be able to see the available number of...

STORM-653 As a user i would like to be able to see the available number of attachments and remaining free slots.
parent b015ab4b
No related branches found
No related tags found
No related merge requests found
...@@ -595,6 +595,7 @@ Jonathan Yap ...@@ -595,6 +595,7 @@ Jonathan Yap
STORM-1719 STORM-1719
STORM-1712 STORM-1712
STORM-1728 STORM-1728
STORM-653
Kadah Coba Kadah Coba
STORM-1060 STORM-1060
Jondan Lundquist Jondan Lundquist
......
...@@ -328,6 +328,19 @@ BOOL LLCOFWearables::postBuild() ...@@ -328,6 +328,19 @@ BOOL LLCOFWearables::postBuild()
return LLPanel::postBuild(); return LLPanel::postBuild();
} }
void LLCOFWearables::setAttachmentsTitle()
{
if (mAttachmentsTab)
{
U32 free_slots = MAX_AGENT_ATTACHMENTS - mAttachments->size();
LLStringUtil::format_map_t args_attachments;
args_attachments["[COUNT]"] = llformat ("%d", free_slots);
std::string attachments_title = LLTrans::getString("Attachments remain", args_attachments);
mAttachmentsTab->setTitle(attachments_title);
}
}
void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list) void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list)
{ {
if (!selected_list) return; if (!selected_list) return;
...@@ -490,6 +503,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel ...@@ -490,6 +503,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
{ {
mAttachments->sort(); mAttachments->sort();
mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false)
setAttachmentsTitle();
} }
else else
{ {
......
...@@ -91,6 +91,8 @@ class LLCOFWearables : public LLPanel ...@@ -91,6 +91,8 @@ class LLCOFWearables : public LLPanel
*/ */
void selectClothing(LLWearableType::EType clothing_type); void selectClothing(LLWearableType::EType clothing_type);
void setAttachmentsTitle();
protected: protected:
void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items); void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items);
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
top="0" top="0"
width="311" /> width="311" />
</accordion_tab> </accordion_tab>
<!-- The Attachments title is overwritten by the definition of "Attachments remain" in strings.xml -->
<accordion_tab <accordion_tab
layout="topleft" layout="topleft"
name="tab_attachments" name="tab_attachments"
......
...@@ -2133,6 +2133,7 @@ Returns a string with the requested data about the region ...@@ -2133,6 +2133,7 @@ Returns a string with the requested data about the region
<string name="InvFolder All">All</string> <string name="InvFolder All">All</string>
<string name="no_attachments">No attachments worn</string> <string name="no_attachments">No attachments worn</string>
<string name="Attachments remain">Attachments ([COUNT] slots remain)</string>
<!-- inventory FVBridge --> <!-- inventory FVBridge -->
<!-- This is used in llpanelinventory.cpp when constructing a context menu for an item for Sale --> <!-- This is used in llpanelinventory.cpp when constructing a context menu for an item for Sale -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment