MAINT-5194 Visual Outfit Browser
1)Added visual hilighting of worn outfit 2)Fixed colors of selection borders to fit initial designmeow-7.2.2
parent
749bb57cd1
commit
5d576df190
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ private:
|
|||
LLPanel* mTextBgPanel;
|
||||
LLPanel* mFotoBgPanel;
|
||||
bool mSelected;
|
||||
bool mWorn;
|
||||
};
|
||||
|
||||
#endif // LL_LLOUTFITGALLERYCTRL_H
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue