Fixed "Time out of combat" after mythic+ and another round of polishing frames and menus
This commit is contained in:
@@ -263,8 +263,13 @@ Details.PlayerBreakdown.RoundedCornerPreset = {
|
||||
color = {.1, .1, .1, 0.834},
|
||||
}
|
||||
|
||||
function Details:RefreshWindowColor()
|
||||
local colorTable = Details.frame_background_color
|
||||
Details:SetWindowColor(unpack(colorTable))
|
||||
end
|
||||
|
||||
function Details:SetWindowColor(r, g, b, a)
|
||||
--SetColor implemented by rounded corners, does not save the color, by apply
|
||||
--SetColor implemented by rounded corners
|
||||
breakdownWindowFrame:SetColor(r, g, b, a)
|
||||
breakdownSideMenu:SetColor(r, g, b, a)
|
||||
|
||||
@@ -277,6 +282,14 @@ function Details:SetWindowColor(r, g, b, a)
|
||||
DetailsReportWindow:SetColor(r, g, b, a)
|
||||
end
|
||||
|
||||
if (DetailsAllAttributesFrame) then
|
||||
DetailsAllAttributesFrame:SetColor(r, g, b, a)
|
||||
end
|
||||
|
||||
if (DetailsSpellBreakdownOptionsPanel) then
|
||||
DetailsSpellBreakdownOptionsPanel:SetColor(r, g, b, a)
|
||||
end
|
||||
|
||||
local colorTable = Details.frame_background_color
|
||||
colorTable[1] = r
|
||||
colorTable[2] = g
|
||||
|
||||
@@ -525,12 +525,6 @@ local createSegmentsScrollBox = function(breakdownWindowFrame, breakdownSideMenu
|
||||
end
|
||||
end
|
||||
|
||||
--get a Details! window
|
||||
local lowerInstanceId = Details:GetLowerInstanceNumber()
|
||||
local fontFile
|
||||
local fontSize
|
||||
local fontOutline
|
||||
|
||||
--header setup
|
||||
local headerTable = {
|
||||
{text = "Segment Name", width = 100},
|
||||
@@ -539,15 +533,6 @@ local createSegmentsScrollBox = function(breakdownWindowFrame, breakdownSideMenu
|
||||
padding = 2,
|
||||
}
|
||||
|
||||
if (lowerInstanceId) then
|
||||
local instance = Details:GetInstance(lowerInstanceId)
|
||||
if (instance) then
|
||||
fontFile = instance.row_info.font_face
|
||||
fontSize = instance.row_info.font_size
|
||||
fontOutline = instance.row_info.textL_outline
|
||||
end
|
||||
end
|
||||
|
||||
local createSegmentLine = function(self, index)
|
||||
--create a new line
|
||||
local line = CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
|
||||
|
||||
@@ -23,10 +23,17 @@ local createOptionsPanel = function()
|
||||
local optionsFrame = DF:CreateSimplePanel(UIParent, 550, 500, "Details! Breakdown Options", "DetailsSpellBreakdownOptionsPanel")
|
||||
optionsFrame:SetFrameStrata("DIALOG")
|
||||
optionsFrame:SetPoint("topleft", UIParent, "topleft", 2, -40)
|
||||
optionsFrame.Title:SetParent(optionsFrame)
|
||||
optionsFrame.TitleBar:Hide()
|
||||
optionsFrame:Show()
|
||||
|
||||
local bUseSolidColor = true
|
||||
DF:ApplyStandardBackdrop(optionsFrame, bUseSolidColor)
|
||||
--remove the backdrop
|
||||
optionsFrame:SetBackdrop(nil)
|
||||
|
||||
--apply rounded corners with the breakdown window preset
|
||||
DF:AddRoundedCornersToFrame(optionsFrame, Details.PlayerBreakdown.RoundedCornerPreset)
|
||||
|
||||
Details:RefreshWindowColor()
|
||||
|
||||
local resetSettings = function()
|
||||
--overwrite the settings for the spell frame
|
||||
@@ -222,6 +229,7 @@ local createOptionsPanel = function()
|
||||
colorTable[3] = b
|
||||
colorTable[4] = a
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
DetailsAllAttributesFrame:UpdateFontStrings()
|
||||
end,
|
||||
name = "Text Color",
|
||||
desc = "Text Color",
|
||||
@@ -233,6 +241,7 @@ local createOptionsPanel = function()
|
||||
set = function(self, fixedparam, value)
|
||||
Details.breakdown_general.font_size = value
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
DetailsAllAttributesFrame:UpdateFontStrings()
|
||||
end,
|
||||
min = 8,
|
||||
max = 20,
|
||||
@@ -247,6 +256,7 @@ local createOptionsPanel = function()
|
||||
set = function(self, fixedparam, value)
|
||||
Details.breakdown_general.font_outline = value
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
DetailsAllAttributesFrame:UpdateFontStrings()
|
||||
end,
|
||||
name = "Text Outline",
|
||||
desc = "Text Outline",
|
||||
@@ -258,6 +268,7 @@ local createOptionsPanel = function()
|
||||
set = function(self, fixedparam, value)
|
||||
Details.breakdown_general.font_face = value
|
||||
Details:UpdateBreakdownPlayerList()
|
||||
DetailsAllAttributesFrame:UpdateFontStrings()
|
||||
end,
|
||||
name = "Font Face",
|
||||
desc = "Font Face",
|
||||
|
||||
@@ -6031,6 +6031,8 @@ local build_mode_list = function(self, deltaTime)
|
||||
gameCooltip:AddMenu(1, function() instance:SetMode(4) end)
|
||||
gameCooltip:AddIcon([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256*3, 32/256*4, 0, 1)
|
||||
|
||||
gameCooltip:ShowRoundedCorner()
|
||||
|
||||
--build raid plugins list
|
||||
local raidPlugins = Details.RaidTables:GetAvailablePlugins()
|
||||
if (#raidPlugins >= 0) then
|
||||
@@ -6339,6 +6341,8 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
gameCooltip:SetOption("RightTextHeight", 12)
|
||||
gameCooltip:SetOption("SubFollowButton", true)
|
||||
|
||||
gameCooltip:ShowRoundedCorner()
|
||||
|
||||
local menuIndex = 0
|
||||
Details.segments_amount = floor(Details.segments_amount)
|
||||
local amountOfSegments = 0
|
||||
@@ -9042,6 +9046,9 @@ end
|
||||
show_anti_overlap(self.instance, self, "top")
|
||||
|
||||
Details:SetMenuOwner(self, self.instance)
|
||||
|
||||
gameCooltip:ShowRoundedCorner()
|
||||
|
||||
gameCooltip:ShowCooltip()
|
||||
end
|
||||
|
||||
@@ -9197,6 +9204,8 @@ local reportButton_OnEnter = function(self, motion, forced)
|
||||
|
||||
Details:SetTooltipMinWidth()
|
||||
|
||||
GameCooltip:ShowRoundedCorner()
|
||||
|
||||
Details:CheckLastReportsIntegrity()
|
||||
|
||||
local lastPeports = Details.latest_report_table
|
||||
@@ -9300,6 +9309,9 @@ local attributeButton_OnEnter = function(self, motion, forced, from_click)
|
||||
|
||||
GameCooltip:SetOption("TextSize", Details.font_sizes.menus)
|
||||
Details:SetMenuOwner(self, instancia)
|
||||
|
||||
GameCooltip:ShowRoundedCorner()
|
||||
|
||||
GameCooltip:ShowCooltip()
|
||||
end
|
||||
|
||||
|
||||
@@ -478,8 +478,8 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
|
||||
--set to use rounded corner
|
||||
local roundedCornerTemplate = {
|
||||
roundness = 6,
|
||||
color = {.1, .1, .1, 0.98},
|
||||
border_color = {.05, .05, .05, 0.834},
|
||||
color = {.1, .1, .1, 0.5},
|
||||
--border_color = {.05, .05, .05, 0.834},
|
||||
}
|
||||
detailsFramework:AddRoundedCornersToFrame(readyFrame, roundedCornerTemplate)
|
||||
end
|
||||
@@ -867,16 +867,15 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
|
||||
|
||||
readyFrame.StartTextDotAnimation()
|
||||
|
||||
--local mapID = select(8, GetInstanceInfo())
|
||||
|
||||
--fin the overall mythic dungeon combat, starting with the current combat
|
||||
local overallMythicDungeonCombat = Details:GetCurrentCombat()
|
||||
|
||||
--if the latest segment isn't the overall mythic dungeon segment, then find it
|
||||
if (overallMythicDungeonCombat:GetCombatType() ~= DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
|
||||
--get a table with all segments
|
||||
local segments = Details:GetCombatSegments()
|
||||
for i = 1, #segments do
|
||||
local segment = segments[i]
|
||||
local segmentsTable = Details:GetCombatSegments()
|
||||
for i = 1, #segmentsTable do
|
||||
local segment = segmentsTable[i]
|
||||
if (segment:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
|
||||
overallMythicDungeonCombat = segment
|
||||
break
|
||||
@@ -884,6 +883,18 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
|
||||
end
|
||||
end
|
||||
|
||||
--update the run time and time not in combat
|
||||
local elapsedTime = Details222.MythicPlus.time or 1507
|
||||
readyFrame.ElapsedTimeAmountLabel.text = DetailsFramework:IntegerToTimer(elapsedTime)
|
||||
|
||||
if (overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
|
||||
local combatTime = overallMythicDungeonCombat:GetCombatTime()
|
||||
local notInCombat = elapsedTime - combatTime
|
||||
readyFrame.TimeNotInCombatAmountLabel.text = DetailsFramework:IntegerToTimer(notInCombat) .. " (" .. math.floor(notInCombat / elapsedTime * 100) .. "%)"
|
||||
else
|
||||
readyFrame.TimeNotInCombatAmountLabel.text = "Unknown for this run"
|
||||
end
|
||||
|
||||
if (not overallMythicDungeonCombat.is_mythic_dungeon) then
|
||||
return
|
||||
end
|
||||
@@ -892,21 +903,6 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
|
||||
|
||||
wipe(readyFrame.playerCacheByName)
|
||||
|
||||
--update the run time and time not in combat
|
||||
local elapsedTime = Details222.MythicPlus.time or 1507
|
||||
readyFrame.ElapsedTimeAmountLabel.text = DetailsFramework:IntegerToTimer(elapsedTime)
|
||||
|
||||
C_Timer.After(2.5, function()
|
||||
--print("overall combat type:", overallMythicDungeonCombat:GetCombatType(), overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL)
|
||||
if (overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
|
||||
local combatTime = overallMythicDungeonCombat:GetCombatTime()
|
||||
local notInCombat = elapsedTime - combatTime
|
||||
readyFrame.TimeNotInCombatAmountLabel.text = DetailsFramework:IntegerToTimer(notInCombat) .. " (" .. math.floor(notInCombat / elapsedTime * 100) .. "%)"
|
||||
else
|
||||
readyFrame.TimeNotInCombatAmountLabel.text = "Unknown for this run"
|
||||
end
|
||||
end)
|
||||
|
||||
if (Details222.MythicPlus.OnTime) then
|
||||
readyFrame.YouBeatTheTimerLabel:SetFormattedText(CHALLENGE_MODE_COMPLETE_BEAT_TIMER .. " | " .. CHALLENGE_MODE_COMPLETE_KEYSTONE_UPGRADED, Details222.MythicPlus.KeystoneUpgradeLevels) --"You beat the timer!"
|
||||
readyFrame.YouBeatTheTimerLabel.textcolor = "limegreen"
|
||||
|
||||
+49
-30
@@ -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}
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user