diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-04-22 00:31:42 +0300 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-04-22 17:50:45 +0300 |
commit | 107b1d00ed5d272cd87a6ca333cd719151208eaa (patch) | |
tree | dbce2349e162ef24705c070b7190ef8ce2ec2871 /indra/newview | |
parent | 0625302f50128b308099c5100c6065810cd57596 (diff) |
SL-19636 Profile badges
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llavatarpropertiesprocessor.h | 1 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 60 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/icons/profile_badge_beta.png | bin | 0 -> 3223 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png | bin | 0 -> 3221 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/icons/profile_badge_lifetime.png | bin | 0 -> 3302 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/icons/profile_badge_linden.png | bin | 0 -> 3521 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png | bin | 0 -> 3311 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png | bin | 0 -> 3301 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_profile_secondlife.xml | 56 |
10 files changed, 119 insertions, 6 deletions
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index f778634d25..10cde35f9c 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -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; }; diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 708ff26ced..34e1fd09d8 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -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); } diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta.png b/indra/newview/skins/default/textures/icons/profile_badge_beta.png Binary files differnew file mode 100644 index 0000000000..7c8a723c47 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/profile_badge_beta.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png Binary files differnew file mode 100644 index 0000000000..7c38e9e2ae --- /dev/null +++ b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png Binary files differnew file mode 100644 index 0000000000..475edd080e --- /dev/null +++ b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_linden.png b/indra/newview/skins/default/textures/icons/profile_badge_linden.png Binary files differnew file mode 100644 index 0000000000..1b6ac03e86 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/profile_badge_linden.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png Binary files differnew file mode 100644 index 0000000000..4286995202 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png Binary files differnew file mode 100644 index 0000000000..47e93c4fac --- /dev/null +++ b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 1f2c0867c4..03fc00b8f9 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -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"/> diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml index 777b37d666..07cdd6d71e 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml @@ -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="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="frind_layout" + 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" |