summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpaneloutfitedit.cpp18
-rw-r--r--indra/newview/llpaneloutfitedit.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml93
3 files changed, 89 insertions, 23 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 847778f828..ba6473839a 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -133,10 +133,6 @@ mRemoveFromOutfitBtn(NULL), mLookObserver(NULL)
mLookItemTypes.push_back(LLLookItemType());
}
- // TODO: make these strings translatable
- mLookItemTypes[LIT_ALL] = LLLookItemType("All Items", ALL_ITEMS_MASK);
- mLookItemTypes[LIT_WEARABLE] = LLLookItemType("Shape & Clothing", WEARABLE_MASK);
- mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType("Attachments", ATTACHMENT_MASK);
}
@@ -159,10 +155,15 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
BOOL LLPanelOutfitEdit::postBuild()
{
// gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels
-
+
+ mLookItemTypes[LIT_ALL] = LLLookItemType(getString("Filter.All"), ALL_ITEMS_MASK);
+ mLookItemTypes[LIT_WEARABLE] = LLLookItemType(getString("Filter.Clothes/Body"), WEARABLE_MASK);
+ mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK);
+
mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name");
childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL);
+ childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL);
mLookContents = getChild<LLScrollListCtrl>("look_items_list");
mLookContents->sortByColumn("look_item_sort", TRUE);
@@ -174,7 +175,7 @@ BOOL LLPanelOutfitEdit::postBuild()
mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
- LLComboBox* type_filter = getChild<LLComboBox>("inventory_filter");
+ LLComboBox* type_filter = getChild<LLComboBox>("filter_wearables_combobox");
type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1));
type_filter->removeall();
for (U32 i = 0; i < mLookItemTypes.size(); ++i)
@@ -236,6 +237,11 @@ void LLPanelOutfitEdit::showAddWearablesPanel()
childSetVisible("add_wearables_panel", childGetValue("add_btn"));
}
+void LLPanelOutfitEdit::showWearablesFilter()
+{
+ childSetVisible("filter_combobox_panel", childGetValue("filter_button"));
+}
+
void LLPanelOutfitEdit::saveOutfit(bool as_new)
{
if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index fa92d4c314..69e8016534 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -87,6 +87,7 @@ public:
// only update the location if there is none already available.
void showAddWearablesPanel();
+ void showWearablesFilter();
void saveOutfit(bool as_new = false);
void showSaveMenu();
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 6fbb3229ac..bc37af0319 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -25,6 +25,10 @@
(unknown)
</panel.string>
+ <!-- Wearables filtering strings -->
+ <string name="Filter.All" value="All"/>
+ <string name="Filter.Clothes/Body" value="Clothes/Body"/>
+ <string name="Filter.Objects" value="Objects"/>
<button
follows="top|left"
@@ -232,29 +236,18 @@
<layout_panel
auto_resize="true"
default_tab_group="3"
- height="250"
- min_height="120"
+ height="210"
+ min_height="210"
name="add_wearables_panel"
width="300"
tab_group="2"
user_resize="true"
visible="false">
- <text
- follows="top|left|right"
- font="SansSerifBold"
- height="13"
- layout="topleft"
- left="5"
- name="status"
- text_color="LtGray"
- top="5"
- value="Add Wearables"
- use_ellipses="true"
- width="275" />
-
+ <!-- *NOTE is not used, invisible and disabled -->
<filter_editor
background_image="TextField_Search_Off"
+ enabled="false"
follows="left|top|right"
font="SansSerif"
label="Filter"
@@ -264,13 +257,79 @@
height="20"
name="look_item_filter"
text_color="black"
- text_pad_left="25" />
+ text_pad_left="25"
+ visible="false"/>
+
+ <layout_stack
+ animate="true"
+ follows="all"
+ height="25"
+ width="300"
+ layout="topleft"
+ orientation="horizontal"
+ name="filter_panels"
+ top="0"
+ left="0">
+ <layout_panel
+ layout="topleft"
+ follows="left|top|right"
+ height="25"
+ label="IM Control Panel"
+ name="filter_button_panel"
+ width="150"
+ auto_resize="true"
+ user_resize="false">
+ <text
+ follows="top|left|right"
+ font="SansSerifBold"
+ height="13"
+ layout="topleft"
+ left="5"
+ name="add_to_outfit_label"
+ text_color="LtGray"
+ top="3"
+ value="Add to Outfit:"
+ use_ellipses="true"
+ width="270" />
+ <button
+ follows="top|right"
+ height="20"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay=""
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ label="O"
+ layout="topleft"
+ right="-1"
+ name="filter_button"
+ top="3"
+ width="20" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="true"
+ height="25"
+ min_width="130"
+ name="filter_combobox_panel"
+ width="150"
+ user_resize="false"
+ visible="false">
+ <combo_box
+ follows="top|left|right"
+ height="20"
+ layout="topleft"
+ right="-5"
+ name="filter_wearables_combobox"
+ top="0"
+ width="130"/>
+ </layout_panel>
+ </layout_stack>
<inventory_panel
allow_multi_select="false"
border="false"
follows="left|top|right|bottom"
- height="176"
+ height="155"
layout="topleft"
left="0"
mouse_opaque="false"