SL-19636 Profile badges
parent
0625302f50
commit
107b1d00ed
|
|
@ -85,6 +85,7 @@ struct LLAvatarData
|
|||
std::string profile_url;
|
||||
U8 caption_index;
|
||||
std::string caption_text;
|
||||
std::string customer_type;
|
||||
U32 flags;
|
||||
BOOL allow_publish;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
|
|||
avatar_data->fl_about_text = result["fl_about_text"].asString();
|
||||
avatar_data->born_on = result["member_since"].asDate();
|
||||
avatar_data->profile_url = getProfileURL(agent_id.asString());
|
||||
avatar_data->customer_type = result["customer_type"].asString();
|
||||
|
||||
avatar_data->flags = 0;
|
||||
|
||||
|
|
@ -1051,6 +1052,8 @@ void LLPanelProfileSecondLife::resetData()
|
|||
mCantEditObjectsIcon->setEnabled(false);
|
||||
|
||||
childSetVisible("partner_layout", FALSE);
|
||||
childSetVisible("badge_layout", FALSE);
|
||||
childSetVisible("partner_spacer_layout", TRUE);
|
||||
}
|
||||
|
||||
void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
|
||||
|
|
@ -1258,6 +1261,59 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
|
|||
|
||||
std::string caption_text = getString("CaptionTextAcctInfo", args);
|
||||
getChild<LLUICtrl>("account_info")->setValue(caption_text);
|
||||
|
||||
const S32 LINDEN_EMPLOYEE_INDEX = 3;
|
||||
LLDate sl_release;
|
||||
sl_release.fromYMDHMS(2003, 6, 23, 0, 0, 0);
|
||||
std::string customer_lower = avatar_data->customer_type;
|
||||
LLStringUtil::toLower(customer_lower);
|
||||
if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX)
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Linden");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLinden"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (avatar_data->born_on < sl_release)
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBeta"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "beta_lifetime")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBetaLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "lifetime")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "premium_lifetime")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Premium_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else if (customer_lower == "pplus_lifetime" || customer_lower == "premium_plus_lifetime")
|
||||
{
|
||||
getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Pplus_Lifetime");
|
||||
getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumPlusLifetime"));
|
||||
childSetVisible("badge_layout", TRUE);
|
||||
childSetVisible("partner_spacer_layout", FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetVisible("badge_layout", FALSE);
|
||||
childSetVisible("partner_spacer_layout", TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelProfileSecondLife::fillRightsData()
|
||||
|
|
@ -1412,7 +1468,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
|
|||
}
|
||||
else
|
||||
{
|
||||
childSetVisible("frind_layout", false);
|
||||
childSetVisible("friend_layout", false);
|
||||
childSetVisible("online_layout", false);
|
||||
childSetVisible("offline_layout", false);
|
||||
}
|
||||
|
|
@ -1420,7 +1476,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
|
|||
|
||||
void LLPanelProfileSecondLife::processOnlineStatus(bool is_friend, bool show_online, bool online)
|
||||
{
|
||||
childSetVisible("frind_layout", is_friend);
|
||||
childSetVisible("friend_layout", is_friend);
|
||||
childSetVisible("online_layout", online && show_online);
|
||||
childSetVisible("offline_layout", !online && show_online);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
|
|
@ -510,7 +510,13 @@ with the same filename but different name
|
|||
<texture name="Play_Off" file_name="icons/Play_Off.png" preload="false" />
|
||||
<texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" />
|
||||
<texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" />
|
||||
|
||||
|
||||
<texture name="Profile_Badge_Beta" file_name="icons/profile_badge_beta.png" preload="true"/>
|
||||
<texture name="Profile_Badge_Beta_Lifetime" file_name="icons/profile_badge_beta_lifetime.png" preload="true"/>
|
||||
<texture name="Profile_Badge_Lifetime" file_name="icons/profile_badge_lifetime.png" preload="true"/>
|
||||
<texture name="Profile_Badge_Linden" file_name="icons/profile_badge_linden.png" preload="true"/>
|
||||
<texture name="Profile_Badge_Pplus_Lifetime" file_name="icons/profile_badge_pplus_lifetime.png" preload="true"/>
|
||||
<texture name="Profile_Badge_Premium_Lifetime" file_name="icons/profile_badge_premium_lifetime.png" preload="true"/>
|
||||
<texture name="Profile_Group_Visibility_Off" file_name="icons/profile_group_visibility_eye_off.png" preload="true"/>
|
||||
<texture name="Profile_Group_Visibility_Off_Pressed" file_name="icons/profile_group_visibility_eye_off_pressed.png" preload="true"/>
|
||||
<texture name="Profile_Group_Visibility_On" file_name="icons/profile_group_visibility_eye_on.png" preload="true"/>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,26 @@
|
|||
Account: [ACCTTYPE]
|
||||
[PAYMENTINFO]
|
||||
</string>
|
||||
|
||||
<!--Badges-->
|
||||
<string
|
||||
name="BadgeBeta"
|
||||
value="Original Beta Tester" />
|
||||
<string
|
||||
name="BadgeBetaLifetime"
|
||||
value="Beta Lifetime member" />
|
||||
<string
|
||||
name="BadgeLifetime"
|
||||
value="Lifetime member" />
|
||||
<string
|
||||
name="BadgeLinden"
|
||||
value="Linden Lab employee" />
|
||||
<string
|
||||
name="BadgePremiumLifetime"
|
||||
value="Premium lifetime" />
|
||||
<string
|
||||
name="BadgePremiumPlusLifetime"
|
||||
value="Premium Plus lifetime" />
|
||||
|
||||
<layout_stack
|
||||
name="image_stack"
|
||||
|
|
@ -156,9 +176,39 @@ Account: [ACCTTYPE]
|
|||
user_resize="false"
|
||||
visible="true">
|
||||
</layout_panel>
|
||||
|
||||
|
||||
<layout_panel
|
||||
name="frind_layout"
|
||||
name="badge_layout"
|
||||
follows="all"
|
||||
layout="topleft"
|
||||
height="40"
|
||||
auto_resize="false"
|
||||
user_resize="false"
|
||||
visible="false">
|
||||
<icon
|
||||
name="badge_icon"
|
||||
image_name="Beta_Tester"
|
||||
layout="topleft"
|
||||
follows="left|top"
|
||||
top="10"
|
||||
left="5"
|
||||
height="18"
|
||||
width="18"/>
|
||||
<text
|
||||
name="badge_text"
|
||||
value="Badge Tester"
|
||||
top="13"
|
||||
left_pad="3"
|
||||
right="-1"
|
||||
height="16"
|
||||
follows="left|top|right"
|
||||
layout="topleft"
|
||||
translate="false"
|
||||
visible="true"/>
|
||||
</layout_panel>
|
||||
|
||||
<layout_panel
|
||||
name="friend_layout"
|
||||
follows="all"
|
||||
layout="topleft"
|
||||
height="16"
|
||||
|
|
@ -166,7 +216,7 @@ Account: [ACCTTYPE]
|
|||
user_resize="false"
|
||||
visible="false">
|
||||
<text
|
||||
name="frind_text"
|
||||
name="friend_text"
|
||||
value="You are friends"
|
||||
text_color="ConversationFriendColor"
|
||||
top="0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue