Commit 03350f71 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-29869patch8.1.5_PTR

parent 9c78d7b2
......@@ -165,6 +165,7 @@ local GuildInfo =
{ Name = "emblemColorG", Type = "number", Nilable = true },
{ Name = "emblemColorB", Type = "number", Nilable = true },
{ Name = "emblemFileID", Type = "number", Nilable = true },
{ Name = "emblemIndex", Type = "number", Nilable = true },
},
},
{
......
......@@ -198,7 +198,7 @@ local function CreatePushToTalkBindingButton()
end
end);
handler:SetOnBindingCompletedCallback(function(completedSuccessfully)
handler:SetOnBindingCompletedCallback(function(completedSuccessfully, keys)
KeyBindingFrame_SetSelected(nil);
if completedSuccessfully then
......@@ -206,6 +206,10 @@ local function CreatePushToTalkBindingButton()
else
KeyBindingFrame.outputText:SetText("");
end
if completedSuccessfully and keys then
DisplayUniversalAccessDialogIfRequiredForVoiceChatKeybind(keys);
end
end);
button = CustomBindingManager:RegisterHandlerAndCreateButton(handler, "CustomBindingButtonTemplate", KeyBindingFrame);
......
......@@ -579,7 +579,7 @@ function WardrobeTransmogButton_OnEnter(self)
end
end
WardrobeTransmogFrame.Model.controlFrame:Show();
self.UpdateTooltip = self.OnEnter;
self.UpdateTooltip = WardrobeTransmogButton_OnEnter;
end
function WardrobeTransmogButton_OnLeave(self)
......
......@@ -8,7 +8,7 @@ end
-- Tooltip Changes
do
-- Use GameTooltip instead.
WorldmapTooltip = GameTooltip;
WorldMapTooltip = GameTooltip;
end
-- Pool Collection Changes
......
......@@ -61,7 +61,7 @@
<Layer level="OVERLAY">
<FontString parentKey="Label" inherits="GameFontHighlight">
<Anchors>
<Anchor point="CENTER"/>
<Anchor point="CENTER" y="0.5"/>
</Anchors>
</FontString>
</Layer>
......
......@@ -339,6 +339,23 @@ function AudioOptionsVoicePanel_OnEvent(self, event, ...)
end
end
function DisplayUniversalAccessDialogIfRequiredForVoiceChatKeybind(keys)
if IsMacClient() then
local hasNonMetaKey = false;
for i, key in ipairs(keys) do
if not IsMetaKey(key) then
hasNonMetaKey = true;
break;
end
end
if hasNonMetaKey then
if not MacOptions_IsUniversalAccessEnabled() then
StaticPopup_Show("MAC_OPEN_UNIVERSAL_ACCESS");
end
end
end
end
function AudioOptionsVoicePanel_InitializeCommunicationModeUI(self)
if not self.PushToTalkKeybindButton then
local handler = CustomBindingHandler:CreateHandler(Enum.CustomBindingType.VoicePushToTalk);
......@@ -349,10 +366,14 @@ function AudioOptionsVoicePanel_InitializeCommunicationModeUI(self)
end
end);
handler:SetOnBindingCompletedCallback(function(completedSuccessfully)
handler:SetOnBindingCompletedCallback(function(completedSuccessfully, keys)
self.ChatModeDropdown.PushToTalkNotification:SetText("");
BindingButtonTemplate_SetSelected(self.PushToTalkKeybindButton, false);
AudioOptionsVoicePanel_UpdateCommunicationModeUI(self);
if completedSuccessfully and keys then
DisplayUniversalAccessDialogIfRequiredForVoiceChatKeybind(keys);
end
end);
self.PushToTalkKeybindButton = CustomBindingManager:RegisterHandlerAndCreateButton(handler, "CustomBindingButtonTemplateWithLabel", self);
......
......@@ -1534,15 +1534,24 @@ function ToggleAllBags()
end
end
function OpenAllBags(frame)
function OpenAllBags(frame, forceUpdate)
if ( not UIParent:IsShown() ) then
return;
end
local anyBagIsOpen = false;
for i=0, NUM_BAG_FRAMES, 1 do
if (IsBagOpen(i)) then
return;
anyBagIsOpen = true;
end
end
if ( anyBagIsOpen ) then
if ( forceUpdate ) then
ContainerFrame_UpdateAll();
end
return;
end
if( frame and not FRAME_THAT_OPENED_BAGS ) then
......@@ -1558,8 +1567,12 @@ function OpenAllBags(frame)
CheckBagSettingsTutorial();
end
function CloseAllBags(frame)
function CloseAllBags(frame, forceUpdate)
if ( frame and frame:GetName() ~= FRAME_THAT_OPENED_BAGS) then
if ( forceUpdate ) then
ContainerFrame_UpdateAll();
end
return;
end
......
......@@ -17,9 +17,9 @@ end
end
end
--[[private]] function CustomBindingHandlerMixin:CallOnBindingCompletedCallback(completedSuccessfully)
--[[private]] function CustomBindingHandlerMixin:CallOnBindingCompletedCallback(completedSuccessfully, keys)
if self.bindingCompletedCallback then
self.bindingCompletedCallback(completedSuccessfully);
self.bindingCompletedCallback(completedSuccessfully, keys);
end
end
......
......@@ -23,9 +23,9 @@ end
end
end
--[[private]] function CustomBindingManager:OnBindingCompleted(frame, completedSuccessfully)
--[[private]] function CustomBindingManager:OnBindingCompleted(frame, completedSuccessfully, keys)
for handler, frame in self:EnumerateHandlers(frame:GetCustomBindingType()) do
handler:CallOnBindingCompletedCallback(completedSuccessfully);
handler:CallOnBindingCompletedCallback(completedSuccessfully, keys);
end
end
......
......@@ -627,19 +627,20 @@ function GameTooltip_AnchorComparisonTooltips(self, anchorFrame, shoppingTooltip
side = "right";
end
-- see if we should slide the tooltip
if ( anchorType and anchorType ~= "ANCHOR_PRESERVE" ) then
local slideAmount = 0;
if ( (side == "left") and (totalWidth > leftPos) ) then
slideAmount = totalWidth - leftPos;
elseif ( (side == "right") and (rightPos + totalWidth) > screenWidth ) then
slideAmount = screenWidth - (rightPos + totalWidth);
end
if ( totalWidth > 0 ) then -- if totalWidth > 0, we potenitally need to slide the tooltip
if ( anchorType and anchorType ~= "ANCHOR_PRESERVE" ) then
local slideAmount = 0;
if ( (side == "left") and (totalWidth > leftPos) ) then
slideAmount = totalWidth - leftPos;
elseif ( (side == "right") and (rightPos + totalWidth) > screenWidth ) then
slideAmount = screenWidth - (rightPos + totalWidth);
end
if ( sideAnchorFrame.SetAnchorType ) then
sideAnchorFrame:SetAnchorType(anchorType, slideAmount, 0);
else
self:SetAnchorType(anchorType, slideAmount, 0);
if ( sideAnchorFrame.SetAnchorType ) then
sideAnchorFrame:SetAnchorType(anchorType, slideAmount, 0);
else
self:SetAnchorType(anchorType, slideAmount, 0);
end
end
end
......
function GuildInviteFrame_OnEvent(self, event, ...)
if ( event == "GUILD_INVITE_REQUEST" ) then
local inviterName, guildName, guildPoints, oldGuildName, isNewGuild = ...;
local emblem = { select(6, ...) };
local tabardData = { select(6, ...) };
GuildInviteFrame.inviter = inviterName;
GuildInviteFrameInviterName:SetText(inviterName);
GuildInviteFrameGuildName:SetText(guildName);
GuildInviteFrame.Points.Text:SetText(guildPoints);
SetLargeGuildTabardTextures(nil, GuildInviteFrameTabardEmblem, GuildInviteFrameTabardBackground, GuildInviteFrameTabardBorder, emblem);
SetLargeGuildTabardTextures(nil, GuildInviteFrameTabardEmblem, GuildInviteFrameTabardBackground, GuildInviteFrameTabardBorder, tabardData);
-- check if player has any guild rep beyond Neutral 0 if it's being invited to a new guild
local name, description, standingID, barMin, barMax, barValue = GetGuildFactionInfo();
if ( isNewGuild and ( standingID > 4 or barValue > 0 ) ) then
......
......@@ -160,10 +160,10 @@ function SetItemRef(link, text, button, chatFrame)
end
else
if ( BNIsFriend(bnetIDAccount)) then
ChatFrame_SendBNetTell(name, chatFrame);
ChatFrame_SendBNetTell(name);
else
local displayName = BNGetDisplayName(bnetIDAccount);
ChatFrame_SendBNetTell(displayName, chatFrame)
ChatFrame_SendBNetTell(displayName)
end
end
end
......
......@@ -806,7 +806,7 @@ function GetBonusRollEncounterJournalLinkDifficulty()
end
function EncounterJournalLinkButton_IsLinkDataAvailable()
if ( BonusRollFrame.instanceID or BonusRollFrame.encounterID ) then
if ( BonusRollFrame.instanceID and BonusRollFrame.instanceID ~= 0 ) then
local difficultyID = GetBonusRollEncounterJournalLinkDifficulty();
-- Mythic+ doesn't yet have all the itemContext info available
--that we need to properly show item tooltips
......
......@@ -95,9 +95,11 @@ function OverrideActionBar_OnShow(self)
end
function OverrideActionBar_UpdateMicroButtons()
local anchorX, anchorY = OverrideActionBar_GetMicroButtonAnchor();
UpdateMicroButtonsParent(OverrideActionBar);
MoveMicroButtons("BOTTOMLEFT", OverrideActionBar, "BOTTOMLEFT", anchorX, anchorY, true);
if ActionBarController_GetCurrentActionBarState() == LE_ACTIONBAR_STATE_OVERRIDE then
local anchorX, anchorY = OverrideActionBar_GetMicroButtonAnchor();
UpdateMicroButtonsParent(OverrideActionBar);
MoveMicroButtons("BOTTOMLEFT", OverrideActionBar, "BOTTOMLEFT", anchorX, anchorY, true);
end
end
function OverrideActionBar_UpdateSkin()
......
......@@ -4835,8 +4835,8 @@ function SetDoubleGuildTabardTextures(unit, leftEmblemTexture, rightEmblemTextur
end
function SetGuildTabardTextures(emblemSize, columns, offset, unit, emblemTexture, backgroundTexture, borderTexture, tabardData)
local bkgR, bkgG, bkgB, borderR, borderG, borderB, emblemR, emblemG, emblemB, emblemFilename;
if ( tabardData ) then
local bkgR, bkgG, bkgB, borderR, borderG, borderB, emblemR, emblemG, emblemB, emblemFileID, emblemIndex;
if ( tabardData ) then
bkgR = tabardData[1];
bkgG = tabardData[2];
bkgB = tabardData[3];
......@@ -4846,11 +4846,12 @@ function SetGuildTabardTextures(emblemSize, columns, offset, unit, emblemTexture
emblemR = tabardData[7];
emblemG = tabardData[8];
emblemB = tabardData[9];
emblemFilename = tabardData[10];
emblemFileID = tabardData[10];
emblemIndex = tabardData[11];
else
bkgR, bkgG, bkgB, borderR, borderG, borderB, emblemR, emblemG, emblemB, emblemFilename, emblemIndex = GetGuildLogoInfo(unit);
bkgR, bkgG, bkgB, borderR, borderG, borderB, emblemR, emblemG, emblemB, emblemFileID, emblemIndex = GetGuildLogoInfo(unit);
end
if ( emblemFilename ) then
if ( emblemFileID ) then
if ( backgroundTexture ) then
backgroundTexture:SetVertexColor(bkgR / 255, bkgG / 255, bkgB / 255);
end
......@@ -4865,7 +4866,7 @@ function SetGuildTabardTextures(emblemSize, columns, offset, unit, emblemTexture
end
emblemTexture:SetVertexColor(emblemR / 255, emblemG / 255, emblemB / 255);
elseif ( emblemTexture ) then
emblemTexture:SetTexture(emblemFilename);
emblemTexture:SetTexture(emblemFileID);
emblemTexture:SetVertexColor(emblemR / 255, emblemG / 255, emblemB / 255);
end
else
......
......@@ -240,7 +240,7 @@ UnitPopupMenus = {
["BOSS"] = { "RAID_TARGET_ICON", "SET_FOCUS", "OTHER_SUBSECTION_TITLE", "CANCEL" },
["WORLD_STATE_SCORE"] = { "REPORT_PLAYER", "PVP_REPORT_AFK", "CANCEL" },
["COMMUNITIES_WOW_MEMBER"] = { "TARGET", "ADD_FRIEND_MENU", "SUBSECTION_SEPARATOR", "VOICE_CHAT_MICROPHONE_VOLUME", "VOICE_CHAT_SPEAKER_VOLUME", "VOICE_CHAT_USER_VOLUME", "SUBSECTION_SEPARATOR", "INTERACT_SUBSECTION_TITLE", "INVITE", "SUGGEST_INVITE", "REQUEST_INVITE", "WHISPER", "IGNORE", "COMMUNITIES_LEAVE", "COMMUNITIES_KICK", "COMMUNITIES_MEMBER_NOTE", "COMMUNITIES_ROLE", "OTHER_SUBSECTION_TITLE", "REPORT_PLAYER", "COPY_CHARACTER_NAME", "CANCEL" },
["COMMUNITIES_GUILD_MEMBER"] = { "VOICE_CHAT_MICROPHONE_VOLUME", "VOICE_CHAT_SPEAKER_VOLUME", "VOICE_CHAT_USER_VOLUME", "SUBSECTION_SEPARATOR", "INVITE", "SUGGEST_INVITE", "REQUEST_INVITE", "WHISPER", "IGNORE", "OTHER_SUBSECTION_TITLE", "GUILD_PROMOTE", "GUILD_LEAVE", "REPORT_PLAYER", "COPY_CHARACTER_NAME" },
["COMMUNITIES_GUILD_MEMBER"] = { "TARGET", "ADD_FRIEND_MENU", "SUBSECTION_SEPARATOR", "VOICE_CHAT_MICROPHONE_VOLUME", "VOICE_CHAT_SPEAKER_VOLUME", "VOICE_CHAT_USER_VOLUME", "SUBSECTION_SEPARATOR", "INTERACT_SUBSECTION_TITLE", "INVITE", "SUGGEST_INVITE", "REQUEST_INVITE", "WHISPER", "IGNORE", "GUILD_PROMOTE", "OTHER_SUBSECTION_TITLE", "GUILD_LEAVE", "REPORT_PLAYER", "COPY_CHARACTER_NAME", "CANCEL" },
["COMMUNITIES_MEMBER"] = { "COMMUNITIES_BATTLETAG_FRIEND", "SUBSECTION_SEPARATOR", "VOICE_CHAT_MICROPHONE_VOLUME", "VOICE_CHAT_SPEAKER_VOLUME", "VOICE_CHAT_USER_VOLUME", "SUBSECTION_SEPARATOR", "COMMUNITIES_LEAVE", "COMMUNITIES_KICK", "COMMUNITIES_MEMBER_NOTE", "COMMUNITIES_ROLE", "OTHER_SUBSECTION_TITLE", "REPORT_PLAYER" },
["COMMUNITIES_COMMUNITY"] = { "COMMUNITIES_CLEAR_UNREAD_NOTIFICATIONS", "COMMUNITIES_INVITE", "COMMUNITIES_SETTINGS", "COMMUNITIES_NOTIFICATION_SETTINGS", "COMMUNITIES_FAVORITE", "COMMUNITIES_LEAVE" },
......@@ -1672,7 +1672,7 @@ function UnitPopup_OnClick (self)
elseif ( button == "WHISPER" ) then
local isBNetAccount = dropdownFrame.bnetIDAccount or (dropdownFrame.playerLocation and dropdownFrame.playerLocation:IsBattleNetGUID());
if ( isBNetAccount ) then
ChatFrame_SendBNetTell(fullname, dropdownFrame.chatFrame);
ChatFrame_SendBNetTell(fullname);
else
ChatFrame_SendTell(fullname, dropdownFrame.chatFrame);
end
......
......@@ -2051,7 +2051,7 @@ function CharacterServicesMaster_UpdateServiceButton()
for _, boostType in pairs(characterServiceDisplayInfo) do
DisplayBattlepayTokens(upgradeInfo[boostType], boostType);
end
--[[
local accountExpansion = GetAccountExpansionLevel();
local MINIMUM_BOOST_POPUP_SHOWN = 7;
......@@ -2089,6 +2089,7 @@ function CharacterServicesMaster_UpdateServiceButton()
DisplayBattlepayTokenFreeFrame(freeFrame);
end
end
--]]
end
function DisplayBattlepayTokens(upgradeInfo, boostType)
......
......@@ -88,7 +88,7 @@ end
CustomBindingManager:SetPendingBind(self:GetCustomBindingType(), self.keys);
if self.receivedNonMetaKeyInput or isButtonRelease then
self:NotifyBindingCompleted(true);
self:NotifyBindingCompleted(true, self.keys);
if isButtonRelease then
self:EnableKeyboard(false);
......@@ -119,8 +119,8 @@ end
end
end
--[[private]] function CustomBindingButtonMixin:NotifyBindingCompleted(completedSuccessfully)
CustomBindingManager:OnBindingCompleted(self, completedSuccessfully);
--[[private]] function CustomBindingButtonMixin:NotifyBindingCompleted(completedSuccessfully, keys)
CustomBindingManager:OnBindingCompleted(self, completedSuccessfully, keys);
self:SetBindingModeActive(false);
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment