diff --git a/Libs/DF/charts.lua b/Libs/DF/charts.lua index 3f42a5b6f..8acfa1fa9 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 4ae1367a6..3cf03adca 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 941f31eff..444435b16 100644 --- a/boot.lua +++ b/boot.lua @@ -1221,6 +1221,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]]) @@ -1859,39 +1861,6 @@ function Details:DestroyActor(actorObject, actorContainer, combatObject, callSta actorObject.__destroyedBy = debugstack(callStackDepth or 2, 1, 0) end -local restrictedAddons = { - '!!WWAddOnsFix', -} - -local restrictedAddonFrame = CreateFrame('frame') -restrictedAddonFrame:RegisterEvent('PLAYER_ENTERING_WORLD') - -local function disableRestrictedAddons() - for _, addonName in pairs(restrictedAddons) do - if C_AddOns.GetAddOnEnableState(addonName) ~= 0 then - StaticPopupDialogs["DETAILS_RESTRICTED_ADDON"] = { - text = "You are running " .. addonName .. " which is incompatible with Details! Damage Meter. It must be disabled for Details to function properly.", - button1 = "Disable " .. addonName, - button2 = "Disable Details!", - OnAccept = function() - C_AddOns.DisableAddOn(addonName) - ReloadUI() - end, - OnCancel = function() - C_AddOns.DisableAddOn('Details') - ReloadUI() - end, - timeout = 0, - whileDead = true, - } - StaticPopup_Show("DETAILS_RESTRICTED_ADDON") - break - end - end -end - -restrictedAddonFrame:SetScript('OnEvent', function() C_Timer.After(2, disableRestrictedAddons) end ) - C_Timer.After(5, function() --TutorialPointerFrame_1:HookScript("OnShow", function(self) self:Hide() end) --remove on v11 launch end) diff --git a/core/control.lua b/core/control.lua index 1de4fc857..8fda97787 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 a18dfc7b2..06476fd98 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 0d792fe23..eae1ceb1d 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 8b868e261..8ad76a182 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 ebc33c386..4966cf15e 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 a5a7be807..6f55c5c85 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:AdjustPointsOffset(-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 74eda3239..ccc806c81 100644 --- a/frames/window_breakdown/window_playerbreakdown_list.lua +++ b/frames/window_breakdown/window_playerbreakdown_list.lua @@ -372,6 +372,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 @@ -558,8 +561,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 @@ -582,7 +589,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 782aa263c..334365369 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 c40fac8e0..221e1c9f7 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 1dd1c88d4..7209c0260 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 cc0b10051..c91920d75 100644 --- a/frames/window_mythicplus/window_end_of_run.lua +++ b/frames/window_mythicplus/window_end_of_run.lua @@ -32,6 +32,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} @@ -42,8 +44,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 } @@ -245,8 +249,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() @@ -591,15 +595,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 @@ -773,20 +777,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) @@ -809,7 +813,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) @@ -840,9 +844,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 @@ -869,10 +873,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 @@ -880,7 +884,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 @@ -924,7 +929,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) @@ -995,7 +1000,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] @@ -1079,25 +1084,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 = { @@ -1465,7 +1480,8 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() if (not color) then color = _G["HIGHLIGHT_FONT_COLOR"] end - readyFrame.RantingLabel.text = _G["CHALLENGE_COMPLETE_DUNGEON_SCORE"]:format(color:WrapTextInColorCode(_G["CHALLENGE_COMPLETE_DUNGEON_SCORE_FORMAT_TEXT"]:format(Details222.MythicPlus.NewDungeonScore, gainedScore))) + local textToFormat = "%d" + readyFrame.RantingLabel.text = color:WrapTextInColorCode(textToFormat:format(Details222.MythicPlus.NewDungeonScore or 0)) --, gainedScore readyFrame.RantingLabel.textcolor = "limegreen" else readyFrame.RantingLabel.text = "0000" diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index f236ef5d8..53ed4afe7 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -7026,6 +7026,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 262b14fb7..c571611b9 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1646,12 +1646,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 @@ -2061,7 +2063,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 = {} --max segments allowed Details.segments_amount = 25 diff --git a/images/gradient_black_transparent.png b/images/gradient_black_transparent.png new file mode 100644 index 000000000..9951ccfc1 Binary files /dev/null and b/images/gradient_black_transparent.png differ