diff --git a/Libs/DF/charts.lua b/Libs/DF/charts.lua index e98d2059..6fef0fcb 100644 --- a/Libs/DF/charts.lua +++ b/Libs/DF/charts.lua @@ -740,6 +740,8 @@ local lazyChartUpdate = function(payload, iterationCount, maxIterations) fillLine:SetEndPoint("bottomleft", endX, 0) fillLine:SetDrawLayer("overlay", self.depth) fillLine:SetColorTexture(r, g, b, 0.15 + (self.depth/10)) + + fillLine:Show() end end end @@ -966,6 +968,12 @@ detailsFramework.ChartFrameMixin = { fillLineThickness = fillLineThickness, } + for i = #fillerLines_InUse, 1, -1 do + local line = table.remove(fillerLines_InUse, i) + fillerLines_InAvailable[#fillerLines_InAvailable+1] = line + line:Hide() + end + detailsFramework.Schedules.LazyExecute(lazyChartUpdate, payload) self:ShowBackdropIndicators() diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 665919ed..133622f7 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 562 +local dversion = 563 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) diff --git a/boot.lua b/boot.lua index 02a20523..bd006ad2 100644 --- a/boot.lua +++ b/boot.lua @@ -1240,6 +1240,8 @@ do ---@type table local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") --default bars + SharedMedia:Register("statusbar", "Details Hyanda Reverse", [[Interface\AddOns\Details\images\bar_textures\bar_hyanda_reverse.png]]) + SharedMedia:Register("statusbar", "You Are the Best!", [[Interface\AddOns\Details\images\bar_textures\bar_best.png]]) SharedMedia:Register("statusbar", "Details Hyanda", [[Interface\AddOns\Details\images\bar_hyanda]]) SharedMedia:Register("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]]) diff --git a/core/control.lua b/core/control.lua index b5566a0d..9beb2fa7 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1385,10 +1385,12 @@ if (frame.GetActor) then local actor = frame:GetActor() if (actor) then - local class = actor:Class() - local classColor = RAID_CLASS_COLORS[class] - GameCooltip:SetBackdrop(1, backdrop, classColor, borderColor) - GameCooltip:SetColor(1, 0, 0, 0, 0.7) + local class = actor.classe + if (class) then + local classColor = RAID_CLASS_COLORS[class] + GameCooltip:SetBackdrop(1, backdrop, classColor, borderColor) + GameCooltip:SetColor(1, 0, 0, 0, 0.7) + end end end diff --git a/frames/window_breakdown/breakdown_spells_genericframes.lua b/frames/window_breakdown/breakdown_spells_genericframes.lua index 02dc5b0b..ca78da1e 100644 --- a/frames/window_breakdown/breakdown_spells_genericframes.lua +++ b/frames/window_breakdown/breakdown_spells_genericframes.lua @@ -324,7 +324,7 @@ local createGenericBar = function(self, index) --~create ~generic ~creategeneric ---@type texture this is the statusbar texture local statusBarTexture = statusBar:CreateTexture("$parentTexture", "artwork") - statusBarTexture:SetTexture(SharedMedia:Fetch("statusbar", "Details Hyanda")) + statusBarTexture:SetTexture(SharedMedia:Fetch("statusbar", Details.breakdown_general.bar_texture)) statusBar:SetStatusBarTexture(statusBarTexture) statusBar:SetStatusBarColor(1, 1, 1, 1) diff --git a/frames/window_breakdown/breakdown_spells_phaseframes.lua b/frames/window_breakdown/breakdown_spells_phaseframes.lua index a3619062..9ad50ff2 100644 --- a/frames/window_breakdown/breakdown_spells_phaseframes.lua +++ b/frames/window_breakdown/breakdown_spells_phaseframes.lua @@ -61,7 +61,7 @@ function spellsTab.CreatePhaseBar(self, index) --~create ~createphase ~phasebar ---@type texture this is the statusbar texture local statusBarTexture = statusBar:CreateTexture("$parentTexture", "artwork") - statusBarTexture:SetTexture(SharedMedia:Fetch("statusbar", "Details Hyanda")) + statusBarTexture:SetTexture(SharedMedia:Fetch("statusbar", Details.breakdown_general.bar_texture)) statusBar:SetStatusBarTexture(statusBarTexture) statusBar:SetStatusBarColor(1, 1, 1, 1) diff --git a/frames/window_breakdown/breakdown_spells_spellframes.lua b/frames/window_breakdown/breakdown_spells_spellframes.lua index 5dedd446..961d6d8c 100644 --- a/frames/window_breakdown/breakdown_spells_spellframes.lua +++ b/frames/window_breakdown/breakdown_spells_spellframes.lua @@ -117,19 +117,22 @@ local onEnterSpellTarget = function(targetFrame) ---@type number the top value of targets local topValue = math.max(targets[1] and targets[1][2] or 0, 0.001) - local cooltip = GameCooltip - cooltip:Preset(2) + local gameCooltip = GameCooltip + --cooltip:Preset(2) + Details:FormatCooltipForSpells() + gameCooltip:SetOption("FixedWidth", 260) + gameCooltip:SetOption("YSpacingMod", -8) for targetIndex, targetTable in ipairs(targets) do local targetName = targetTable[1] local value = targetTable[2] - cooltip:AddLine(targetIndex .. ". " .. targetName, Details:Format(value)) - GameCooltip:AddIcon(CONST_TARGET_TEXTURE, 1, 1, 14, 14) + gameCooltip:AddLine(targetIndex .. ". " .. targetName, Details:Format(value)) + gameCooltip:AddIcon(CONST_TARGET_TEXTURE, 1, 1, 20, 20) Details:AddTooltipBackgroundStatusbar(false, value / topValue * 100) end - cooltip:SetOwner(targetFrame) - cooltip:Show() + gameCooltip:SetOwner(targetFrame) + gameCooltip:Show() end local onLeaveSpellTarget = function(self) @@ -1094,7 +1097,13 @@ local updateSpellBar = function(spellBar, index, actorName, combatObject, scroll textIndex = textIndex + 1 elseif (header.name == "uptime") then --need to get the uptime of the spell with the biggest uptime - text:SetText(string.format("%.1f", uptime / combatTime * 100) .. "%") + local uptimePercent = uptime / combatTime * 100 + if (uptimePercent > 0) then + text:SetText(string.format("%.1f", uptime / combatTime * 100) .. "%") + else + text:SetText("") + end + spellBar:AddFrameToHeaderAlignment(text) textIndex = textIndex + 1 diff --git a/frames/window_breakdown/breakdown_spells_targetframes.lua b/frames/window_breakdown/breakdown_spells_targetframes.lua index a432d8f8..86f345ac 100644 --- a/frames/window_breakdown/breakdown_spells_targetframes.lua +++ b/frames/window_breakdown/breakdown_spells_targetframes.lua @@ -560,7 +560,7 @@ function spellsTab.CreateTargetBar(self, index) --~create ~target ~createtarget ---@type texture this is the statusbar texture local statusBarTexture = statusBar:CreateTexture("$parentTexture", "artwork") - statusBarTexture:SetTexture(SharedMedia:Fetch("statusbar", "Details Hyanda")) + statusBarTexture:SetTexture(SharedMedia:Fetch("statusbar", Details.breakdown_general.bar_texture)) statusBar:SetStatusBarTexture(statusBarTexture) statusBar:SetStatusBarColor(1, 1, 1, 1) diff --git a/frames/window_breakdown/window_playerbreakdown.lua b/frames/window_breakdown/window_playerbreakdown.lua index d1fac28f..61eccea0 100644 --- a/frames/window_breakdown/window_playerbreakdown.lua +++ b/frames/window_breakdown/window_playerbreakdown.lua @@ -269,7 +269,7 @@ function Details222.BreakdownWindow.RefreshPlayerScroll() end Details.PlayerBreakdown.RoundedCornerPreset = { - roundness = 6, + roundness = 12, color = {.1, .1, .1, 0.834}, } @@ -799,9 +799,13 @@ function Details:CreateBreakdownWindow() breakdownWindowFrame.SummaryWindowWidgets:Hide() local scaleBar = detailsFramework:CreateScaleBar(breakdownWindowFrame, Details.player_details_window) - scaleBar.label:SetPointOffset(-6, 3) + scaleBar.label:AdjustPointsOffset(-3, 1) + scaleBar.label:SetTextColor(0.8902, 0.7294, 0.0157, 1) + scaleBar.label:SetIgnoreParentAlpha(true) breakdownWindowFrame:SetScale(Details.player_details_window.scale) + --1, 0.8235, 0, 1 - text color of the label of the scale bar | plugins text color: 0.8902, 0.7294, 0.0157, 1 | 0.8902, 0.7294, 0.0157, 1 + --class icon breakdownWindowFrame.classIcon = breakdownWindowFrame:CreateTexture(nil, "overlay", nil, 1) breakdownWindowFrame.classIcon:SetPoint("topleft", breakdownWindowFrame, "topleft", 2, -17) @@ -818,7 +822,7 @@ function Details:CreateBreakdownWindow() --title detailsFramework:NewLabel(breakdownWindowFrame, breakdownWindowFrame, nil, "titleText", Loc ["STRING_PLAYER_DETAILS"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) breakdownWindowFrame.titleText:SetPoint("center", breakdownWindowFrame, "center") - breakdownWindowFrame.titleText:SetPoint("top", breakdownWindowFrame, "top", 0, -3) + breakdownWindowFrame.titleText:SetPoint("top", breakdownWindowFrame, "top", 0, -5) --create the texts shown on the window do @@ -875,7 +879,7 @@ function Details:CreateBreakdownWindow() function breakdownWindowFrame:SetStatusbarText(text, fontSize, fontColor) if (not text) then - breakdownWindowFrame:SetStatusbarText("Details! Damage Meter | Click 'Options' button for settings.", 10, "gray") + breakdownWindowFrame:SetStatusbarText("An AddOn by Terciob | Part of Details! Damage Meter | Click 'Options' button for settings.", 10, "gray") return end statusBar.Text.text = text @@ -884,7 +888,7 @@ function Details:CreateBreakdownWindow() end local rightClickToCloseLabel = Details:CreateRightClickToCloseLabel(statusBar) - rightClickToCloseLabel:SetPoint("right", -332, 4) + rightClickToCloseLabel:SetPoint("right", -283, 3) --set default text breakdownWindowFrame:SetStatusbarText() diff --git a/frames/window_breakdown/window_playerbreakdown_list.lua b/frames/window_breakdown/window_playerbreakdown_list.lua index 3cba8d5e..5b99fc60 100644 --- a/frames/window_breakdown/window_playerbreakdown_list.lua +++ b/frames/window_breakdown/window_playerbreakdown_list.lua @@ -338,6 +338,9 @@ local createPlayerScrollBox = function(breakdownWindowFrame, breakdownSideMenu, totalStatusBar:SetAlpha(0.5) totalStatusBar:SetPoint("bottomleft", specIcon, "bottomright", 0, 0) + local gradientTexture = DetailsFramework:CreateTexture(OTTFrame, {gradient = "horizontal", fromColor = {.1, .1, .1, .634}, toColor = "transparent"}, 100, 1, "border", {0, 1, 0, 1}, "segmentsGradient") + gradientTexture:SetPoint("lefts") + line.specIcon = specIcon line.roleIcon = roleIcon line.playerName = playerName @@ -524,8 +527,12 @@ local createSegmentsScrollBox = function(breakdownWindowFrame, breakdownSideMenu line.segmentText = segmentText line.segmentIcon = segmentIcon + --create a texture gradient in horizontal with the left side starting from black and the right side ending in transparent, the width is 40 and is placed at the left side of the line + local gradientTexture = DetailsFramework:CreateTexture(line, {gradient = "horizontal", fromColor = {.1, .1, .1, .634}, toColor = "transparent"}, 100, 1, "border", {0, 1, 0, 1}, "segmentsGradient") + gradientTexture:SetPoint("lefts") + segmentIcon:SetPoint("left", line, "left", 2, 0) - segmentText:SetPoint("left", segmentIcon.widget, "right", 3, 1) + segmentText:SetPoint("left", segmentIcon.widget, "right", 5, 0) line.UpdateLine = updateSegmentLine @@ -548,7 +555,8 @@ local createSegmentsScrollBox = function(breakdownWindowFrame, breakdownSideMenu breakdownWindowFrame.segmentScrollBox = segmentsScroll --remove the standard backdrop - segmentsScroll:SetBackdrop({}) + segmentsScroll:SetBackdrop(nil) + segmentsScroll.__background:Hide() --create the scrollbox lines for i = 1, scrollbox_lines do diff --git a/frames/window_breakdown/window_playerbreakdown_spells.lua b/frames/window_breakdown/window_playerbreakdown_spells.lua index 89ef5ee4..fbec089b 100644 --- a/frames/window_breakdown/window_playerbreakdown_spells.lua +++ b/frames/window_breakdown/window_playerbreakdown_spells.lua @@ -207,10 +207,10 @@ local spellContainerColumnData = { {name = "persecond", label = "ps", key = "total", width = 50, align = "left", enabled = false, canSort = true, sortKey = "ps", offset = columnOffset, order = "DESC", dataType = "number"}, {name = "percent", label = "%", key = "total", width = 50, align = "left", enabled = true, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, {name = "casts", label = "casts", key = "casts", width = 40, align = "left", enabled = false, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, - {name = "critpercent", label = "crit %", key = "critpercent", width = 40, align = "left", enabled = false, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, - {name = "hits", label = "hits", key = "counter", width = 40, align = "left", enabled = false, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, + {name = "critpercent", label = "crit %", key = "critpercent", width = 40, align = "left", enabled = true, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, + {name = "hits", label = "hits", key = "counter", width = 40, align = "left", enabled = true, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, {name = "castavg", label = "cast avg", key = "castavg", width = 50, align = "left", enabled = false, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, - {name = "uptime", label = "uptime", key = "uptime", width = 45, align = "left", enabled = false, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, + {name = "uptime", label = "uptime", key = "uptime", width = 45, align = "left", enabled = true, canSort = true, offset = columnOffset, order = "DESC", dataType = "number"}, {name = "overheal", label = "overheal", key = "overheal", width = 70, align = "left", enabled = true, canSort = true, order = "DESC", dataType = "number", attribute = DETAILS_ATTRIBUTE_HEAL, offset = columnOffset}, {name = "absorbed", label = "absorbed", key = "healabsorbed", width = 55, align = "left", enabled = false, canSort = true, order = "DESC", dataType = "number", attribute = DETAILS_ATTRIBUTE_HEAL, offset = columnOffset}, } diff --git a/frames/window_breakdown/window_playerbreakdown_spells_options.lua b/frames/window_breakdown/window_playerbreakdown_spells_options.lua index c40fac8e..221e1c9f 100644 --- a/frames/window_breakdown/window_playerbreakdown_spells_options.lua +++ b/frames/window_breakdown/window_playerbreakdown_spells_options.lua @@ -130,7 +130,7 @@ local createOptionsPanel = function() {type = "blank"}, - {type = "label", get = function() return "Spell Header Options" end, text_template = subSectionTitleTextTemplate}, + {type = "label", get = function() return "What to Show" end, text_template = subSectionTitleTextTemplate}, { --per second type = "toggle", get = function() return Details.breakdown_spell_tab.spellcontainer_headers["persecond"].enabled end, diff --git a/frames/window_mythicplus/window_chart.lua b/frames/window_mythicplus/window_chart.lua index 26f481bb..0733af90 100644 --- a/frames/window_mythicplus/window_chart.lua +++ b/frames/window_mythicplus/window_chart.lua @@ -180,16 +180,16 @@ function mythicDungeonCharts.ShowChart() local combatTime = mythicDungeonCharts.ChartTable.ElapsedTime local opacity = 1 - local smoothnessLevel = 50 + --local smoothnessLevel = 50 + --local smoothMethod = "loess" local smoothnessLevel = 20 - local smoothMethod = "loess" local smoothMethod = "sma" local chartSize = #chartData local shrinkBy = 1 - if (chartSize >= 600) then - shrinkBy = math.max(2, math.floor(chartSize/400)) + if (chartSize >= 800) then + shrinkBy = math.max(2, math.floor(chartSize/800)) end local reducedData = chartFrame:ShrinkData(chartData, shrinkBy) diff --git a/frames/window_mythicplus/window_end_of_run.lua b/frames/window_mythicplus/window_end_of_run.lua index 7b797640..b4a7f725 100644 --- a/frames/window_mythicplus/window_end_of_run.lua +++ b/frames/window_mythicplus/window_end_of_run.lua @@ -31,6 +31,8 @@ local mythicDungeonFrames = Details222.MythicPlus.Frames local CONST_DEBUG_MODE = false local LOOT_DEBUG_MODE = false +local readyFrameName = "DetailsMythicDungeonFinishedRunFrame" + --fallback if the class color isn't found local defaultColor = {r = 0.9, g = 0.9, b = 0.9} @@ -41,8 +43,10 @@ local playerBannerSettings = { playername_background_height = 12, playername_fontsize = 12, playername_fontcolor = {1, 1, 1}, - dungeon_texture_width = 32, - dungeon_texture_height = 32, + dungeon_texture_width = 45, + dungeon_texture_height = 45, + loot_square_width = 32, + loot_square_height = 32, loot_square_amount = 2, trans_anim_duration = 0.5, --time that the translation animation takes to move the banner from right to left } @@ -235,8 +239,8 @@ function lootFrame.UpdateUnitLoot(playerBanner) lootSquare.LootItemLevel:SetText(effectiveILvl or "0") --update size - lootSquare.LootIcon:SetSize(playerBannerSettings.dungeon_texture_width, playerBannerSettings.dungeon_texture_height) - lootSquare.LootIconBorder:SetSize(playerBannerSettings.dungeon_texture_width, playerBannerSettings.dungeon_texture_height) + lootSquare.LootIcon:SetSize(playerBannerSettings.loot_square_width, playerBannerSettings.loot_square_height) + lootSquare.LootIconBorder:SetSize(playerBannerSettings.loot_square_width, playerBannerSettings.loot_square_height) lootSquare:Show() @@ -567,15 +571,15 @@ local createPlayerBanner = function(parent, name, index) local levelFontString = levelUpTextFrame:CreateFontString("$parentLVLText", "artwork", "GameFontNormal") levelFontString:SetPoint("bottom", keyStoneDungeonTexture, "bottom", 0, -4) levelFontString:SetTextColor(1, 1, 1) - detailsFramework:SetFontSize(levelFontString, 11) + detailsFramework:SetFontSize(levelFontString, 15) levelFontString:SetText("") playerBanner.LevelFontString = levelFontString local levelFontStringBackgroundTexture = levelUpTextFrame:CreateTexture("$parentItemLevelBackgroundTexture", "artwork", nil, 6) levelFontStringBackgroundTexture:SetTexture([[Interface\Cooldown\LoC-ShadowBG]]) - levelFontStringBackgroundTexture:SetPoint("bottomleft", keyStoneDungeonTexture, "bottomleft", -7, -3) - levelFontStringBackgroundTexture:SetPoint("bottomright", keyStoneDungeonTexture, "bottomright", 7, -15) - levelFontStringBackgroundTexture:SetHeight(10) + levelFontStringBackgroundTexture:SetPoint("bottomleft", keyStoneDungeonTexture, "bottomleft", -10, -3) + levelFontStringBackgroundTexture:SetPoint("bottomright", keyStoneDungeonTexture, "bottomright", 10, -15) + levelFontStringBackgroundTexture:SetHeight(12) levelUpTextFrame.LevelFontStringBackgroundTexture = levelFontStringBackgroundTexture --> animations for levelFontString @@ -742,20 +746,20 @@ local setOrientation = function(readyFrame, mythicDungeonInfo, overallMythicDung local instanceInfo = Details:GetInstanceInfo(mythicDungeonInfo.MapID) or Details:GetInstanceInfo(Details:GetCurrentCombat().mapId) if (orientation == "horizontal") then - readyFrame:SetSize(256, 430) + readyFrame:SetSize(256, 350) if (growDirection == "left") then --when the grow direction if to the left, the readyFrame is anchored to the right side of the ui parent --header texture readyFrame.HeaderTexture:ClearAllPoints() - readyFrame.HeaderTexture:SetPoint("topright", readyFrame, "topright", -7, -36) + readyFrame.HeaderTexture:SetPoint("topright", readyFrame, "topright", -7, 0) readyFrame.HeaderTexture:SetTexCoord(257/512, 1, 234/512, 298/512) readyFrame.HeaderTexture:SetSize(296, 64) readyFrame.AutoCloseTimeBar:SetSize(readyFrame.HeaderTexture:GetWidth(), 25) readyFrame.AutoCloseTimeBar:ClearAllPoints() readyFrame.AutoCloseTimeBar:SetPoint("topright", readyFrame.HeaderTexture, "topright", 0, -22) - readyFrame.AutoCloseTimeBar:SetTimer(40, true) + readyFrame.AutoCloseTimeBar:SetTimer(Details.mythic_plus.autoclose_time, true) readyFrame.AutoCloseTimeBar:SetColor(1, 0.7, 0.0, 0.9) readyFrame.AutoCloseTimeBar:SetDirection("left") readyFrame.AutoCloseTimeBar:SetFrameLevel(readyFrame:GetFrameLevel()+1) @@ -778,7 +782,7 @@ local setOrientation = function(readyFrame, mythicDungeonInfo, overallMythicDung readyFrame.SandTimeIcon:ClearAllPoints() readyFrame.SandTimeIcon:SetSize(buttonSize, buttonSize) --original size is 32x60, need to adjust to the correct size - readyFrame.SandTimeIcon:SetPoint("left", readyFrame.OutOfCombatIcon, "right", 45, 0) + readyFrame.SandTimeIcon:SetPoint("left", readyFrame.OutOfCombatIcon, "right", 40, 0) readyFrame.StrongArmIcon:ClearAllPoints() readyFrame.StrongArmIcon:SetSize(buttonSize, buttonSize) @@ -809,9 +813,9 @@ local setOrientation = function(readyFrame, mythicDungeonInfo, overallMythicDung playerBanner:ClearAllPoints() if (i == 1) then - playerBanner:SetPoint("topright", readyFrame, "topright", -5, -i*playerBanner:GetHeight()) + playerBanner:SetPoint("topright", readyFrame, "topright", -5, -25) else - playerBanner:SetPoint("topright", readyFrame.PlayerBanners[i-1], "bottomright", 0, -10) + playerBanner:SetPoint("topright", readyFrame.PlayerBanners[i-1], "bottomright", 0, -5) end if (instanceInfo) then @@ -838,10 +842,10 @@ local setOrientation = function(readyFrame, mythicDungeonInfo, overallMythicDung --loot squares for j = 1, playerBannerSettings.loot_square_amount do local lootSquare = playerBanner.LootSquares[j] - lootSquare:SetSize(playerBannerSettings.dungeon_texture_width, playerBannerSettings.dungeon_texture_height) + lootSquare:SetSize(playerBannerSettings.loot_square_width, playerBannerSettings.loot_square_height) lootSquare:ClearAllPoints() if (j == 1) then - lootSquare:SetPoint("right", playerBanner.KeyStoneDungeonTexture, "left", -2, 0) + lootSquare:SetPoint("right", playerBanner.KeyStoneDungeonTexture, "left", -7, 0) else lootSquare:SetPoint("right", playerBanner.LootSquares[j-1], "left", -2, 0) end @@ -849,7 +853,8 @@ local setOrientation = function(readyFrame, mythicDungeonInfo, overallMythicDung --role icon playerBanner.RoleIcon:ClearAllPoints() - playerBanner.RoleIcon:SetPoint("center", playerBanner, "left", 4, 0) + --playerBanner.RoleIcon:SetPoint("center", playerBanner, "bottom", 0, 16) + playerBanner.RoleIcon:SetPoint("center", playerBanner, "top", 0, -5) playerBanner.RoleIcon:SetSize(18, 18) playerBanner.RoleIcon:SetAlpha(0.834) end @@ -893,7 +898,7 @@ local updatPlayerBanner = function(unitId, bannerIndex) end if (UnitExists(unitId)) then - local readyFrame = DetailsMythicDungeonReadyFrame + local readyFrame = _G[readyFrameName] local unitName = Details:GetFullName(unitId) local libOpenRaid = LibStub("LibOpenRaid-1.0", true) @@ -964,7 +969,7 @@ local updateKeysStoneLevel = function() --update the player banners local libOpenRaid = LibStub("LibOpenRaid-1.0", true) ---@type details_mplus_endframe - local readyFrame = DetailsMythicDungeonReadyFrame + local readyFrame = _G[readyFrameName] for bannerIndex = 1, #readyFrame.PlayerBanners do local unitBanner = readyFrame.PlayerBanners[bannerIndex] @@ -1045,25 +1050,35 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() local textSize = 11 ---@type details_mplus_endframe - mythicDungeonFrames.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate") + mythicDungeonFrames.ReadyFrame = CreateFrame("frame", readyFrameName, UIParent, "BackdropTemplate") local readyFrame = mythicDungeonFrames.ReadyFrame readyFrame:SetSize(355, 390) - readyFrame:SetPoint("center", UIParent, "center", 350, 0) + readyFrame:SetPoint("right", UIParent, "right", 0, 0) readyFrame:SetFrameStrata("LOW") readyFrame:EnableMouse(true) readyFrame:SetMovable(true) readyFrame:Hide() + local backgroundGradient = readyFrame:CreateTexture("$parentBackgroundGradient", "background", nil, 0) + backgroundGradient:SetTexture([[Interface\AddOns\Details\images\gradient_black_transparent.png]], nil, nil, "TRILINEAR") + backgroundGradient:SetPoint("topleft", readyFrame, "topleft", 0, 0) + backgroundGradient:SetPoint("bottomright", readyFrame, "bottomright", 0, 0) + backgroundGradient:SetWidth(readyFrame:GetWidth()) + ---@type playerbanner[] readyFrame.unitCacheByName = {} do --register to libwindow local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.finished_run_frame) - LibWindow.RestorePosition(readyFrame) + LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.finished_run_panel3) LibWindow.MakeDraggable(readyFrame) - LibWindow.SavePosition(readyFrame) + + if (Details.mythic_plus.finished_run_panel3.point) then + LibWindow.RestorePosition(readyFrame) + else + LibWindow.SavePosition(readyFrame) + end --set to use rounded corner local roundedCornerTemplate = { @@ -1431,7 +1446,8 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() if (not color) then color = HIGHLIGHT_FONT_COLOR end - readyFrame.RantingLabel.text = CHALLENGE_COMPLETE_DUNGEON_SCORE:format(color:WrapTextInColorCode(CHALLENGE_COMPLETE_DUNGEON_SCORE_FORMAT_TEXT:format(Details222.MythicPlus.NewDungeonScore, gainedScore))) + local textToFormat = "%d" + readyFrame.RantingLabel.text = color:WrapText(textToFormat:format(Details222.MythicPlus.NewDungeonScore or 0)) --, gainedScore readyFrame.RantingLabel.textcolor = "limegreen" else readyFrame.RantingLabel.text = "" diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index f821eda4..92c02665 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -7030,6 +7030,20 @@ do name = Loc["STRING_OPTIONS_MPLUS_SHOWENDPANEL"], desc = Loc["STRING_OPTIONS_MPLUS_SHOWENDPANEL"], }, + + {--time to auto hide + type = "range", + get = function() return Details.mythic_plus.autoclose_time end, + set = function(self, fixedparam, value) + Details.mythic_plus.autoclose_time = value + afterUpdate() + end, + min = 20, + max = 300, + step = 1, + name = Loc ["STRING_OPTIONS_MPLUS_AUTO_CLOSE_TIME"], + desc = Loc ["STRING_OPTIONS_MPLUS_AUTO_CLOSE_TIME_DESC"], + }, } sectionFrame.sectionOptions = sectionOptions diff --git a/functions/profiles.lua b/functions/profiles.lua index 12a89f31..542cb371 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1453,12 +1453,14 @@ local default_global_data = { last_mythicrun_chart = {}, mythicrun_chart_frame = {}, mythicrun_chart_frame_minimized = {}, - finished_run_panel = {}, --save window position + finished_run_panel3 = {}, --save window position finished_run_frame_options = { orientation = "horizontal", grow_direction = "left", }, + autoclose_time = 40, + mythicrun_time_type = 1, --1: combat time (the amount of time the player is in combat) 2: run time (the amount of time it took to finish the mythic+ run) }, --implementar esse time_type quando estiver dando refresh na janela @@ -1863,7 +1865,7 @@ function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCod mythicPlusSettings.last_mythicrun_chart = {} mythicPlusSettings.mythicrun_chart_frame = {} mythicPlusSettings.mythicrun_chart_frame_minimized = {} - mythicPlusSettings.finished_run_panel = {} + mythicPlusSettings.finished_run_panel3 = {} --make the max amount of segments be 25 Details.segments_amount = 25 diff --git a/images/gradient_black_transparent.png b/images/gradient_black_transparent.png new file mode 100644 index 00000000..9951ccfc Binary files /dev/null and b/images/gradient_black_transparent.png differ