Commit cebf42ae authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-30948patch8.2.0_Retail

parent 4f7261bc
......@@ -736,7 +736,7 @@ function AzeriteEssenceListMixin:CleanUpLearnEssence()
self.learnEssenceButton = nil;
self.LearnEssenceModelScene:Hide();
ScrollBar_Enable(self.scrollBar);
self:Refresh();
end
function AzeriteEssenceListMixin:CalculateScrollOffset(offset)
......@@ -838,12 +838,15 @@ function AzeriteEssenceListMixin:Refresh()
HybridScrollFrame_Update(self, totalHeight, self:GetHeight());
self:UpdateMouseOverTooltip();
if hasUnlockedEssence and parent:ShouldPlayReveal() and not parent:IsRevealInProgress() then
if parent:ShouldPlayReveal() and not parent:IsRevealInProgress() then
ScrollBar_Disable(self.scrollBar);
self.Tutorial:Show();
self.Tutorial:SetPoint("BOTTOM", self.buttons[1].Icon, "TOP", 0, 12);
if hasUnlockedEssence then
self.Tutorial:Show();
self.Tutorial:SetPoint("BOTTOM", self.buttons[1].Icon, "TOP", 0, 12);
else
self.Tutorial:Hide();
end
else
ScrollBar_Enable(self.scrollBar);
self.Tutorial:Hide();
end
end
......
......@@ -507,6 +507,12 @@ function NameplateBuffContainerMixin:UpdateAnchor()
local isTarget = self:GetParent().unit and UnitIsUnit(self:GetParent().unit, "target");
local targetYOffset = self:GetBaseYOffset() + (isTarget and self:GetTargetYOffset() or 0.0);
self:ClearAllPoints();
local parent = self:GetParent();
local healthBar = parent and parent.healthBar;
if healthBar then
self:SetPoint("LEFT", healthBar, "LEFT", -1, 0);
end
if (self:GetParent().unit and ShouldShowName(self:GetParent())) then
self:SetPoint("BOTTOM", self:GetParent(), "TOP", 0, targetYOffset);
else
......
......@@ -10,6 +10,7 @@ end
Import("IsOnGlueScreen");
Import("GetPhysicalScreenSize");
Import("GetScreenDPIScale");
Import("ConvertPixelsToUI");
if ( tbl.IsOnGlueScreen() ) then
......@@ -30,8 +31,7 @@ function SimpleCheckoutMixin:OnEvent(event, ...)
if (event == "STORE_OPEN_SIMPLE_CHECKOUT") then
local checkoutID = ...;
if (StoreFrame:IsShown()) then
self.requestedWidth = 800;
self.requestedHeight = 600;
self:CalculateDesiredSize();
self:RecalculateSize();
self:Show();
if (self:OpenCheckout(checkoutID)) then
......@@ -43,6 +43,7 @@ function SimpleCheckoutMixin:OnEvent(event, ...)
self:CancelOpenCheckout();
end
elseif (event == "UI_SCALE_CHANGED" or event == "DISPLAY_SIZE_CHANGED") then
self:CalculateDesiredSize();
self:RecalculateSize();
elseif (event == "SUBSCRIPTION_CHANGED_KICK_IMMINENT") then
if (IsOnGlueScreen()) then
......@@ -73,13 +74,51 @@ function SimpleCheckoutMixin:OnHide()
end
function SimpleCheckoutMixin:OnRequestNewSize(newWidth, newHeight)
-- newWidth and newHeight are in pixels; we need to convert to UI coordinates
self.requestedWidth = newWidth;
self.requestedHeight = newHeight;
-- newWidth and newHeight are in pixels
self.desiredWidth = newWidth;
self.desiredHeight = newHeight;
self:RecalculateSize();
end
function SimpleCheckoutMixin:OnExternalLink()
self:OpenExternalLink();
end
do
local baseWidth = 860;
local baseHeight = 645;
local NormalizeScaleMultiplier = function(multiplier)
if multiplier > 2.4 then
return 3;
elseif multiplier > 1.4 then
return 2;
else
return 1;
end
end
function SimpleCheckoutMixin:CalculateDesiredSize()
local physicalWidth, physicalHeight = GetPhysicalScreenSize();
local scaleMultiplier = NormalizeScaleMultiplier(GetScreenDPIScale());
local desiredWidth = baseWidth * scaleMultiplier;
local desiredHeight = baseHeight * scaleMultiplier;
while scaleMultiplier >= 2 and (desiredWidth > physicalWidth * 0.9 or desiredHeight > physicalHeight * 0.9) do
scaleMultiplier = scaleMultiplier - 1;
desiredWidth = baseWidth * scaleMultiplier;
desiredHeight = baseHeight * scaleMultiplier;
end
self.desiredWidth = desiredWidth;
self.desiredHeight = desiredHeight;
end
end
local function SetOffsets(top, left, bottom, right, size, topOffset, leftOffset, bottomOffset, rightOffset)
top:SetThickness(size);
top:SetStartPoint("TOPLEFT", leftOffset * size, topOffset * size);
......@@ -104,12 +143,12 @@ function SimpleCheckoutMixin:RecalculateSize()
local pixelSize = ConvertPixelsToUI(1, self:GetEffectiveScale());
-- Convert to ui coordinates, clamping to 90% of window size
local requestedWidth = Clamp(self.requestedWidth * pixelSize, 1, physicalWidth * pixelSize * 0.9);
local requestedHeight = Clamp(self.requestedHeight * pixelSize, 1, physicalHeight * pixelSize * 0.9);
local desiredWidth = Clamp(self.desiredWidth * pixelSize, 1, physicalWidth * pixelSize * 0.9);
local desiredHeight = Clamp(self.desiredHeight * pixelSize, 1, physicalHeight * pixelSize * 0.9);
-- Convert back to pixel coordinates; this will include any clamping done above
local uiWidth = requestedWidth / pixelSize;
local uiHeight = requestedHeight / pixelSize;
local uiWidth = desiredWidth / pixelSize;
local uiHeight = desiredHeight / pixelSize;
-- position frame on a pixel boundary.
local left = math.floor((physicalWidth - uiWidth) / 2) * pixelSize;
......@@ -117,7 +156,7 @@ function SimpleCheckoutMixin:RecalculateSize()
self:ClearAllPoints();
self:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", left, bottom);
self:SetSize(requestedWidth, requestedHeight);
self:SetSize(desiredWidth, desiredHeight);
self.CloseButton:SetSize(20 * pixelSize, 20 * pixelSize);
self.CloseButton:ClearAllPoints();
......@@ -126,4 +165,3 @@ function SimpleCheckoutMixin:RecalculateSize()
SetOffsets(self.TopInside, self.LeftInside, self.BottomInside, self.RightInside, pixelSize, -1, 1, 1, -1);
SetOffsets(self.TopOutside, self.LeftOutside, self.BottomOutside, self.RightOutside, pixelSize, 0, 0, 0, 0);
end
......@@ -82,6 +82,7 @@
<OnHide method="OnHide"/>
<OnShow method="OnShow"/>
<OnRequestNewSize method="OnRequestNewSize"/>
<OnExternalLink method="OnExternalLink"/>
</Scripts>
</Checkout>
</ScopedModifier>
......
......@@ -502,8 +502,9 @@ function FriendsList_CanWhisperFriend(friendType, friendIndex)
end
function FriendsList_Update(forceUpdate)
local numBNetTotal, numBNetOnline = BNGetNumFriends();
local numBNetTotal, numBNetOnline, numBNetFavorite, numBNetFavoriteOnline = BNGetNumFriends();
local numBNetOffline = numBNetTotal - numBNetOnline;
local numBNetFavoriteOffline = numBNetFavorite - numBNetFavoriteOnline;
local numWoWTotal = C_FriendList.GetNumFriends();
local numWoWOnline = C_FriendList.GetNumOnlineFriends();
local numWoWOffline = numWoWTotal - numWoWOnline;
......@@ -515,6 +516,7 @@ function FriendsList_Update(forceUpdate)
local addButtonIndex = 0;
local totalButtonHeight = 0;
local function AddButtonInfo(buttonType, id)
addButtonIndex = addButtonIndex + 1;
if ( not FriendListEntries[addButtonIndex] ) then
......@@ -539,9 +541,21 @@ function FriendsList_Update(forceUpdate)
end
end
end
local bnetFriendIndex = 0;
-- favorite friends, online and offline
for i = 1, numBNetFavorite do
bnetFriendIndex = bnetFriendIndex + 1;
AddButtonInfo(FRIENDS_BUTTON_TYPE_BNET, bnetFriendIndex);
end
if (numBNetFavorite > 0) then
AddButtonInfo(FRIENDS_BUTTON_TYPE_DIVIDER, nil);
end
-- online Battlenet friends
for i = 1, numBNetOnline do
AddButtonInfo(FRIENDS_BUTTON_TYPE_BNET, i);
for i = 1, numBNetOnline - numBNetFavoriteOnline do
bnetFriendIndex = bnetFriendIndex + 1;
AddButtonInfo(FRIENDS_BUTTON_TYPE_BNET, bnetFriendIndex);
end
-- online WoW friends
for i = 1, numWoWOnline do
......@@ -551,9 +565,11 @@ function FriendsList_Update(forceUpdate)
if ( (numBNetOnline > 0 or numWoWOnline > 0) and (numBNetOffline > 0 or numWoWOffline > 0) ) then
AddButtonInfo(FRIENDS_BUTTON_TYPE_DIVIDER, nil);
end
-- offline Battlenet friends
for i = 1, numBNetOffline do
AddButtonInfo(FRIENDS_BUTTON_TYPE_BNET, i + numBNetOnline);
for i = 1, numBNetOffline - numBNetFavoriteOffline do
bnetFriendIndex = bnetFriendIndex + 1;
AddButtonInfo(FRIENDS_BUTTON_TYPE_BNET, bnetFriendIndex);
end
-- offline WoW friends
for i = 1, numWoWOffline do
......
......@@ -15,13 +15,10 @@
<Scripts>
<OnPlay>
local iconFrame = self:GetParent();
self.strata = iconFrame:GetFrameStrata();
iconFrame:SetFrameStrata("HIGH");
iconFrame.animIcon:Show();
</OnPlay>
<OnFinished>
local iconFrame = self:GetParent();
iconFrame:SetFrameStrata(self.strata);
iconFrame.animIcon:Hide();
</OnFinished>
</Scripts>
......
......@@ -135,6 +135,7 @@ retain("SOUNDKIT");
retain("GetScreenWidth");
retain("GetScreenHeight");
retain("GetPhysicalScreenSize");
retain("GetScreenDPIScale");
retain("ConvertPixelsToUI");
retain("IsTrialAccount");
retain("IsVeteranTrialAccount");
......
......@@ -234,7 +234,7 @@ function SplashFrame_OnEvent(self, event)
end
if( event == "QUEST_LOG_UPDATE" ) then
local shouldForceCurrent = false;
local shouldForceCurrent = true;
local tag = GetSplashFrameTag(shouldForceCurrent);
if( self:IsShown() and tag )then
SplashFrame_SetStartButtonDisplay( ShouldShowStartButton(SPLASH_SCREENS[tag].questID, tag) );
......
......@@ -20,6 +20,42 @@
<Texture name="DialogButtonHighlightTexture" file="Interface\Buttons\UI-Panel-Button-Highlight" alphaMode="ADD" virtual="true">
<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
</Texture>
<Frame name="DialogBoxFrame" virtual="true" toplevel="true" frameStrata="DIALOG" hidden="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize>
<AbsValue val="32"/>
</EdgeSize>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
</BackgroundInsets>
</Backdrop>
<Frames>
<Button name="$parentButton">
<Size x="128" y="32"/>
<Anchors>
<Anchor point="BOTTOM" x="0" y="16"/>
</Anchors>
<Scripts>
<OnClick>
self:GetParent():Hide();
</OnClick>
</Scripts>
<NormalTexture inherits="DialogButtonNormalTexture"/>
<PushedTexture inherits="DialogButtonPushedTexture"/>
<HighlightTexture inherits="DialogButtonHighlightTexture"/>
<ButtonText text="OKAY"/>
<NormalFont style="DialogButtonNormalText"/>
<HighlightFont style="DialogButtonHighlightText"/>
</Button>
</Frames>
</Frame>
<Frame name="UIPanelDialogTemplate" virtual="true">
<Layers>
<Layer level="OVERLAY">
......
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