Fixed "Time out of combat" after mythic+ and another round of polishing frames and menus

This commit is contained in:
Tercio Jose
2024-03-06 14:50:56 -03:00
parent 9c23a8a8af
commit b7e6b89792
14 changed files with 133 additions and 95 deletions
+49 -30
View File
@@ -1,7 +1,12 @@
local Details = Details
local addonName, Details222 = ...
local AceLocale = LibStub("AceLocale-3.0")
local Loc = AceLocale:GetLocale( "Details" )
---@type detailsframework
local detailsFramework = DetailsFramework
local gump = Details.gump
local _
@@ -11,29 +16,10 @@ local floor = math.floor
local gameCooltip = GameCooltip
local CreateFrame = CreateFrame
--api locals
do
local bookmarkFrame = CreateFrame("frame", "DetailsSwitchPanel", UIParent,"BackdropTemplate")
bookmarkFrame:SetPoint("center", UIParent, "center", 500, -300)
bookmarkFrame:SetWidth(250)
bookmarkFrame:SetHeight(100)
bookmarkFrame:SetFrameStrata("FULLSCREEN")
bookmarkFrame:SetFrameLevel(16)
bookmarkFrame.editing_window = nil
function Details222.CreateAllDisplaysFrame()
local icon_size = 16
local text_color = {.9, .9, .9, 1}
DetailsFramework:ApplyStandardBackdrop(bookmarkFrame, true)
bookmarkFrame:SetBackdropBorderColor(0, 0, 0, 0)
local backgroundGradientTexture = DetailsFramework:CreateTexture(bookmarkFrame, {gradient = "vertical", fromColor = {0, 0, 0, 0.2}, toColor = {0, 0, 0, 0.4}}, 1, 1, "artwork", {0, 1, 0, 1})
backgroundGradientTexture:SetAllPoints()
bookmarkFrame.HoverOverBackground = {.6, .6, .6, .2}
bookmarkFrame.hoverOverTexture = bookmarkFrame:CreateTexture(nil, "border")
bookmarkFrame.hoverOverTexture:SetTexture(unpack(bookmarkFrame.HoverOverBackground))
bookmarkFrame.hoverOverTexture:SetSize(130, 18)
bookmarkFrame.hoverOverTexture:Hide()
--~all
local allDisplaysFrame = CreateFrame("frame", "DetailsAllAttributesFrame", UIParent,"BackdropTemplate")
allDisplaysFrame:SetFrameStrata("tooltip")
allDisplaysFrame:Hide()
@@ -41,9 +27,21 @@ do
allDisplaysFrame:SetClampedToScreen(true)
allDisplaysFrame.buttons = {}
DetailsFramework:ApplyStandardBackdrop(allDisplaysFrame)
allDisplaysFrame.BackgroundGradientTexture = DetailsFramework:CreateTexture(allDisplaysFrame, {gradient = "vertical", fromColor = "transparent", toColor = {0, 0, 0, 0.2}}, 1, 1, "artwork", {0, 1, 0, 1})
allDisplaysFrame.BackgroundGradientTexture:SetAllPoints()
function allDisplaysFrame:UpdateFontStrings()
for _, attribute in ipairs(allDisplaysFrame.buttons) do
for _, button in ipairs(attribute) do
Details222.BreakdownWindow.ApplyFontSettings(button.text)
end
end
end
DetailsSwitchPanel.all_switch = allDisplaysFrame
detailsFramework:AddRoundedCornersToFrame(allDisplaysFrame, Details.PlayerBreakdown.RoundedCornerPreset)
--DetailsFramework:ApplyStandardBackdrop(allDisplaysFrame)
--allDisplaysFrame.BackgroundGradientTexture = DetailsFramework:CreateTexture(allDisplaysFrame, {gradient = "vertical", fromColor = "transparent", toColor = {0, 0, 0, 0.2}}, 1, 1, "artwork", {0, 1, 0, 1})
--allDisplaysFrame.BackgroundGradientTexture:SetAllPoints()
allDisplaysFrame:SetScript("OnMouseDown", function(self, button)
if (button == "RightButton") then
@@ -79,8 +77,6 @@ do
allDisplaysFrame:SetScript("OnUpdate", nil)
end)
DetailsSwitchPanel.all_switch = allDisplaysFrame
function Details:ShowAllSwitch()
if (allDisplaysFrame:IsShown()) then
return allDisplaysFrame:Hide()
@@ -136,9 +132,6 @@ do
hoverOverTexture:SetSize(130, 18)
hoverOverTexture:Hide()
local icon_size = 16
local text_color = {.9, .9, .9, 1}
local on_enter_all_switch_button = function(self)
Details:SetFontColor(self.text, "orange")
allDisplaysFrame.interacting = true
@@ -379,6 +372,32 @@ do
allDisplaysFrame:SetScale(Details.all_switch_config.scale)
end)
end
--api locals
do
local bookmarkFrame = CreateFrame("frame", "DetailsSwitchPanel", UIParent, "BackdropTemplate")
bookmarkFrame:SetPoint("center", UIParent, "center", 500, -300)
bookmarkFrame:SetWidth(250)
bookmarkFrame:SetHeight(100)
bookmarkFrame:SetFrameStrata("FULLSCREEN")
bookmarkFrame:SetFrameLevel(16)
bookmarkFrame.editing_window = nil
DetailsFramework:ApplyStandardBackdrop(bookmarkFrame, true)
bookmarkFrame:SetBackdropBorderColor(0, 0, 0, 0)
local backgroundGradientTexture = DetailsFramework:CreateTexture(bookmarkFrame, {gradient = "vertical", fromColor = {0, 0, 0, 0.2}, toColor = {0, 0, 0, 0.4}}, 1, 1, "artwork", {0, 1, 0, 1})
backgroundGradientTexture:SetAllPoints()
bookmarkFrame.HoverOverBackground = {.6, .6, .6, .2}
bookmarkFrame.hoverOverTexture = bookmarkFrame:CreateTexture(nil, "border")
bookmarkFrame.hoverOverTexture:SetTexture(unpack(bookmarkFrame.HoverOverBackground))
bookmarkFrame.hoverOverTexture:SetSize(130, 18)
bookmarkFrame.hoverOverTexture:Hide()
local icon_size = 16
local text_color = {.9, .9, .9, 1}
---------------------------------------------------------------------------------------------------------------------------