FIRE-30096: Display attachment points in appearance window lists; Special bonus: Highlight items in red if there is a mismatch between what is being attached and what is linked in CoF
parent
07fc971f71
commit
18c9f97895
|
|
@ -47,6 +47,7 @@ static const S32 WIDGET_SPACING = 3;
|
|||
|
||||
LLPanelInventoryListItemBase::Params::Params()
|
||||
: default_style("default_style"),
|
||||
mismatch_style("mismatch_style"), // <FS:Ansariel> Better attachment list
|
||||
worn_style("worn_style"),
|
||||
hover_image("hover_image"),
|
||||
selected_image("selected_image"),
|
||||
|
|
@ -361,6 +362,14 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image)
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Better attachment list
|
||||
//virtual
|
||||
const LLPanelInventoryListItemBase::Params& LLPanelInventoryListItemBase::getDefaultParams() const
|
||||
{
|
||||
return LLUICtrlFactory::getDefaultParams<LLPanelInventoryListItemBase>();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLPanelInventoryListItemBase::setTitle(const std::string& title,
|
||||
const std::string& highlit_text,
|
||||
EItemState item_state)
|
||||
|
|
@ -370,7 +379,10 @@ void LLPanelInventoryListItemBase::setTitle(const std::string& title,
|
|||
|
||||
LLStyle::Params style_params;
|
||||
|
||||
const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelInventoryListItemBase>();
|
||||
// <FS:Ansariel> Better attachment list
|
||||
//const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelInventoryListItemBase>();
|
||||
const LLPanelInventoryListItemBase::Params& params = getDefaultParams();
|
||||
// </FS:Ansariel>
|
||||
|
||||
switch(item_state)
|
||||
{
|
||||
|
|
@ -380,6 +392,11 @@ void LLPanelInventoryListItemBase::setTitle(const std::string& title,
|
|||
case IS_WORN:
|
||||
style_params = params.worn_style();
|
||||
break;
|
||||
// <FS:Ansariel> Better attachment list
|
||||
case IS_MISMATCH:
|
||||
style_params = params.mismatch_style();
|
||||
break;
|
||||
// </FS:Ansariel>
|
||||
default:;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
|
||||
{
|
||||
Optional<LLStyle::Params> default_style,
|
||||
mismatch_style, // <FS:Ansariel> Better attachment list
|
||||
worn_style;
|
||||
Optional<LLUIImage*> hover_image,
|
||||
selected_image,
|
||||
|
|
@ -76,6 +77,7 @@ public:
|
|||
typedef enum e_item_state {
|
||||
IS_DEFAULT,
|
||||
IS_WORN,
|
||||
IS_MISMATCH // <FS:Ansariel> Better attachment list
|
||||
} EItemState;
|
||||
|
||||
static LLPanelInventoryListItemBase* create(LLViewerInventoryItem* item);
|
||||
|
|
@ -196,6 +198,8 @@ protected:
|
|||
*/
|
||||
virtual BOOL handleToolTip( S32 x, S32 y, MASK mask);
|
||||
|
||||
virtual const LLPanelInventoryListItemBase::Params& getDefaultParams() const; // <FS:Ansariel> Better attachment list
|
||||
|
||||
const LLUUID mInventoryItemUUID;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -135,11 +135,35 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name,
|
|||
// We don't use get_is_item_worn() here because this update is triggered by
|
||||
// an inventory observer upon link in COF beind added or removed so actual
|
||||
// worn status of a linked item may still remain unchanged.
|
||||
if (mWornIndicationEnabled && LLAppearanceMgr::instance().isLinkedInCOF(mInventoryItemUUID))
|
||||
// <FS:Ansariel> Better attachment list
|
||||
//if (mWornIndicationEnabled && LLAppearanceMgr::instance().isLinkedInCOF(mInventoryItemUUID))
|
||||
//{
|
||||
// search_label += LLTrans::getString("worn");
|
||||
// item_state = IS_WORN;
|
||||
//}
|
||||
if (mWornIndicationEnabled && get_is_item_worn(mInventoryItemUUID))
|
||||
{
|
||||
search_label += LLTrans::getString("worn");
|
||||
item_state = IS_WORN;
|
||||
std::string attachment_point_name;
|
||||
if (getType() != LLAssetType::AT_OBJECT || !isAgentAvatarValid()) // System layer or error condition, can't figure out attach point
|
||||
{
|
||||
search_label += LLTrans::getString("worn");
|
||||
}
|
||||
else if (gAgentAvatarp->getAttachedPointName(mInventoryItemUUID, attachment_point_name))
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ATTACHMENT_POINT]"] = LLTrans::getString(attachment_point_name);
|
||||
search_label += LLTrans::getString("WornOnAttachmentPoint", args);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ATTACHMENT_ERROR]"] = LLTrans::getString(attachment_point_name);
|
||||
search_label += LLTrans::getString("AttachmentErrorMessage", args);
|
||||
}
|
||||
|
||||
item_state = LLAppearanceMgr::instance().isLinkedInCOF(mInventoryItemUUID) ? IS_WORN : IS_MISMATCH;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLPanelInventoryListItemBase::updateItem(search_label, item_state);
|
||||
}
|
||||
|
|
@ -452,6 +476,12 @@ void FSPanelCOFWearableOutfitListItem::updateItemWeight(U32 item_weight)
|
|||
}
|
||||
mWeightCtrl->setText(complexity_string);
|
||||
}
|
||||
|
||||
//virtual
|
||||
const LLPanelInventoryListItemBase::Params& FSPanelCOFWearableOutfitListItem::getDefaultParams() const
|
||||
{
|
||||
return LLUICtrlFactory::getDefaultParams<FSPanelCOFWearableOutfitListItem>();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ protected:
|
|||
FSPanelCOFWearableOutfitListItem(LLViewerInventoryItem* item,
|
||||
bool worn_indication_enabled, const Params& params);
|
||||
|
||||
virtual const LLPanelInventoryListItemBase::Params& getDefaultParams() const;
|
||||
private:
|
||||
LLTextBox* mWeightCtrl;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
top="0"
|
||||
width="309"
|
||||
show_complexity="true"
|
||||
worn_indication_enabled="false" />
|
||||
worn_indication_enabled="true" />
|
||||
</accordion_tab>
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -1883,8 +1883,8 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich unter http://suppo
|
|||
<string name="NoContents">
|
||||
Keine Inhalte
|
||||
</string>
|
||||
<string name="WornOnAttachmentPoint" value=" (getragen am [ATTACHMENT_POINT])"/>
|
||||
<string name="AttachmentErrorMessage" value="([ATTACHMENT_ERROR])"/>
|
||||
<string name="WornOnAttachmentPoint" value=" (getragen an [ATTACHMENT_POINT])"/>
|
||||
<string name="AttachmentErrorMessage" value=" ([ATTACHMENT_ERROR])"/>
|
||||
<string name="ActiveGesture" value="[GESLABEL] (aktiviert)"/>
|
||||
<string name="PermYes">
|
||||
Ja
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
top="0"
|
||||
width="309"
|
||||
show_complexity="true"
|
||||
worn_indication_enabled="false" />
|
||||
worn_indication_enabled="true" />
|
||||
</accordion_tab>
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,22 @@
|
|||
name="cof_wearable_item"
|
||||
bottom="0"
|
||||
width="380">
|
||||
<!-- DEFAULT style for inventory list item -->
|
||||
<default_style
|
||||
font="SansSerifSmall"
|
||||
font.style="NORMAL" />
|
||||
|
||||
<!-- style for inventory list item WORN on avatar -->
|
||||
<worn_style
|
||||
font="SansSerifSmall"
|
||||
font.style="NORMAL"
|
||||
color="White" />
|
||||
|
||||
<!-- style for inventory list item WORN on avatar, but not linked in COF -->
|
||||
<mismatch_style
|
||||
font="SansSerifSmall"
|
||||
font.style="BOLD"
|
||||
color="LtRed" />
|
||||
<item_icon
|
||||
height="16"
|
||||
follows="top|left"
|
||||
|
|
@ -24,7 +40,7 @@
|
|||
parse_urls="false"
|
||||
use_ellipses="true"
|
||||
name="item_name"
|
||||
text_color="white"
|
||||
text_color="White"
|
||||
top="4"
|
||||
value="..."
|
||||
width="359" />
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@
|
|||
font="SansSerifSmall"
|
||||
font.style="BOLD"
|
||||
color="EmphasisColor" />
|
||||
|
||||
<!-- style for inventory list item WORN on avatar, but not linked in COF -->
|
||||
<mismatch_style
|
||||
font="SansSerifSmall"
|
||||
font.style="BOLD"
|
||||
color="LtRed" />
|
||||
<item_icon
|
||||
height="16"
|
||||
follows="top|left"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
top="0"
|
||||
width="309"
|
||||
show_complexity="true"
|
||||
worn_indication_enabled="false" />
|
||||
worn_indication_enabled="true" />
|
||||
</accordion_tab>
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@
|
|||
font="SansSerifSmall"
|
||||
font.style="BOLD"
|
||||
color="EmphasisColor" />
|
||||
|
||||
<!-- style for inventory list item WORN on avatar, but not linked in COF -->
|
||||
<mismatch_style
|
||||
font="SansSerifSmall"
|
||||
font.style="BOLD"
|
||||
color="LtRed" />
|
||||
<item_icon
|
||||
height="16"
|
||||
follows="top|left"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@
|
|||
font="SansSerifSmall"
|
||||
font.style="BOLD"
|
||||
color="SL-EmphasisColor" />
|
||||
|
||||
<!-- style for inventory list item WORN on avatar, but not linked in COF -->
|
||||
<mismatch_style
|
||||
font="SansSerifSmall"
|
||||
font.style="BOLD"
|
||||
color="LtRed" />
|
||||
<item_icon
|
||||
height="16"
|
||||
follows="top|left"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
top="0"
|
||||
width="309"
|
||||
show_complexity="true"
|
||||
worn_indication_enabled="false" />
|
||||
worn_indication_enabled="true" />
|
||||
</accordion_tab>
|
||||
<accordion_tab
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue