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 },
......
......@@ -137,7 +137,12 @@ function AuctionHouseItemDisplayMixin:OnClick(button)
if itemKeyInfo and itemKeyInfo.battlePetLink then
DressUpBattlePetLink(itemKeyInfo.battlePetLink);
else
DressUpLink(self:GetItemLink());
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);
......
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;
......
......@@ -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();
return;
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,
cvarBitfield = "closedInfoFrames",
bitfieldFlag = LE_FRAME_TUTORIAL_CLUB_FINDER_NEW_LANGUAGE_FILTER,
targetPoint = HelpTip.Point.BottomEdgeCenter,
offsetX = -4,
useParentStrata = true,
checkCVars = true,
};
return HelpTip:Show(self, helpTipInfo, button);
end
function CommunitiesFrameMixin:ShowClubFinderLinkTutorialForLeader()
function CommunitiesFrameMixin:TryShowClubFinderLinkTutorialForLeader()
local helpTipInfo = {
text = CLUB_FINDER_TUTORIAL_GUILD_LINK,
buttonStyle = HelpTip.ButtonStyle.Close,
......@@ -1094,9 +1119,10 @@ function CommunitiesFrameMixin:ShowClubFinderLinkTutorialForLeader()
targetPoint = HelpTip.Point.BottomEdgeCenter,
offsetX = -4,
useParentStrata = true,
checkCVars = true,
};
HelpTip:Show(self, helpTipInfo, self.InviteButton);
return HelpTip:Show(self, helpTipInfo, self.InviteButton);
end
function CommunitiesFrameMixin:IsClubTypeSelected(clubType)
......@@ -1392,6 +1418,7 @@ end
function CommunitiesFrameMixin:UpdateStreamDropDown()
local clubId = self:GetSelectedClubId();
local selectedStream = self:GetSelectedStreamForClub(clubId);
UIDropDownMenu_Initialize(self.StreamDropDownMenu, CommunitiesStreamDropDownMenu_Initialize);
UIDropDownMenu_SetSelectedValue(self.StreamDropDownMenu, selectedStream and selectedStream.streamId or nil, true);
local streamName = selectedStream and CommunitiesStreamDropDownMenu_GetStreamName(clubId, selectedStream) or "";
UIDropDownMenu_SetText(self.StreamDropDownMenu, streamName);
......
......@@ -34,11 +34,17 @@ end
function CommunitiesSettingsDialogMixin:OnLoad()
self.LookingForDropdown:Initialize();
self.ClubFocusDropdown:Initialize();
self.LanguageDropdown:Initialize();
self.ClubFocusDropdown.Label:SetFontObject(GameFontNormal);
UIDropDownMenu_SetWidth(self.LookingForDropdown, 150);
UIDropDownMenu_SetWidth(self.ClubFocusDropdown, 140);
UIDropDownMenu_SetWidth(self.ClubFocusDropdown, 150);
UIDropDownMenu_SetWidth(self.LanguageDropdown, 150);
UIDropDownMenu_Initialize(self.LookingForDropdown, LookingForClubDropdownInitialize);
UIDropDownMenu_Initialize(self.ClubFocusDropdown, ClubFocusClubDropdownInitialize);
UIDropDownMenu_Initialize(self.LanguageDropdown, ClubFinderLanguageDropdownInitialize);
UIDropDownMenu_JustifyText(self.LookingForDropdown, "LEFT");
UIDropDownMenu_JustifyText(self.ClubFocusDropdown, "LEFT");
UIDropDownMenu_JustifyText(self.LanguageDropdown, "LEFT");
end
function CommunitiesSettingsDialogMixin:OnShow()
......@@ -61,6 +67,9 @@ function CommunitiesSettingsDialogMixin:OnShow()
end
self:SetDisabledStateOnCommunityFinderOptions(not self.ShouldListClub.Button:GetChecked());
HelpTip:Acknowledge(CommunitiesFrame, CLUB_FINDER_TUTORIAL_POSTING);
HelpTip:Acknowledge(CommunitiesFrame, CLUB_FINDER_TUTORIAL_LANGUAGE_FILTER);
self:RegisterEvent("CLUB_FINDER_POST_UPDATED");
CommunitiesFrame:RegisterDialogShown(self);
......@@ -141,7 +150,9 @@ function CommunitiesSettingsDialogMixin:UpdateCreateButton()
local nameIsValid = C_Club.ValidateText(self:GetClubType(), name, Enum.ClubFieldType.ClubName) == Enum.ValidateNameResult.NameSuccess;
local shortName = self.ShortNameEdit:GetText();
local shortNameIsValid = C_Club.ValidateText(self:GetClubType(), shortName, Enum.ClubFieldType.ClubShortName) == Enum.ValidateNameResult.NameSuccess;
self.Accept:SetEnabled(nameIsValid and shortNameIsValid);
local languageSelected = not self.LanguageDropdown.showAnyLanguage;
local shouldListChecked = self.ShouldListClub.Button:GetChecked();
self.Accept:SetEnabled(nameIsValid and shortNameIsValid and (languageSelected or not shouldListChecked));
if self.Accept:IsMouseOver() then
CommunitiesSettingsDialogAcceptButton_OnEnter(self.Accept);
end
......@@ -211,8 +222,31 @@ function CommunitiesSettingsDialogMixin: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 CommunitiesSettingsDialogMixin: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 CommunitiesSettingsDialogMixin:UpdateSettingsInfoFromClubInfo()
local clubInfo = C_Club.GetClubInfo(self.clubId);
self:ResetClubFinderSettings();
......@@ -231,6 +265,13 @@ function CommunitiesSettingsDialogMixin: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();
......@@ -272,20 +313,19 @@ function CommunitiesSettingsDialogMixin:SetDisabledStateOnCommunityFinderOptions
self.AutoAcceptApplications.Label:SetTextColor(fontColor:GetRGB());
self.MaxLevelOnly.Label:SetTextColor(fontColor:GetRGB());
self.MinIlvlOnly.Label:SetTextColor(fontColor:GetRGB());
self.LookingForDropdown.Label:SetTextColor(fontColor:GetRGB());
self.ClubFocusDropdown.Label:SetTextColor(fontColor:GetRGB());
UIDropDownMenu_DisableDropDown(self.ClubFocusDropdown);
UIDropDownMenu_DisableDropDown(self.LookingForDropdown);
UIDropDownMenu_DisableDropDown(self.LanguageDropdown);
else
local fontColor = HIGHLIGHT_FONT_COLOR;
self.AutoAcceptApplications.Label:SetTextColor(fontColor:GetRGB());
self.MaxLevelOnly.Label:SetTextColor(fontColor:GetRGB());
self.MinIlvlOnly.Label:SetTextColor(fontColor:GetRGB());
self.LookingForDropdown.Label:SetTextColor(NORMAL_FONT_COLOR:GetRGB());
self.ClubFocusDropdown.Label:SetTextColor(NORMAL_FONT_COLOR:GetRGB());
UIDropDownMenu_EnableDropDown(self.ClubFocusDropdown);
UIDropDownMenu_EnableDropDown(self.LookingForDropdown);
UIDropDownMenu_EnableDropDown(self.LanguageDropdown);
end
self:CheckLanguageDropdownTutorial();
end
function CommunitiesSettingsDialogMixin:HideOrShowCommunityFinderOptions(shouldShow)
......@@ -295,7 +335,7 @@ function CommunitiesSettingsDialogMixin:HideOrShowCommunityFinderOptions(shouldS
shouldShow = shouldShow and not isPostingBanned;
if(shouldShow) then
self:SetHeight(680);
self:SetHeight(740);
elseif (isPostingBanned and isClubFinderEnabled) then
self:SetHeight(500);
else
......@@ -346,6 +386,7 @@ function CommunitiesSettingsDialogAcceptButton_OnEnter(self)
local nameErrorCode = C_Club.GetCommunityNameResultText(C_Club.ValidateText(communitiesSettingsDialog:GetClubType(), name, Enum.ClubFieldType.ClubName));
local shortName = communitiesSettingsDialog.ShortNameEdit:GetText();
local shortNameErrorCode = C_Club.GetCommunityNameResultText(C_Club.ValidateText(communitiesSettingsDialog:GetClubType(), shortName, Enum.ClubFieldType.ClubShortName));
local languageSelected = not communitiesSettingsDialog.LanguageDropdown.showAnyLanguage;
if nameErrorCode ~= nil and shortNameErrorCode ~= nil then
local nameError = RED_FONT_COLOR:WrapTextInColorCode(nameErrorCode);
local shortNameError = RED_FONT_COLOR:WrapTextInColorCode(shortNameErrorCode);
......@@ -356,6 +397,8 @@ function CommunitiesSettingsDialogAcceptButton_OnEnter(self)
elseif shortNameErrorCode ~= nil then
local shortNameError = RED_FONT_COLOR:WrapTextInColorCode(shortNameErrorCode);
GameTooltip_SetBasicTooltip(GameTooltip, COMMUNITIES_CREATE_DIALOG_SHORT_NAME_ERROR:format( shortNameError), self:GetRight(), self:GetTop(), true);
elseif not languageSelected then
GameTooltip_SetBasicTooltip(GameTooltip, RED_FONT_COLOR:WrapTextInColorCode(LFG_LIST_SELECT_A_CATEGORY), self:GetRight(), self:GetTop(), true);
else
GameTooltip:Hide();
end
......
......@@ -3,7 +3,7 @@
<Script file="CommunitiesSettings.lua"/>
<Frame name="CommunitiesSettingsDialog" frameStrata="HIGH" parent="UIParent" enableMouse="true" mixin="CommunitiesSettingsDialogMixin" topLevel="true" clampedToScreen="true" hidden="true">
<Size x="432" y="680"/>
<Size x="432" y="740"/>
<Anchors>
<Anchor point="TOP" relativeTo="UIParent" x="0" y="-80"/>
</Anchors>
......@@ -272,7 +272,7 @@
<Frame parentKey="LookingForDropdown" name="ClubFinderLookingForDropdown" inherits="UIDropDownMenuTemplate" mixin="LookingForDropdownMixin">
<Size x="0" y="20"/>
<Anchors>
<Anchor point="RIGHT" relativeKey="$parent.ClubFocusDropdown" relativePoint="RIGHT" x="190" y="0"/>
<Anchor point="TOPLEFT" relativeKey="$parent.ClubFocusDropdown" relativePoint="BOTTOMLEFT" x="0" y="-25"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
......@@ -285,6 +285,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="0" 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>
<ScrollFrame parentKey="Description" inherits="InputScrollFrameTemplate">
<Size x="0" y="50"/>
<Anchors>
......
......@@ -12,6 +12,7 @@ local SEASON_STATE_ACTIVE = 3;
local SEASON_STATE_DISABLED = 4;
local CONQUEST_CURRENCY_ID = 1602;
local ECHOS_OF_NYLOTHA_CURRENCY_ID = 1803;
local BFA_START_SEASON = 26;
......@@ -229,14 +230,16 @@ function PVPUIFrame_ConfigureRewardFrame(rewardFrame, honor, experience, itemRew
-- artifact-level currency trumps item
if currencyRewards then
for i, reward in ipairs(currencyRewards) do
local name, _, texture, _, _, _, _, quality = GetCurrencyInfo(reward.id);
if quality == LE_ITEM_QUALITY_ARTIFACT then
name, texture, _, quality = CurrencyContainerUtil.GetCurrencyContainerInfo(reward.id, reward.quantity, name, texture, quality);
currencyID = reward.id;
rewardTexture = texture;
rewardQuantity = reward.quantity;
elseif reward.id == CONQUEST_CURRENCY_ID then
rewardFrame.conquestAmount = reward.quantity;
if(reward.id ~= ECHOS_OF_NYLOTHA_CURRENCY_ID or #currencyRewards == 1) then
local name, _, texture, _, _, _, _, quality = GetCurrencyInfo(reward.id);
if quality == LE_ITEM_QUALITY_ARTIFACT then
name, texture, _, quality = CurrencyContainerUtil.GetCurrencyContainerInfo(reward.id, reward.quantity, name, texture, quality);
currencyID = reward.id;
rewardTexture = texture;
rewardQuantity = reward.quantity;
elseif reward.id == CONQUEST_CURRENCY_ID then
rewardFrame.conquestAmount = reward.quantity;
end
end
end
end
......
......@@ -267,7 +267,7 @@ end
function HelpTipTemplateMixin:Init(parent, info, relativeRegion)
self:SetParent(parent);
if info.useParentStrata then
self:SetFrameLevel(10000);
self:SetFrameLevel(9000);
else
self:SetFrameStrata("DIALOG");
end
......
......@@ -10,6 +10,8 @@ WORLD_QUEST_TYPE_DUNGEON_TYPES = {
[LE_QUEST_TAG_TYPE_RAID] = true,
}
local ECHOS_OF_NYLOTHA_CURRENCY_ID = 1803;
WorldQuestsSecondsFormatter = CreateFromMixins(SecondsFormatterMixin);
WorldQuestsSecondsFormatter:Init(SECONDS_PER_MIN, SecondsFormatter.Abbreviation.None, false);
......@@ -416,7 +418,9 @@ function QuestUtils_AddQuestCurrencyRewardsToTooltip(questID, tooltip, currencyC
uniqueCurrencyIDs[currencyID] = true;
end
local currencyInfo = { name = name, texture = texture, numItems = numItems, currencyID = currencyID, rarity = rarity, firstInstance = firstInstance };
tinsert(currencies, currencyInfo);
if(currencyID ~= ECHOS_OF_NYLOTHA_CURRENCY_ID or numQuestCurrencies == 1) then
tinsert(currencies, currencyInfo);
end
end
table.sort(currencies,
......
......@@ -243,6 +243,7 @@ info.minWidth = [nil, NUMBER] -- Minimum width for this line
info.customFrame = frame -- Allows this button to be a completely custom frame, should inherit from UIDropDownCustomMenuEntryTemplate and override appropriate methods.
info.icon = [TEXTURE] -- An icon for the button.
info.mouseOverIcon = [TEXTURE] -- An override icon when a button is moused over.
info.ignoreAsMenuSelection [nil, true] -- Never set the menu text/icon to this, even when this button is checked
]]
function UIDropDownMenu_CreateInfo()
......@@ -461,6 +462,7 @@ function UIDropDownMenu_AddButton(info, level)
button.padding = info.padding;
button.icon = info.icon;
button.mouseOverIcon = info.mouseOverIcon;
button.ignoreAsMenuSelection = info.ignoreAsMenuSelection;
if ( info.value ) then
button.value = info.value;
......@@ -728,16 +730,18 @@ function UIDropDownMenu_Refresh(frame, useValue, dropdownLevel)
local checkImage = _G["DropDownList"..dropdownLevel.."Button"..i.."Check"];
local uncheckImage = _G["DropDownList"..dropdownLevel.."Button"..i.."UnCheck"];
if ( checked ) then
somethingChecked = true;
local icon = GetChild(frame, frame:GetName(), "Icon");
if (button.iconOnly and icon and button.icon) then
UIDropDownMenu_SetIconImage(icon, button.icon, button.iconInfo);
elseif ( useValue ) then
UIDropDownMenu_SetText(frame, button.value);
icon:Hide();
else
UIDropDownMenu_SetText(frame, button:GetText());
icon:Hide();
if not button.ignoreAsMenuSelection then
somethingChecked = true;
local icon = GetChild(frame, frame:GetName(), "Icon");
if (button.iconOnly and icon and button.icon) then
UIDropDownMenu_SetIconImage(icon, button.icon, button.iconInfo);
elseif ( useValue ) then
UIDropDownMenu_SetText(frame, button.value);
icon:Hide();
else
UIDropDownMenu_SetText(frame, button:GetText());
icon:Hide();
end
end
button:LockHighlight();
checkImage:Show();
......@@ -758,6 +762,8 @@ function UIDropDownMenu_Refresh(frame, useValue, dropdownLevel)
end
if(somethingChecked == nil) then
UIDropDownMenu_SetText(frame, VIDEO_QUALITY_LABEL6);
local icon = GetChild(frame, frame:GetName(), "Icon");
icon:Hide();
end
if (not frame.noResize) then
for i=1, UIDROPDOWNMENU_MAXBUTTONS do
......@@ -1325,10 +1331,11 @@ end
function UIDropDownMenu_DisableDropDown(dropDown)
local dropDownName = dropDown:GetName();
local label = GetChild(dropDown, dropDownName, "Label");
if ( label ) then
label:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
if label then
label:SetVertexColor(GRAY_FONT_COLOR:GetRGB());
end
GetChild(dropDown, dropDownName, "Text"):SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b);
GetChild(dropDown, dropDownName, "Icon"):SetVertexColor(GRAY_FONT_COLOR:GetRGB());
GetChild(dropDown, dropDownName, "Text"):SetVertexColor(GRAY_FONT_COLOR:GetRGB());
GetChild(dropDown, dropDownName, "Button"):Disable();
dropDown.isDisabled = 1;