Commit b685b9c5 authored by TOM_RUS's avatar TOM_RUS

WOW-33775patch8.3.0_PTR

parent 25394df4
......@@ -1313,6 +1313,7 @@ local AuctionHouse =
{
{ Name = "itemName", Type = "string", Nilable = false },
{ Name = "battlePetLink", Type = "string", Nilable = true },
{ Name = "appearanceLink", Type = "string", Nilable = true },
{ Name = "quality", Type = "number", Nilable = false },
{ Name = "iconFileID", Type = "number", Nilable = false },
{ Name = "isPet", Type = "bool", Nilable = false },
......
......@@ -109,6 +109,15 @@ local ClubFinder =
{ Name = "index", Type = "number", Nilable = false },
},
},
{
Name = "GetPlayerApplicantLocaleFlags",
Type = "Function",
Returns =
{
{ Name = "localeFlags", Type = "number", Nilable = false },
},
},
{
Name = "GetPlayerApplicantSettings",
Type = "Function",
......@@ -500,6 +509,15 @@ local ClubFinder =
{ Name = "value", Type = "number", Nilable = false },
},
},
{
Name = "SetPlayerApplicantLocaleFlags",
Type = "Function",
Arguments =
{
{ Name = "localeFlags", Type = "number", Nilable = false },
},
},
{
Name = "SetPlayerApplicantSettings",
Type = "Function",
......@@ -510,6 +528,15 @@ local ClubFinder =
{ Name = "checked", Type = "bool", Nilable = false },
},
},
{
Name = "SetRecruitmentLocale",
Type = "Function",
Arguments =
{
{ Name = "locale", Type = "number", Nilable = false },
},
},
{
Name = "SetRecruitmentSettings",
Type = "Function",
......@@ -729,9 +756,9 @@ local ClubFinder =
{
Name = "ClubFinderSettingFlags",
Type = "Enumeration",
NumValues = 21,
NumValues = 26,
MinValue = 0,
MaxValue = 20,
MaxValue = 25,
Fields =
{
{ Name = "None", Type = "ClubFinderSettingFlags", EnumValue = 0 },
......@@ -755,6 +782,11 @@ local ClubFinder =
{ Name = "SortRelevance", Type = "ClubFinderSettingFlags", EnumValue = 18 },
{ Name = "SortMemberCount", Type = "ClubFinderSettingFlags", EnumValue = 19 },
{ Name = "SortNewest", Type = "ClubFinderSettingFlags", EnumValue = 20 },
{ Name = "LanguageReserved1", Type = "ClubFinderSettingFlags", EnumValue = 21 },
{ Name = "LanguageReserved2", Type = "ClubFinderSettingFlags", EnumValue = 22 },
{ Name = "LanguageReserved3", Type = "ClubFinderSettingFlags", EnumValue = 23 },
{ Name = "LanguageReserved4", Type = "ClubFinderSettingFlags", EnumValue = 24 },
{ Name = "LanguageReserved5", Type = "ClubFinderSettingFlags", EnumValue = 25 },
},
},
{
......@@ -833,6 +865,8 @@ local ClubFinder =
{ Name = "tabardInfo", Type = "GuildTabardInfo", Nilable = true },
{ Name = "recruitingSpecIds", Type = "table", InnerType = "number", Nilable = false },
{ Name = "recruitmentFlags", Type = "number", Nilable = false },
{ Name = "localeSet", Type = "bool", Nilable = false },
{ Name = "recruitmentLocale", Type = "number", Nilable = false },
{ Name = "minILvl", Type = "number", Nilable = false },
{ Name = "cached", Type = "number", Nilable = false },
{ Name = "cacheRequested", Type = "number", Nilable = false },
......
......@@ -136,9 +136,14 @@ function AuctionHouseItemDisplayMixin:OnClick(button)
local itemKeyInfo = C_AuctionHouse.GetItemKeyInfo(itemKey);
if itemKeyInfo and itemKeyInfo.battlePetLink then
DressUpBattlePetLink(itemKeyInfo.battlePetLink);
else
if itemKeyInfo.appearanceLink then
local _, _, hyperlinkString = ExtractHyperlinkString(itemKeyInfo.appearanceLink);
DressUpTransmogLink(hyperlinkString);
else
DressUpLink(self:GetItemLink());
end
end
elseif IsModifiedClick("CHATLINK") then
local itemKeyInfo = C_AuctionHouse.GetItemKeyInfo(itemKey);
if itemKeyInfo and itemKeyInfo.battlePetLink then
......
local NUM_REWARDS_PER_MEDAL = 2;
local MAXIMUM_REWARDS_LEVEL = 10;
local MAXIMUM_REWARDS_LEVEL = 15;
local MAX_PER_ROW = 9;
local LEGENDARY_COMPLETION_LEVEL = 15;
......
......@@ -72,21 +72,18 @@ function ClubsRecruitmentDialogMixin:SetDisabledStateOnCommunityFinderOptions(sh
local fontColor = LIGHTGRAY_FONT_COLOR;
self.MaxLevelOnly.Label:SetTextColor(fontColor:GetRGB());
self.MinIlvlOnly.Label:SetTextColor(fontColor:GetRGB());
self.LookingForDropdown.LookingForDropDownLabel:SetTextColor(fontColor:GetRGB());
self.ClubFocusDropdown.Label:SetTextColor(fontColor:GetRGB());
self.RecruitmentMessageFrame.Label:SetTextColor(fontColor:GetRGB());
UIDropDownMenu_DisableDropDown(self.ClubFocusDropdown);
UIDropDownMenu_DisableDropDown(self.LookingForDropdown);
UIDropDownMenu_DisableDropDown(self.LanguageDropdown);
else
local fontColor = HIGHLIGHT_FONT_COLOR;
self.MaxLevelOnly.Label:SetTextColor(fontColor:GetRGB());
self.MinIlvlOnly.Label:SetTextColor(fontColor:GetRGB());
self.LookingForDropdown.LookingForDropDownLabel:SetTextColor(NORMAL_FONT_COLOR:GetRGB());
self.ClubFocusDropdown.Label:SetTextColor(NORMAL_FONT_COLOR:GetRGB());
self.RecruitmentMessageFrame.Label:SetTextColor(NORMAL_FONT_COLOR:GetRGB());
UIDropDownMenu_EnableDropDown(self.ClubFocusDropdown);
UIDropDownMenu_EnableDropDown(self.LookingForDropdown);
UIDropDownMenu_EnableDropDown(self.LanguageDropdown);
end
self:CheckLanguageDropdownTutorial();
end
function ClubsRecruitmentDialogMixin:ResetClubFinderSettings()
......@@ -105,15 +102,63 @@ function ClubsRecruitmentDialogMixin:ResetClubFinderSettings()
self.LookingForDropdown:Initialize();
UIDropDownMenu_Initialize(self.LookingForDropdown, LookingForClubDropdownInitialize);
self.LookingForDropdown:UpdateDropdownText();
UIDropDownMenu_Initialize(self.LanguageDropdown, ClubFinderLanguageDropdownInitialize);
self.LanguageDropdown:SetLanguageChecked(self.LanguageDropdown.initLocale, true);
end
function ClubsRecruitmentDialogMixin:OnLoad()
self.LookingForDropdown:Initialize();
self.ClubFocusDropdown:Initialize();
self.LanguageDropdown:Initialize();
self.clubId = nil;
UIDropDownMenu_SetWidth(self.LookingForDropdown, CLUB_FINDER_WIDE_DROPDOWN_WIDTH);
UIDropDownMenu_SetWidth(self.ClubFocusDropdown, CLUB_FINDER_WIDE_DROPDOWN_WIDTH);
UIDropDownMenu_SetWidth(self.LookingForDropdown, 150);
UIDropDownMenu_SetWidth(self.ClubFocusDropdown, 150);
UIDropDownMenu_SetWidth(self.LanguageDropdown, 150);
UIDropDownMenu_Initialize(self.ClubFocusDropdown, ClubFocusClubDropdownInitialize);
UIDropDownMenu_Initialize(self.LookingForDropdown, LookingForClubDropdownInitialize);
UIDropDownMenu_Initialize(self.LanguageDropdown, ClubFinderLanguageDropdownInitialize);
UIDropDownMenu_JustifyText(self.ClubFocusDropdown, "LEFT");
UIDropDownMenu_JustifyText(self.LookingForDropdown, "LEFT");
UIDropDownMenu_JustifyText(self.LanguageDropdown, "LEFT");
end
function ClubsRecruitmentDialogMixin:CheckLanguageDropdownTutorial()
local languageSelected = not self.LanguageDropdown.showAnyLanguage;
local shouldListChecked = self.ShouldListClub.Button:GetChecked();
if languageSelected or not shouldListChecked then
HelpTip:HideAll(self.LanguageDropdown);
else
local helpTipInfo = {
text = CLUB_FINDER_TUTORIAL_LANGUAGE_SET,
buttonStyle = HelpTip.ButtonStyle.None,
targetPoint = HelpTip.Point.RightEdgeCenter,
offsetX = -4,
useParentStrata = true,
};
HelpTip:Show(self.LanguageDropdown, helpTipInfo);
end
self:UpdateCreateButton();
end
function ClubsRecruitmentDialogMixin:AcceptButtonOnEnter()
if self.Accept:IsEnabled() then
GameTooltip:Hide();
else
GameTooltip:SetOwner(self.Accept, "ANCHOR_RIGHT", 0, 0);
GameTooltip_AddErrorLine(GameTooltip, LFG_LIST_SELECT_A_CATEGORY);
GameTooltip:Show();
end
end
function ClubsRecruitmentDialogMixin:UpdateCreateButton()
local languageSelected = not self.LanguageDropdown.showAnyLanguage;
local shouldListChecked = self.ShouldListClub.Button:GetChecked();
self.Accept:SetEnabled(languageSelected or not shouldListChecked);
if self.Accept:IsMouseOver() then
self:AcceptButtonOnEnter();
end
end
function ClubsRecruitmentDialogMixin:UpdateSettingsInfoFromClubInfo()
......@@ -141,6 +186,13 @@ function ClubsRecruitmentDialogMixin:UpdateSettingsInfoFromClubInfo()
C_ClubFinder.SetRecruitmentSettings(index, true);
UIDropDownMenu_Initialize(self.ClubFocusDropdown, ClubFocusClubDropdownInitialize);
UIDropDownMenu_Initialize(self.LanguageDropdown, ClubFinderLanguageDropdownInitialize);
if not clubPostingInfo.localeSet then
self.LanguageDropdown:SetShowAnyLanguage(true);
else
self.LanguageDropdown:SetLanguageChecked(clubPostingInfo.recruitmentLocale, true);
end
if (clubPostingInfo.minILvl > 0) then
self.MinIlvlOnly.EditBox:SetText(clubPostingInfo.minILvl);
self.MinIlvlOnly.EditBox.Text:Hide();
......@@ -168,6 +220,8 @@ function ClubsRecruitmentDialogMixin:OnShow()
self:RegisterEvent("CLUB_FINDER_POST_UPDATED");
self:UpdateSettingsInfoFromClubInfo();
HelpTip:Acknowledge(CommunitiesFrame, CLUB_FINDER_TUTORIAL_POSTING);
HelpTip:Acknowledge(CommunitiesFrame, CLUB_FINDER_TUTORIAL_LANGUAGE_FILTER);
end
function ClubsRecruitmentDialogMixin:OnHide()
......@@ -740,6 +794,143 @@ function LookingForClubDropdownInitialize(self, level)
end
end
ClubFinderLanguageDropdownMixin = {};
function ClubFinderLanguageDropdownMixin:Initialize(isPlayerApplicant)
self.isPlayerApplicant = isPlayerApplicant;
if isPlayerApplicant then
self.currentLanguages = CreateFromMixins(FlagsMixin);
self.currentLanguages:OnLoad();
else
self.currentLanguage = 0;
end
end
function ClubFinderLanguageDropdownMixin:SetLanguageChecked(language, checked)
if self.isPlayerApplicant then
self.currentLanguages:SetOrClear(language, checked);
C_ClubFinder.SetPlayerApplicantLocaleFlags(self.currentLanguages:GetFlags());
else
self:SetShowAnyLanguage(false);
self.currentLanguage = language; -- Only 1 language allowed for postings
UIDropDownMenu_SetSelectedValue(self, language);
C_ClubFinder.SetRecruitmentLocale(language)
end
end
function ClubFinderLanguageDropdownMixin:SetLanguageFlags(languageFlags)
if self.isPlayerApplicant then
self.currentLanguages.flags = languageFlags;
C_ClubFinder.SetPlayerApplicantLocaleFlags(self.currentLanguages:GetFlags());
end
end
function ClubFinderLanguageDropdownMixin:IsLanguageChecked(language)
if self.showAnyLanguage then
return false;
elseif self.isPlayerApplicant then
return self.currentLanguages:IsSet(language);
else
return self.currentLanguage == language;
end
end
function ClubFinderLanguageDropdownMixin:GetCurrentLanguageValue()
if self.isPlayerApplicant then
return self.currentLanguages:GetFlags();
else
return self.currentLanguage;
end
end
function ClubFinderLanguageDropdownMixin:SetShowAnyLanguage(showAnyLanguage)
self.showAnyLanguage = showAnyLanguage;
if showAnyLanguage then
UIDropDownMenu_SetSelectedValue(self, nil);
UIDropDownMenu_SetText(self, CLUB_FINDER_ANY_FLAG);
else
UIDropDownMenu_SetText(self, "");
end
self:GetParent():CheckLanguageDropdownTutorial();
end
function ClubFinderLanguageDropdownMixin:ShouldShowAnyLanguage()
return self.showAnyLanguage;
end
function ClubFinderLanguageDropdownMixin:RefreshSelectedValue()
if not self:ShouldShowAnyLanguage() then
UIDropDownMenu_SetSelectedValue(self, self:GetCurrentLanguageValue());
end
end
function ClubFinderLanguageDropdownInitialize(self, level)
local info = UIDropDownMenu_CreateInfo();
info.keepShownOnClick = self.isPlayerApplicant;
info.isNotRadio = self.isPlayerApplicant;
info.ignoreAsMenuSelection = self.isPlayerApplicant;
local currentLocale = GetCVar("textLocale");
self.initLocale = nil;
local ignoreLocaleRestrictions = true;
local locales = GetAvailableLocaleInfo(ignoreLocaleRestrictions);
for _, localeInfo in pairs(locales) do
if LanguageRegions[localeInfo.localeName] then
InterfaceOptionsLanguagesPanelLocaleDropDown_InitializeChoice(info, localeInfo.localeName);
if self.isPlayerApplicant then
info.value = bit.lshift(1, localeInfo.localeId); -- Multiple can be selected, so convert this to a mask to we can use it in a bit flag
else
info.value = localeInfo.localeId;
end
info.func = function(button, _, _, checked)
return self:SetLanguageChecked(button.value, checked);
end;
info.checked = function(button)
return self:IsLanguageChecked(button.value);
end;
UIDropDownMenu_AddButton(info);
if not self.initLocale or (currentLocale == localeInfo.localeName) then
self.initLocale = info.value;
end
end
end
if not self.initLocale then
self.initLocale = 0;
end
end
ClubFinderFilterDropdownMixin = CreateFromMixins(SettingsDropdownMixin, ClubFinderLanguageDropdownMixin);
function ClubFinderFilterDropdownMixin:Initialize()
SettingsDropdownMixin.Initialize(self);
local isPlayerApplicant = true;
ClubFinderLanguageDropdownMixin.Initialize(self, isPlayerApplicant)
end
function ClubFinderFilterDropdownInitialize(self, level)
-- Add the focus label
local info = UIDropDownMenu_CreateInfo();
info.text = CLUB_FINDER_FOCUS;
info.isTitle = true;
info.notCheckable = true;
UIDropDownMenu_AddButton(info);
-- And the focus options
ClubFocusClubDropdownInitialize(self);
-- Then the language label
info.text = LANGUAGE;
info.isTitle = true;
info.notCheckable = true;
UIDropDownMenu_AddButton(info);
-- And finally the language options
ClubFinderLanguageDropdownInitialize(self);
end
ClubSortByDropdownMixin = CreateFromMixins(SettingsDropdownMixin);
local ClubSortByFlags = {
......@@ -819,11 +1010,11 @@ function ClubFinderOptionsMixin:CheckDisabled()
local disabledReason = C_ClubFinder.GetClubFinderDisableReason();
local enabled = disabledReason == nil;
if enabled then
UIDropDownMenu_EnableDropDown(self.ClubFocusDropdown);
UIDropDownMenu_EnableDropDown(self.ClubFilterDropdown);
UIDropDownMenu_EnableDropDown(self.ClubSizeDropdown);
UIDropDownMenu_EnableDropDown(self.SortByDropdown);
else
UIDropDownMenu_DisableDropDown(self.ClubFocusDropdown);
UIDropDownMenu_DisableDropDown(self.ClubFilterDropdown);
UIDropDownMenu_DisableDropDown(self.ClubSizeDropdown);
UIDropDownMenu_DisableDropDown(self.SortByDropdown);
end
......@@ -842,6 +1033,8 @@ function ClubFinderOptionsMixin:SetType(isGuildType)
else
self:SetupCommunityFinderOptions();
end
self.ClubFilterDropdown:SetLanguageFlags(C_ClubFinder.GetPlayerApplicantLocaleFlags());
end
function ClubFinderOptionsMixin:OnSearchButtonClick()
......@@ -893,7 +1086,7 @@ function ClubFinderOptionsMixin:SetOptionsState(shouldHide)
self.TankRoleFrame:SetShown(not shouldHide);
self.HealerRoleFrame:SetShown(not shouldHide);
self.DpsRoleFrame:SetShown(not shouldHide);
self.ClubFocusDropdown:SetShown(not shouldHide);
self.ClubFilterDropdown:SetShown(not shouldHide);
if(self:GetParent().isGuildType) then
self.ClubSizeDropdown:SetShown(not shouldHide);
......@@ -931,17 +1124,16 @@ function ClubFinderOptionsMixin:SetupGuildFinderOptions()
UIDropDownMenu_SetWidth(self.ClubSizeDropdown, 80);
UIDropDownMenu_Initialize(self.ClubSizeDropdown, ClubSizeDropdownInitialize);
self.ClubSizeDropdown:ClearAllPoints();
self.ClubSizeDropdown:SetPoint("RIGHT", self.ClubFocusDropdown, "RIGHT", 110, 0);
self.ClubSizeDropdown:SetPoint("RIGHT", self.ClubFilterDropdown, "RIGHT", 110, 0);
self.ClubSizeDropdown:Show();
self.ClubFocusDropdown.isPlayerApplicant = true;
self.ClubFocusDropdown:Initialize();
UIDropDownMenu_SetWidth(self.ClubFocusDropdown, CLUB_FINDER_WIDE_DROPDOWN_WIDTH);
UIDropDownMenu_JustifyText(self.ClubFocusDropdown, "LEFT");
UIDropDownMenu_Initialize(self.ClubFocusDropdown, ClubFocusClubDropdownInitialize);
self.ClubFocusDropdown:ClearAllPoints();
self.ClubFocusDropdown:SetPoint("TOPLEFT", -5, 18);
self.ClubFocusDropdown:Show();
self.ClubFilterDropdown:Initialize();
UIDropDownMenu_SetWidth(self.ClubFilterDropdown, CLUB_FINDER_WIDE_DROPDOWN_WIDTH);
UIDropDownMenu_JustifyText(self.ClubFilterDropdown, "LEFT");
UIDropDownMenu_Initialize(self.ClubFilterDropdown, ClubFinderFilterDropdownInitialize);
self.ClubFilterDropdown:ClearAllPoints();
self.ClubFilterDropdown:SetPoint("TOPLEFT", -5, 18);
self.ClubFilterDropdown:Show();
self.TankRoleFrame:ClearAllPoints();
self.TankRoleFrame:SetPoint("RIGHT", self.ClubSizeDropdown, "RIGHT", 40, 10);
......@@ -958,18 +1150,17 @@ function ClubFinderOptionsMixin:SetupCommunityFinderOptions()
UIDropDownMenu_Initialize(self.SortByDropdown, ClubSortByDropdownInitialize);
self.SortByDropdown:ClearAllPoints();
self.SortByDropdown:SetPoint("RIGHT", self.ClubFocusDropdown, "RIGHT", 110, 0);
self.SortByDropdown:SetPoint("RIGHT", self.ClubFilterDropdown, "RIGHT", 110, 0);
self.SortByDropdown:Show();
self.ClubFocusDropdown.isPlayerApplicant = true;
self.ClubFocusDropdown:Initialize();
UIDropDownMenu_SetWidth(self.ClubFocusDropdown, CLUB_FINDER_WIDE_DROPDOWN_WIDTH);
UIDropDownMenu_JustifyText(self.ClubFocusDropdown, "LEFT");
UIDropDownMenu_Initialize(self.ClubFocusDropdown, ClubFocusClubDropdownInitialize);
self.ClubFilterDropdown:Initialize();
UIDropDownMenu_SetWidth(self.ClubFilterDropdown, CLUB_FINDER_WIDE_DROPDOWN_WIDTH);
UIDropDownMenu_JustifyText(self.ClubFilterDropdown, "LEFT");
UIDropDownMenu_Initialize(self.ClubFilterDropdown, ClubFinderFilterDropdownInitialize);
self.ClubFocusDropdown:ClearAllPoints();
self.ClubFocusDropdown:SetPoint("TOPLEFT", -5, 18);
self.ClubFocusDropdown:Show();
self.ClubFilterDropdown:ClearAllPoints();
self.ClubFilterDropdown:SetPoint("TOPLEFT", -5, 18);
self.ClubFilterDropdown:Show();
self.TankRoleFrame:ClearAllPoints();
self.TankRoleFrame:SetPoint("RIGHT", self.SortByDropdown, "RIGHT", 40, 10);
......
......@@ -290,7 +290,7 @@
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString parentKey="LookingForDropDownLabel" text="CLUB_FINDER_LOOKING_FOR" justifyH="LEFT" inherits="GameFontHighlight">
<FontString parentKey="Label" text="CLUB_FINDER_LOOKING_FOR" justifyH="LEFT" inherits="GameFontHighlight">
<Size x="280" y="0"/>
<Anchors>
<Anchor point="TOPLEFT" x="20" y="11"/>
......@@ -299,6 +299,22 @@
</Layer>
</Layers>
</Frame>
<Frame parentKey="LanguageDropdown" name="ClubFinderLanguageDropdown" inherits="UIDropDownMenuTemplate" mixin="ClubFinderLanguageDropdownMixin">
<Size x="0" y="20"/>
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.LookingForDropdown" relativePoint="TOPRIGHT" x="-25" y="0"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString parentKey="Label" text="LANGUAGE" justifyH="LEFT" inherits="GameFontNormal">
<Size x="280" y="0"/>
<Anchors>
<Anchor point="TOPLEFT" x="20" y="15"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame parentKey="RecruitmentMessageFrame">
<Size x="335" y="80"/>
<Anchors>
......@@ -457,7 +473,7 @@
</Layer>
</Layers>
</Frame>
<Button parentKey="Accept" inherits="UIPanelButtonTemplate" text="ACCEPT">
<Button parentKey="Accept" inherits="UIPanelButtonTemplate" motionScriptsWhileDisabled="true" text="ACCEPT">
<Size x="120" y="25"/>
<Anchors>
<Anchor point="BOTTOM" relativeKey="$parent.EditBox" relativePoint="BOTTOM" x="-80" y="15"/>
......@@ -467,6 +483,12 @@
PlaySound(SOUNDKIT.IG_MAINMENU_CLOSE);
self:GetParent():PostClub();
</OnClick>
<OnEnter>
self:GetParent():AcceptButtonOnEnter();
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Button>
<Button parentKey="Cancel" inherits="UIPanelButtonTemplate" text="CANCEL">
......@@ -881,6 +903,20 @@
</Layers>
</Frame>
<Frame name="ClubFinderFilterDropdownTemplate" inherits="UIDropDownMenuTemplate" mixin="ClubFinderFilterDropdownMixin" virtual="true">
<Size x="100" y="15"/>
<Layers>
<Layer level="ARTWORK">
<FontString parentKey="Label" text="FILTER" justifyH="LEFT" inherits="GameFontHighlight">
<Size x="100" y="0"/>
<Anchors>
<Anchor point="TOPLEFT" x="20" y="13"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<CheckButton name="ClubFinderCheckboxTemplate" mixin="ClubFinderCheckboxMixin" virtual="true">
<Scripts>
<OnClick method="OnClick"/>
......@@ -1129,7 +1165,7 @@
</Layer>
</Layers>
</Frame>
<Frame parentKey="ClubFocusDropdown" hidden="true" name="ClubFinderFocusDropdown" inherits="ClubFinderFocusDropdownTemplate">
<Frame parentKey="ClubFilterDropdown" hidden="true" name="ClubFinderFilterDropdown" inherits="ClubFinderFilterDropdownTemplate">
<Anchors>
<Anchor point="TOPLEFT" x="-1" y="18"/>
</Anchors>
......
......@@ -988,6 +988,7 @@ function CommunitiesFrameMixin:CheckForTutorials()
return;
end
local clubId = self:GetSelectedClubId();
local displayMode = self:GetDisplayMode();
if displayMode == COMMUNITIES_FRAME_DISPLAY_MODES.CHAT or displayMode == COMMUNITIES_FRAME_DISPLAY_MODES.GUILD_BENEFITS or displayMode == COMMUNITIES_FRAME_DISPLAY_MODES.GUILD_INFO then
if self:SelectedClubHasApplicants() and not GetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_CLUB_FINDER_NEW_APPLICANTS_GUILD_LEADER) then
......@@ -1002,18 +1003,21 @@ function CommunitiesFrameMixin:CheckForTutorials()
end
if (displayMode == COMMUNITIES_FRAME_DISPLAY_MODES.CHAT) and (self.CommunitiesControlFrame.CommunitiesSettingsButton:IsShown() or self.CommunitiesControlFrame.GuildRecruitmentButton:IsShown()) then
local isGuildSelected = self:IsGuildSelected();
local flag = isGuildSelected and LE_FRAME_TUTORIAL_CLUB_FINDER_NEW_GUILD_LEADER or LE_FRAME_TUTORIAL_CLUB_FINDER_NEW_COMMUNITY_LEADER;
if not GetCVarBitfield("closedInfoFrames", flag) then
self:ShowClubFinderRecruitmentTutorialForLeader();
local clubPostingInfo = C_ClubFinder.GetRecruitingClubInfoFromClubID(clubId);
if clubPostingInfo then
if not clubPostingInfo.localeSet and self:TryShowClubFinderLanguageFilterTutorialForLeader(isGuild) then
return;
end
else
if self:TryShowClubFinderRecruitmentTutorialForLeader(isGuild) then
return;
end
end
end
local clubId = self:GetSelectedClubId();
if self.InviteButton:IsShown() and isGuild and clubId and C_ClubFinder.RequestPostingInformationFromClubId(clubId)then
if not GetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_CLUB_FINDER_LINKING) then
self:ShowClubFinderLinkTutorialForLeader();
if self:TryShowClubFinderLinkTutorialForLeader() then
return;
end
end
......@@ -1065,9 +1069,13 @@ function CommunitiesFrameMixin:ShowClubFinderApplicantListTutorialForLeader()
end
end
function CommunitiesFrameMixin:ShowClubFinderRecruitmentTutorialForLeader()
local isGuildSelected = self:IsGuildSelected();
function CommunitiesFrameMixin:TryShowClubFinderRecruitmentTutorialForLeader(isGuildSelected)
if not isGuildSelected and not self:IsCharacterCommunitySelected() then
return false;
end
local flag = isGuildSelected and LE_FRAME_TUTORIAL_CLUB_FINDER_NEW_GUILD_LEADER or LE_FRAME_TUTORIAL_CLUB_FINDER_NEW_COMMUNITY_LEADER;
local button = isGuildSelected and self.CommunitiesControlFrame.GuildRecruitmentButton or self.CommunitiesControlFrame.CommunitiesSettingsButton;
local helpTipInfo = {
text = CLUB_FINDER_TUTORIAL_POSTING,
buttonStyle = HelpTip.ButtonStyle.Close,
......@@ -1076,16 +1084,33 @@ function CommunitiesFrameMixin:ShowClubFinderRecruitmentTutorialForLeader()
targetPoint = HelpTip.Point.BottomEdgeCenter,
offsetX = -4,
useParentStrata = true,
checkCVars = true,
};
if isGuildSelected then
HelpTip:Show(self, helpTipInfo, self.CommunitiesControlFrame.GuildRecruitmentButton);
elseif self:IsCharacterCommunitySelected() then
HelpTip:Show(self, helpTipInfo, self.CommunitiesControlFrame.CommunitiesSettingsButton);
return HelpTip:Show(self, helpTipInfo, button);
end
function CommunitiesFrameMixin:TryShowClubFinderLanguageFilterTutorialForLeader(isGuildSelected)
if not isGuildSelected and not self:IsCharacterCommunitySelected() then
return false;
end
local button = isGuildSelected and self.CommunitiesControlFrame.GuildRecruitmentButton or self.CommunitiesControlFrame.CommunitiesSettingsButton;
local helpTipInfo = {
text = CLUB_FINDER_TUTORIAL_LANGUAGE_FILTER,
buttonStyle = HelpTip.ButtonStyle.Close,