summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorpavelkproductengine <pavelkproductengine@lindenlab.com>2015-12-22 20:27:19 +0200
committerpavelkproductengine <pavelkproductengine@lindenlab.com>2015-12-22 20:27:19 +0200
commit5d576df19047ec45070f6571ebcada26e5c20756 (patch)
treeea6e013829598bd3df1c29b1ffa828cb89ad81aa /indra
parent749bb57cd19d51090d64cd2261048b9a0654807b (diff)
MAINT-5194 Visual Outfit Browser
1)Added visual hilighting of worn outfit 2)Fixed colors of selection borders to fit initial design
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lloutfitgallery.cpp22
-rw-r--r--indra/newview/lloutfitgallery.h1
-rwxr-xr-xindra/newview/skins/default/colors.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml5
4 files changed, 25 insertions, 12 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index ec86e608f2..dc6db3307f 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -328,7 +328,8 @@ static LLDefaultChildRegistry::Register<LLOutfitGalleryItem> r("outfit_gallery_i
LLOutfitGalleryItem::LLOutfitGalleryItem(const Params& p)
: LLPanel(p),
mTexturep(NULL),
- mSelected(false)
+ mSelected(false),
+ mWorn(false)
{
buildFromFile("panel_outfit_gallery_item.xml");
}
@@ -356,7 +357,7 @@ void LLOutfitGalleryItem::draw()
// Draw border
- LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "FrogGreen" : "MouseGray", LLColor4::white);
+ LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "OutfitGalleryItemSelected" : "OutfitGalleryItemUnselected", LLColor4::white);
LLRect border = getChildView("preview_outfit")->getRect();
border.mRight = border.mRight + 1;
gl_rect_2d(border, border_color.get(), FALSE);
@@ -389,23 +390,22 @@ void LLOutfitGalleryItem::setOutfitName(std::string name)
void LLOutfitGalleryItem::setOutfitWorn(bool value)
{
+ mWorn = value;
//LLStringUtil::format_map_t string_args;
//std::string worn_text = getString("worn_text", string_args);
-
- if (value)
- {
- mOutfitWornText->setValue("(worn)");
- }
- else
- {
- mOutfitWornText->setValue("");
- }
+ LLStringUtil::format_map_t worn_string_args;
+ std::string worn_string = getString("worn_string", worn_string_args);
+ LLUIColor text_color = LLUIColorTable::instance().getColor(mSelected ? "White" : (mWorn ? "OutfitGalleryItemWorn" : "White"), LLColor4::white);
+ mOutfitWornText->setReadOnlyColor(text_color.get());
+ mOutfitNameText->setReadOnlyColor(text_color.get());
+ mOutfitWornText->setValue(value ? worn_string : "");
}
void LLOutfitGalleryItem::setSelected(bool value)
{
mSelected = value;
mTextBgPanel->setBackgroundVisible(value);
+ setOutfitWorn(mWorn);
}
BOOL LLOutfitGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask)
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 61a2981a29..81a019f416 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -150,6 +150,7 @@ private:
LLPanel* mTextBgPanel;
LLPanel* mFotoBgPanel;
bool mSelected;
+ bool mWorn;
};
#endif // LL_LLOUTFITGALLERYCTRL_H
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index bdc884885f..1ee3d0ec0c 100755
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -945,4 +945,13 @@
<color
name="SyntaxLslStringLiteral"
value="1 0.14 0 1" />
+ <color
+ name="OutfitGalleryItemSelected"
+ value="0.22 0.45 0.35 1" />
+ <color
+ name="OutfitGalleryItemWorn"
+ value="0.33 0.58 0.47 1" />
+ <color
+ name="OutfitGalleryItemUnselected"
+ value="0.4 0.4 0.4 1" />
</colors>
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml
index 535960502e..7c3e93fdae 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml
@@ -15,6 +15,9 @@
left="0"
top="0"
>
+ <string name="worn_string">
+ (worn)
+ </string>
<icon
left="1"
top="0"
@@ -29,7 +32,7 @@
<panel
background_visible="false"
background_opaque="true"
- bg_opaque_color="FrogGreen"
+ bg_opaque_color="OutfitGalleryItemSelected"
border="false"
bevel_style="none"
follows="left|top"