Commit b9f6285d authored by TOM_RUS's avatar TOM_RUS

WOW-31884patch8.2.5_PTR

parent b38deb09
......@@ -268,6 +268,15 @@ local Club =
{ Name = "avatarIds", Type = "table", InnerType = "number", Nilable = true },
},
},
{
Name = "GetClubCapacity",
Type = "Function",
Returns =
{
{ Name = "capacity", Type = "number", Nilable = false },
},
},
{
Name = "GetClubInfo",
Type = "Function",
......
......@@ -505,6 +505,17 @@ local ClubFinder =
{ Name = "type", Type = "ClubFinderRequestType", Nilable = false },
},
},
{
Name = "ClubFinderClubReported",
Type = "Event",
LiteralName = "CLUB_FINDER_CLUB_REPORTED",
Documentation = { "Sends an update to the UI about a reported guild or community." },
Payload =
{
{ Name = "type", Type = "ClubFinderRequestType", Nilable = false },
{ Name = "clubFinderGUID", Type = "string", Nilable = false },
},
},
{
Name = "ClubFinderCommunityOfflineJoin",
Type = "Event",
......@@ -739,6 +750,7 @@ local ClubFinder =
{ Name = "lastPosterGUID", Type = "string", Nilable = false },
{ Name = "clubId", Type = "string", Nilable = false },
{ Name = "lastUpdatedTime", Type = "number", Nilable = false },
{ Name = "clubForceRemoved", Type = "bool", Nilable = false },
},
},
{
......
......@@ -32,7 +32,7 @@ local PartyInfo =
{
Name = "ConfirmConvertToRaid",
Type = "Function",
Documentation = { "Immediately convert to raid with no regard for potentially destructive actions" },
Documentation = { "Immediately convert to raid with no regard for potentially destructive actions." },
},
{
Name = "ConfirmInviteTravelPass",
......@@ -47,7 +47,7 @@ local PartyInfo =
{
Name = "ConfirmInviteUnit",
Type = "Function",
Documentation = { "Immediately invites the named unit to a party, with no regard for potentially destructive actions" },
Documentation = { "Immediately invites the named unit to a party, with no regard for potentially destructive actions." },
Arguments =
{
......@@ -64,6 +64,19 @@ local PartyInfo =
{ Name = "category", Type = "number", Nilable = true },
},
},
{
Name = "ConfirmRequestInviteFromUnit",
Type = "Function",
Documentation = { "Immediately request an invite into the target party, this is the confirmation function to call after RequestInviteFromUnit, or if you would like to skip the confirmation process." },
Arguments =
{
{ Name = "targetName", Type = "string", Nilable = false },
{ Name = "tank", Type = "bool", Nilable = true },
{ Name = "healer", Type = "bool", Nilable = true },
{ Name = "dps", Type = "bool", Nilable = true },
},
},
{
Name = "ConvertToParty",
Type = "Function",
......@@ -71,7 +84,7 @@ local PartyInfo =
{
Name = "ConvertToRaid",
Type = "Function",
Documentation = { "Usually this will convert to raid immediately. In some cases (e.g. PartySync) the user will be prompted to confirm converting to raid, because it's potentially destructive" },
Documentation = { "Usually this will convert to raid immediately. In some cases (e.g. PartySync) the user will be prompted to confirm converting to raid, because it's potentially destructive." },
},
{
Name = "GetActiveCategories",
......@@ -117,7 +130,7 @@ local PartyInfo =
{
Name = "InviteUnit",
Type = "Function",
Documentation = { "Attempt to invite the named unit to a party, requires confirmation in some cases (e.g. the party will convert to a raid, or if there is a party sync in progress)" },
Documentation = { "Attempt to invite the named unit to a party, requires confirmation in some cases (e.g. the party will convert to a raid, or if there is a party sync in progress)." },
Arguments =
{
......@@ -148,6 +161,19 @@ local PartyInfo =
{ Name = "category", Type = "number", Nilable = true },
},
},
{
Name = "RequestInviteFromUnit",
Type = "Function",
Documentation = { "Attempt to request an invite into the target party, requires confirmation in some cases (e.g. there is a party sync in progress)." },
Arguments =
{
{ Name = "targetName", Type = "string", Nilable = false },
{ Name = "tank", Type = "bool", Nilable = true },
{ Name = "healer", Type = "bool", Nilable = true },
{ Name = "dps", Type = "bool", Nilable = true },
},
},
},
Events =
......@@ -356,6 +382,20 @@ local PartyInfo =
{ Name = "preempted", Type = "bool", Nilable = false },
},
},
{
Name = "RequestInviteConfirmation",
Type = "Event",
LiteralName = "REQUEST_INVITE_CONFIRMATION",
Payload =
{
{ Name = "targetName", Type = "string", Nilable = false },
{ Name = "partyLevelLink", Type = "number", Nilable = false },
{ Name = "questSessionActive", Type = "bool", Nilable = false },
{ Name = "tank", Type = "bool", Nilable = true },
{ Name = "healer", Type = "bool", Nilable = true },
{ Name = "dps", Type = "bool", Nilable = true },
},
},
{
Name = "RoleChangedInform",
Type = "Event",
......
......@@ -19,9 +19,9 @@ local QuestSessionConstants =
{
Name = "QuestSessionResult",
Type = "Enumeration",
NumValues = 31,
NumValues = 32,
MinValue = 0,
MaxValue = 30,
MaxValue = 31,
Fields =
{
{ Name = "Ok", Type = "QuestSessionResult", EnumValue = 0 },
......@@ -54,7 +54,8 @@ local QuestSessionConstants =
{ Name = "Resync", Type = "QuestSessionResult", EnumValue = 27 },
{ Name = "Restricted", Type = "QuestSessionResult", EnumValue = 28 },
{ Name = "InPetBattle", Type = "QuestSessionResult", EnumValue = 29 },
{ Name = "Unknown", Type = "QuestSessionResult", EnumValue = 30 },
{ Name = "InvalidPublicParty", Type = "QuestSessionResult", EnumValue = 30 },
{ Name = "Unknown", Type = "QuestSessionResult", EnumValue = 31 },
},
},
},
......
......@@ -48,7 +48,7 @@
</OnClick>
</Scripts>
</Button>
<ScrollFrame parentKey="ChannelList" inherits="ChannelListTemplate">
<ScrollFrame parentKey="ChannelList" inherits="ChannelListTemplate" enableMouseMotion="true">
<Size x="178" y="0"/>
<Anchors>
<Anchor point="TOPLEFT" x="7" y="-67" />
......@@ -62,7 +62,7 @@
</Anchors>
</Frame>
<Frame parentKey="ChannelRoster" inherits="ChannelRosterTemplate">
<Frame parentKey="ChannelRoster" inherits="ChannelRosterTemplate" enableMouseMotion="true">
<Size x="1" y="0" />
<Anchors>
<Anchor point="TOPRIGHT" x="-26" y="-64" />
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\..\FrameXML\UI.xsd">
<Script file="ClubFinder.lua"/>
<ScrollFrame name="ClubFinderEditBoxScrollFrameTemplate" inherits="InputScrollFrameTemplate" virtual="true">
<Size x="328" y="70"/>
<Anchors>
......@@ -14,7 +14,7 @@
<KeyValue key="cursorOffset" value="0" type="number"/>
</KeyValues>
</ScrollFrame>
<Frame name="ClubsFinderJoinClubWarningTemplate" enableMouse="true" frameStrata="DIALOG" mixin="ClubsFinderJoinClubWarningMixin" virtual="true">
<Size x="400" y="100"/>
<Layers>
......@@ -56,7 +56,7 @@
<OnShow method="OnShow"/>
</Scripts>
</Frame>
<Frame name="ClubFinderInvitationsFrameTemplate" mixin="ClubFinderInvitationsFrameMixin" hidden="true" virtual="true">
<Frames>
<Frame parentKey="WarningDialog" inherits="ClubsFinderJoinClubWarningTemplate" hidden="true">
......@@ -489,7 +489,7 @@
<OnEvent method="OnEvent"/>
</Scripts>
</Frame>
<Frame name="ClubFinderBigSpecializationCheckBoxTemplate" virtual="true">
<Size x="200" y="40"/>
<Frames>
......@@ -545,7 +545,7 @@
</Layer>
</Layers>
</Frame>
<Frame name="ClubFinderRequestToJoinTemplate" enableMouse="true" frameStrata="DIALOG" mixin="ClubFinderRequestToJoinMixin" virtual="true">
<Size x="400" y="420"/>
<Layers>
......@@ -687,7 +687,7 @@
<OnHide method="OnHide"/>
</Scripts>
</Frame>
<Frame name="ClubPendingRecruitListFrameTemplate" mixin="ClubPendingRecruitListMixin" virtual="true">
<Frames>
<Frame parentKey="ColumnDisplay" useParentLevel="true" inherits="ColumnDisplayTemplate" hidden="true">
......@@ -762,12 +762,12 @@
</Frame>
</Frames>
</Frame>
<Frame name="ClubFinderGuildCardTemplate" mixin="ClubFinderGuildCardMixin" virtual="true">
<Size x="178" y="264"/>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="CardBackground" atlas="guildfinder-card" useAtlasSize="true"/>
<Texture parentKey="CardBackground" atlas="guildfinder-card" useAtlasSize="true"/>
</Layer>
<Layer level="BORDER">
<Texture parentKey="GuildBannerBackground" atlas="guildfinder-card-guildbanner-background">
......@@ -817,6 +817,12 @@
<Anchor point="RIGHT" relativeKey="$parent.MemberCount" relativePoint="RIGHT" x="25" y="0"/>
</Anchors>
</Texture>
<FontString parentKey="ReportedDescription" hidden="true" justifyH="TOP" inherits="GameFontHighlight" text="CLUB_FINDER_THANK_YOU_REPORTED">
<Size x="155" y="40"/>
<Anchors>
<Anchor point="BOTTOM" relativeKey="$parent.GuildBannerBorder" relativePoint="BOTTOM" x="0" y="-32"/>
</Anchors>
</FontString>
<FontString parentKey="Description" justifyH="CENTER" inherits="GameFontNormal">
<Size x="155" y="95"/>
<Anchors>
......@@ -860,7 +866,7 @@
<OnMouseDown method="OnMouseDown"/>
</Scripts>
</Frame>
<Frame name="ClubFinderFocusDropdownTemplate" inherits="UIDropDownMenuTemplate" mixin="ClubFocusDropdownMixin" virtual="true">
<Size x="100" y="15"/>
<Layers>
......@@ -874,7 +880,7 @@
</Layer>
</Layers>
</Frame>
<CheckButton name="ClubFinderCheckboxTemplate" mixin="ClubFinderCheckboxMixin" virtual="true">
<Scripts>
<OnClick method="OnClick"/>
......@@ -967,7 +973,7 @@
<OnLeave method="OnLeave"/>
</Scripts>
</Frame>
<Button name="ClubFinderCommunitiesCardTemplate" motionScriptsWhileDisabled="true" mixin="ClubFinderCommunitiesCardMixin" virtual="true">
<Size x="570" y="71"/>
<Anchors>
......@@ -1000,6 +1006,12 @@
<Anchor point="CENTER" x="-4"/>
</Anchors>
</FontString>
<FontString parentKey="ReportedDescription" hidden="true" justifyH="LEFT" justifyV="TOP" text="CLUB_FINDER_THANK_YOU_REPORTED" inherits="GameFontHighlight">
<Size x="400" y="20"/>
<Anchors>
<Anchor point="CENTER" x="0" y="-5"/>
</Anchors>
</FontString>
<FontString parentKey="MemberCount" inherits="GameFontNormal">
<Anchors>
<Anchor point="BOTTOMLEFT" relativeKey="$parent.Description" relativePoint="BOTTOMLEFT" x="0" y="-15"/>
......@@ -1047,7 +1059,7 @@
<Frame parentKey="RequestJoin">
<Size x="60" y="60"/>
<Anchors>
<Anchor point="RIGHT"/>
<Anchor point="RIGHT"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
......@@ -1084,7 +1096,7 @@
</Anchors>
</HighlightTexture>
</Button>
<Frame name="ClubFinderCommunitiesCardFrameTemplate" virtual="true">
<Frames>
<ScrollFrame parentKey="ListScrollFrame" inherits="HybridScrollFrameTemplate">
......@@ -1101,7 +1113,7 @@
</Slider>
</Frames>
</ScrollFrame>
</Frames>
</Frames>
</Frame>
<Frame name="ClubFinderOptionsTemplate" mixin="ClubFinderOptionsMixin" virtual="true">
......@@ -1164,7 +1176,7 @@
</Layer>
</Layers>
<Frames>
<CheckButton parentKey="CheckBox" mixin="ClubFinderRoleCheckBoxMixin" inherits="ClubFinderCheckboxTemplate">
<CheckButton parentKey="CheckBox" mixin="ClubFinderRoleCheckBoxMixin" motionScriptsWhileDisabled="true" inherits="ClubFinderCheckboxTemplate">
<Size x="23" y="23"/>
<Anchors>
<Anchor point="BOTTOM" relativeKey="$parent.Icon" relativePoint="BOTTOM" x="-12" y="-8"/>
......@@ -1190,7 +1202,7 @@
</Layer>
</Layers>
<Frames>
<CheckButton parentKey="CheckBox" mixin="ClubFinderRoleCheckBoxMixin" inherits="ClubFinderCheckboxTemplate">
<CheckButton parentKey="CheckBox" mixin="ClubFinderRoleCheckBoxMixin" motionScriptsWhileDisabled="true" inherits="ClubFinderCheckboxTemplate">
<Size x="23" y="23"/>
<Anchors>
<Anchor point="BOTTOM" relativeKey="$parent.Icon" relativePoint="BOTTOM" x="-12" y="-8"/>
......@@ -1216,7 +1228,7 @@
</Layer>
</Layers>
<Frames>
<CheckButton parentKey="CheckBox" mixin="ClubFinderRoleCheckBoxMixin" inherits="ClubFinderCheckboxTemplate">
<CheckButton parentKey="CheckBox" mixin="ClubFinderRoleCheckBoxMixin" motionScriptsWhileDisabled="true" inherits="ClubFinderCheckboxTemplate">
<Size x="23" y="23"/>
<Anchors>
<Anchor point="BOTTOM" relativeKey="$parent.Icon" relativePoint="BOTTOM" x="-12" y="-8"/>
......@@ -1299,7 +1311,7 @@
<OnShow method="OnShow"/>
</Scripts>
</Frame>
<Frame parentKey="RequestToJoinFrame" inherits="ClubFinderRequestToJoinTemplate" hidden="true">
<Anchors>
<Anchor point="TOP" relativeTo="UIParent" x="0" y="-80"/>
......@@ -1343,6 +1355,34 @@
</OnShow>
</Scripts>
</Frame>
<Frame parentKey="DisabledFrame" inherits="InsetFrameTemplate">
<Anchors>
<Anchor point="TOPLEFT" x="0" y="20"/>
<Anchor point="BOTTOMRIGHT" x="4" y="-2"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture atlas="communities-widebackground" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString parentKey="Title" inherits="Game30Font" text="GUILD">
<Anchors>
<Anchor point="TOP" x="0" y="-55"/>
</Anchors>
</FontString>
<FontString parentKey="Description" text="COMMUNITIES_GUILD_FINDER_DESCRIPTION" inherits="GameFontNormalMed1">
<Size x="500" y="500"/>
<Anchors>
<Anchor point="CENTER" y="30"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<CheckButton parentKey="ClubFinderSearchTab" mixin="ClubFinderTabMixin" hidden="false" inherits="CommunitiesFrameTabTemplate">
<KeyValues>
<KeyValue key="tooltip" value="SEARCH" type="global"/>
......
......@@ -40,8 +40,6 @@ local TANK_SORT_VALUE = 4;
local HEALER_SORT_VALUE = 2;
local DPS_SORT_VALUE = 1;
local CLUB_FINDER_MAX_MEMBER_COUNT = 1000;
ClubFinderApplicantEntryMixin = { };
function ClubFinderApplicantEntryMixin:OnLoad()
......@@ -189,7 +187,7 @@ function ClubFinderApplicantEntryMixin:UpdateMemberInfo(info)
end
end
self.CancelInvitationButton:SetShown(not isPendingList);
self.InviteButton:SetShown(not isPendingList);
self.InviteButton:SetShown(not isPendingList);
self.RequestStatus:SetShown(isPendingList);
if (self.InviteButton:IsShown() and self:GetParent():GetParent():GetParent().clubSizeMaxHit) then
......@@ -474,11 +472,8 @@ function ClubFinderApplicantListMixin:BuildList()
return;
end
if (clubInfo.memberCount) then
self.clubSizeMaxHit = clubInfo.memberCount >= CLUB_FINDER_MAX_MEMBER_COUNT;
else
self.clubSizeMaxHit = true; --Worst case we want to not allow them to invite, cause something might be broken.
end
-- Worst case we want to not allow them to invite, cause something might be broken.
self.clubSizeMaxHit = not clubInfo.memberCount or clubInfo.memberCount >= C_Club.GetClubCapacity();
local pendingList = C_ClubFinder.ReturnPendingClubApplicantList(clubId);
local applicantList = C_ClubFinder.ReturnClubApplicantList(clubId);
......
......@@ -121,6 +121,40 @@
</FontString>
</Layer>
</Layers>
<Frames>
<Button parentKey="InfoButton" hidden="true">
<Size x="28" y="28"/>
<Anchors>
<Anchor point="RIGHT" relativeKey="$parent.ExpiredText" relativePoint="RIGHT" x="27" y="-1"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="I" file="Interface\common\help-i">
<Size x="28" y="28"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
GameTooltip:SetOwner(self, ANCHOR_RIGHT, 270);
GameTooltip_AddColoredLine(GameTooltip, CLUB_FINDER_GUILD_POSTING_ALERT_REMOVED_DESC, HIGHLIGHT_FONT_COLOR);
GameTooltip:Show();
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight">
<Size x="24" y="24"/>
<Anchors>
<Anchor point="CENTER" x="-1" y="1"/>
</Anchors>
</HighlightTexture>
</Button>
</Frames>
</Frame>
<Frame name="GuildDetailsFrameTemplate" virtual="true">
......@@ -476,7 +510,11 @@
</Anchors>
</Frame>
<Button parentKey="GuildNameAlertFrame" inherits="CommunitiesGuildNameChangeAlertFrameTemplate" frameLevel="2"/>
<Frame parentKey="GuildNameChangeFrame" inherits="CommunitiesGuildNameChangeFrameTemplate" frameLevel="1"/>
<Frame parentKey="GuildNameChangeFrame" inherits="GuildNameChangeFrameTemplate" frameLevel="1"/>
<Frame parentKey="CommunityNameChangeFrame" inherits="CommunityNameChangeFrameTemplate" frameLevel="1"/>
<Frame parentKey="GuildPostingChangeFrame" inherits="GuildPostingChangeFrameTemplate" frameLevel="1"/>
<Frame parentKey="CommunityPostingChangeFrame" inherits="CommunityPostingChangeFrameTemplate" frameLevel="1"/>
<Frame parentKey="EditStreamDialog" frameStrata="DIALOG" inherits="CommunitiesEditStreamDialogTemplate" hidden="true">
<Size x="320" y="260"/>
<Anchors>
......@@ -489,7 +527,7 @@
<Anchor point="TOP" relativeTo="UIParent" x="0" y="-142"/>
</Anchors>
</Frame>
<Frame parentKey="RecruitmentDialog" hidden="true" inherits="ClubsRecruitmentDialogTemplate">
<Frame parentKey="RecruitmentDialog" hidden="true" frameLevel="3" inherits="ClubsRecruitmentDialogTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="UIParent" x="0" y="-80"/>
</Anchors>
......@@ -501,11 +539,21 @@
</Anchors>
<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
</Button>
<Button parentKey="InviteButton" inherits="CommunitiesInviteButtonTemplate">
<Button parentKey="InviteButton" inherits="CommunitiesInviteButtonTemplate" motionScriptsWhileDisabled="true">
<Size x="130" y="20"/>
<Anchors>
<Anchor point="BOTTOMRIGHT" x="-5" y="5"/>
</Anchors>
<Scripts>
<OnEnter>
if self.disabledTooltip then
GameTooltip_ShowDisabledTooltip(GameTooltip, self, self.disabledTooltip);
end
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Button>
<Frame parentKey="CommunitiesControlFrame" inherits="CommunitiesControlFrameTemplate">
<Size x="500" y="20"/>
......
......@@ -199,7 +199,6 @@ function CommunitiesListMixin:Update()
local buttons = scrollFrame.buttons;
local selectedClubId = self:GetCommunitiesFrame():GetSelectedClubId();
local clubs = self:GetCommunitiesList();
self:ValidateTickets();
local isInGuild = IsInGuild();
......@@ -274,13 +273,11 @@ function CommunitiesListMixin:Update()
local communitiesFrame = self:GetCommunitiesFrame();
communitiesFrame.GuildFinderFrame.isGuildType = true;
communitiesFrame.GuildFinderFrame:UpdateType();
button:SetFocused(self:GetCommunitiesFrame():GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.GUILD_FINDER);
button:Show();
shownGuildFinderButton = true;
usedHeight = usedHeight + height;
elseif clubInfo then
button:SetClubInfo(clubInfo, isInvitation, isTicket, isClubFinderInvitation);
button:SetFocused(isInvitation or clubInfo.clubId == selectedClubId);
button:Show();
usedHeight = usedHeight + height;
elseif shouldFindCommunityEntry then
......@@ -424,7 +421,7 @@ function CommunitiesListMixin:ScrollToClub(clubId)
local buttons = self.ListScrollFrame.buttons;
local buttonHeight = buttons[1]:GetHeight();
local height = math.max(0, math.floor(buttonHeight * (clubIndex - (#buttons)/2)));
local height = math.max(0, math.floor(buttonHeight * (clubIndex - (#buttons)/2.5)));
HybridScrollFrame_SetOffset(self.ListScrollFrame, height);
self.ListScrollFrame.ScrollBar:SetValue(height);
end
......@@ -514,6 +511,18 @@ local COMMUNITIES_LIST_ENTRY_EVENTS = {
CommunitiesListEntryMixin = {};
local function GetFontColor(isBattleNet, isGuild, isInvitation)
if isBattleNet then
return BATTLENET_FONT_COLOR;
elseif isGuild then
return GREEN_FONT_COLOR;
elseif isInvitation then
return HIGHLIGHT_FONT_COLOR;
end
return NORMAL_FONT_COLOR;
end
function CommunitiesListEntryMixin:SetClubInfo(clubInfo, isInvitation, isTicket, isInviteFromFinder)
self:SetEntryEnabled(true);
......@@ -543,8 +552,6 @@ function CommunitiesListEntryMixin:SetClubInfo(clubInfo, isInvitation, isTicket,
if clubInfo then
if(isInviteFromFinder) then
self.Name:SetText(COMMUNITIES_LIST_INVITATION_DISPLAY:format(clubInfo.name));
local fontColor = HIGHLIGHT_FONT_COLOR;
local isGuild = clubInfo.isGuild;
self.clubInfo = clubInfo;
self.overrideOnClick = function(self, button)
if button == "LeftButton" then
......@@ -556,7 +563,7 @@ function CommunitiesListEntryMixin:SetClubInfo(clubInfo, isInvitation, isTicket,
end
end;
if isGuild then
if clubInfo.isGuild then
self.Background:SetAtlas("communities-nav-button-green-normal");
self.Background:SetTexCoord(0, 1, 0, 1);
self.Selection:SetAtlas("communities-nav-button-green-pressed");
......@@ -568,7 +575,8 @@ function CommunitiesListEntryMixin:SetClubInfo(clubInfo, isInvitation, isTicket,
self.Selection:SetTexCoord(0.00390625, 0.87890625, 0.59179688, 0.66992188);
end
self.Name:SetTextColor(fontColor:GetRGB());
local isBattleNet = false;
self.Name:SetTextColor(GetFontColor(isBattleNet, clubInfo.isGuild, isInvitation):GetRGB());
self.Name:SetPoint("LEFT", self.Icon, "RIGHT", 11, 0);
self.isInvitation = isInvitation;
self.isTicket = isTicket;
......@@ -593,16 +601,7 @@ function CommunitiesListEntryMixin:SetClubInfo(clubInfo, isInvitation, isTicket,
self.Name:SetText(clubInfo.name);
end
local fontColor = NORMAL_FONT_COLOR;
local isGuild = clubInfo.clubType == Enum.ClubType.Guild;
if clubInfo.clubType == Enum.ClubType.BattleNet then
fontColor = BATTLENET_FONT_COLOR;
elseif isGuild then
fontColor = GREEN_FONT_COLOR;
elseif isInvitation then
fontColor = HIGHLIGHT_FONT_COLOR;
end
if isGuild then
self.Background:SetAtlas("communities-nav-button-green-normal");
self.Background:SetTexCoord(0, 1, 0, 1);
......@@ -615,7 +614,8 @@ function CommunitiesListEntryMixin:SetClubInfo(clubInfo, isInvitation, isTicket,
self.Selection:SetTexCoord(0.00390625, 0.87890625, 0.59179688, 0.66992188);
end
self.Name:SetTextColor(fontColor:GetRGB());
local isBattleNet = clubInfo.clubType == Enum.ClubType.BattleNet;
self.Name:SetTextColor(GetFontColor(isBattleNet, isGuild, isInvitation):GetRGB());
self.Name:SetPoint("LEFT", self.Icon, "RIGHT", 11, 0);
self.clubId = clubInfo.clubId;
self.isInvitation = isInvitation;
......@@ -632,7 +632,7 @@ function CommunitiesListEntryMixin:SetClubInfo(clubInfo, isInvitation, isTicket,
self.Icon:SetPoint("TOPLEFT", 11, -15);
self.CircleMask:SetShown(not isInvitation and not isGuild);
self.IconRing:SetShown(not isInvitation and not isGuild and not isTicket);
self.IconRing:SetAtlas(clubInfo.clubType == Enum.ClubType.BattleNet and "communities-ring-blue" or "communities-ring-gold");
self.IconRing:SetAtlas(isBattleNet and "communities-ring-blue" or "communities-ring-gold");