From bad49954517607dce145d94c9417c4e92a4492f8 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 11 May 2023 15:02:57 -0300 Subject: [PATCH] Fixed reported bugs on the new breakdown window --- Definitions.lua | 15 ++- boot.lua | 4 +- classes/class_damage.lua | 34 +---- frames/window_playerbreakdown.lua | 6 + frames/window_playerbreakdown_auras.lua | 51 ++++---- frames/window_playerbreakdown_spells.lua | 152 ++++++++++++++++++----- functions/profiles.lua | 7 +- startup.lua | 4 +- 8 files changed, 177 insertions(+), 96 deletions(-) diff --git a/Definitions.lua b/Definitions.lua index d07a62cd0..9d354bdbd 100644 --- a/Definitions.lua +++ b/Definitions.lua @@ -358,7 +358,8 @@ ---@class spellcontainer : table ---@field GetSpell fun(container: spellcontainer, spellId: number) get a spell by its id ----@field ListActors fun(container: spellcontainer) : pairs usage: for spellId, spelltable in container:ListActors() do +---@field ListActors fun(container: spellcontainer) : any, any usage: for spellId, spelltable in container:ListActors() do +---@field ListSpells fun(container: spellcontainer) : any, any usage: for spellId, spelltable in container:ListActors() do ---@field _ActorTable table ---@class spelltable : table @@ -614,10 +615,14 @@ ---@field SpellBlockFrame breakdownspellblockframe ---@class breakdownspellblockframe : frame container for the spellblocks in the breakdown window ----@field SpellBlocks breakdownspellblock[] ----@field UpdateBlocks fun(self: breakdownspellblockframe) ----@field ClearBlocks fun(self: breakdownspellblockframe) ----@field GetBlock fun(self: breakdownspellblockframe, index: number) : breakdownspellblock +---@field SpellBlocks breakdownspellblock[] array of spellblocks +---@field blocksInUse number number of blocks currently in use +---@field UpdateBlocks fun(self: breakdownspellblockframe) update the blocks +---@field ClearBlocks fun(self: breakdownspellblockframe) clear all blocks +---@field GetBlock fun(self: breakdownspellblockframe, index: number) : breakdownspellblock return the block at the index +---@field GetBlocksInUse fun(self: breakdownspellblockframe) : number return the number of blocks currently in use +---@field GetBlocksAmount fun(self: breakdownspellblockframe) : number return the total blocks created +---@field ShowEmptyBlock fun(self: breakdownspellblockframe, index: number) show the empty block ---@class breakdownspellblock : statusbar breakdownspellblock object which is created inside the breakdownspellblockframe ---@field Lines breakdownspellblockline[] diff --git a/boot.lua b/boot.lua index d10496063..a8932a25a 100644 --- a/boot.lua +++ b/boot.lua @@ -15,8 +15,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - Details.build_counter = 11001 - Details.alpha_build_counter = 11001 --if this is higher than the regular counter, use it instead + Details.build_counter = 11004 + Details.alpha_build_counter = 11004 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter diff --git a/classes/class_damage.lua b/classes/class_damage.lua index 78cfeacc0..c03bfbe84 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -103,39 +103,7 @@ } --damage mixin - local damageClassMixin = { - ---check which data is shown in the instance and call a function to build the data for a broker - ---@param actor actor - ---@param instance instance - BuildSpellDetails = function(actor, instance, spellId) - local mainSection, subSection = instance:GetDisplay() - local combatObject = instance:GetCombat() - if (subSection == 1 or subSection == 2) then - return actor:BuildSpellDamageDoneDetails(instance, combatObject, spellId) - - elseif (subSection == 3) then - return self:MontaDetalhesDamageTaken (spellid, barra, instancia) - - elseif (subSection == 4) then - return self:MontaDetalhesFriendlyFire (spellid, barra, instancia) - - elseif (subSection == 6) then - if (bitBand(self.flag_original, 0x00000400) ~= 0) then --� um jogador - return self:MontaDetalhesDamageDone (spellid, barra, instancia) - end - return self:MontaDetalhesEnemy (spellid, barra, instancia) - end - end, - - } - - ---prepare data to send to a broker to show details about a spell - ---@param actor actor - ---@param combat combat - ---@param spellId number - damageClassMixin.BuildSpellDamageDoneDetails = function(actor, combat, spellId) - - end + local damageClassMixin = {} ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --exported functions diff --git a/frames/window_playerbreakdown.lua b/frames/window_playerbreakdown.lua index 021f2f835..66c9925c6 100644 --- a/frames/window_playerbreakdown.lua +++ b/frames/window_playerbreakdown.lua @@ -33,6 +33,12 @@ local PLAYER_DETAILS_STATUSBAR_ALPHA = 1 Details.player_details_tabs = {} breakdownWindow.currentTabsInUse = {} +Details222.BreakdownWindow.BackdropSettings = { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {DetailsFramework:GetDefaultBackdropColor()}, + backdropbordercolor = {0, 0, 0, 0.7}, +} + ------------------------------------------------------------------------------------------------------------------------------ --self = instancia --jogador = classe_damage ou classe_heal diff --git a/frames/window_playerbreakdown_auras.lua b/frames/window_playerbreakdown_auras.lua index 204551f66..71bc70b8b 100644 --- a/frames/window_playerbreakdown_auras.lua +++ b/frames/window_playerbreakdown_auras.lua @@ -221,37 +221,44 @@ local auras_tab_create = function(tab, frame) end local auras_tab_fill = function(tab, player, combat) + ---@type actor local miscActor = combat:GetActor(4, player:name()) + ---@type number local combatTime = combat:GetCombatTime() - do --buffs - local newAuraTable = {} - if (miscActor and miscActor.buff_uptime_spells) then - for spellID, spellObject in pairs(miscActor.buff_uptime_spells._ActorTable) do - local spellName, _, spellIcon = GetSpellInfo(spellID) - if (not spellObject.uptime) then - --print(_GetSpellInfo(spellID)) - --dumpt(spellObject) + if (miscActor) then + do --buffs + local newAuraTable = {} + local spellContainer = miscActor:GetSpellContainer("buff") + if (spellContainer) then + for spellId, spellTable in spellContainer:ListSpells() do + local spellName, _, spellIcon = GetSpellInfo(spellId) + if (not spellTable.uptime) then + --print(_GetSpellInfo(spellID)) + --dumpt(spellObject) + end + local uptime = spellTable.uptime or 0 + table.insert(newAuraTable, {spellIcon, spellName, uptime, spellTable.appliedamt, spellTable.refreshamt, uptime / combatTime * 100, spellID = spellId}) end - table.insert(newAuraTable, {spellIcon, spellName, spellObject.uptime, spellObject.appliedamt, spellObject.refreshamt, spellObject.uptime/combatTime*100, spellID = spellID}) end + table.sort(newAuraTable, Details.Sort3) + tab.BuffScroll:SetData(newAuraTable) + tab.BuffScroll:Refresh() end - table.sort (newAuraTable, Details.Sort3) - tab.BuffScroll:SetData (newAuraTable) - tab.BuffScroll:Refresh() - end - do --debuffs - local newAuraTable = {} - if (miscActor and miscActor.debuff_uptime_spells) then - for spellID, spellObject in pairs(miscActor.debuff_uptime_spells._ActorTable) do - local spellName, _, spellIcon = GetSpellInfo(spellID) - table.insert(newAuraTable, {spellIcon, spellName, spellObject.uptime, spellObject.appliedamt, spellObject.refreshamt, spellObject.uptime/combatTime*100, spellID = spellID}) + do --debuffs + local newAuraTable = {} + local spellContainer = miscActor:GetSpellContainer("debuff") + if (spellContainer) then + for spellId, spellTable in spellContainer:ListSpells() do + local spellName, _, spellIcon = GetSpellInfo(spellId) + table.insert(newAuraTable, {spellIcon, spellName, spellTable.uptime, spellTable.appliedamt, spellTable.refreshamt, spellTable.uptime / combatTime * 100, spellID = spellId}) + end end + table.sort(newAuraTable, Details.Sort3) + tab.DebuffScroll:SetData(newAuraTable) + tab.DebuffScroll:Refresh() end - table.sort (newAuraTable, Details.Sort3) - tab.DebuffScroll:SetData (newAuraTable) - tab.DebuffScroll:Refresh() end end diff --git a/frames/window_playerbreakdown_spells.lua b/frames/window_playerbreakdown_spells.lua index 45e8f446d..dd893ff02 100644 --- a/frames/window_playerbreakdown_spells.lua +++ b/frames/window_playerbreakdown_spells.lua @@ -63,6 +63,24 @@ function spellsTab.GetInstance() return spellsTab.instance or Details:GetActiveWindowFromBreakdownWindow() end +---set the backdrop of scrollframe and container following the settings of the breakdown window +---@param containerFrame frame +---@param scrollFrame frame|nil +function spellsTab.ApplyStandardBackdrop(containerFrame, scrollFrame) + C_Timer.After(0, function() + containerFrame:SetBackdrop(Details222.BreakdownWindow.BackdropSettings.backdrop) + containerFrame:SetBackdropColor(unpack(Details222.BreakdownWindow.BackdropSettings.backdropcolor)) + containerFrame:SetBackdropBorderColor(unpack(Details222.BreakdownWindow.BackdropSettings.backdropbordercolor)) + + if (scrollFrame) then + scrollFrame:SetBackdrop({}) + if (scrollFrame["__background"]) then + scrollFrame["__background"]:Hide() + end + end + end) +end + ---return the breakdownspellscrollframe object, there's only one of this in the breakdown window ---@return breakdownspellscrollframe function spellsTab.GetSpellScrollFrame() @@ -651,12 +669,20 @@ local onEnterSpellBar = function(spellBar, motion) --parei aqui: precisa por nom summaryBlock:SetValue(50) summaryBlock:SetValue(100) - if (mainAttribute == DETAILS_ATTRIBUTE_DAMAGE) then --this should run within the damage class ~damage + if (mainAttribute == DETAILS_ATTRIBUTE_DAMAGE) then --bounce to damage class to handle the spell details if (subAttribute == 1 or subAttribute == 2 or subAttribute == 6) then Details.atributo_damage:BuildSpellDetails(spellBar, spellBlockContainer, blockIndex, summaryBlock, spellId, elapsedTime, actorName, spellTable, trinketData, combatObject) end + --need to know how many blocks the damage class used + local blocksInUse = spellBlockContainer:GetBlocksInUse() + local maxBlocks = spellBlockContainer:GetBlocksAmount() + + for i = blocksInUse + 1, math.min(maxBlocks, 4) do --in the current state of the breakdown, showing 5 will overlap with the phase container + spellBlockContainer:ShowEmptyBlock(i) + end + elseif (mainAttribute == DETAILS_ATTRIBUTE_HEAL) then --this should run within the heal class ~healing ---@type number local totalHits = spellTable.counter @@ -897,12 +923,7 @@ function spellsTab.CreateSpellBlock(spellBlockContainer, index) --~breakdownspel spellBlock:SetValue(100) --set the backdrop to have a 8x8 edge file - spellBlock:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1}) - - local backgroundTexture = spellBlock:CreateTexture("$parentBackground", "artwork") - backgroundTexture:SetColorTexture(1, 1, 1, 1) - backgroundTexture:SetAllPoints() - spellBlock.backgroundTexture = backgroundTexture + spellsTab.ApplyStandardBackdrop(spellBlock) --create the lines which will host the texts spellBlock.Lines = {} @@ -946,6 +967,7 @@ function spellsTab.CreateSpellBlock(spellBlockContainer, index) --~breakdownspel local gradientDown = DetailsFramework:CreateTexture(spellBlock, {gradient = "vertical", fromColor = {0, 0, 0, 0.1}, toColor = "transparent"}, 1, spellBlock:GetHeight(), "background", {0, 1, 0, 1}) gradientDown:SetPoint("bottoms") spellBlock.gradientTexture = gradientDown + spellBlock.gradientTexture:Hide() return spellBlock end @@ -983,8 +1005,6 @@ local spellBlockContainerMixin = { spellBlock.gradientTexture:SetHeight(blockHeight) spellBlock:SetBackdropBorderColor(unpack(borderColor)) --border color - spellBlock.backgroundTexture:SetVertexColor(unpack(backgroundColor)) --background color - spellBlock.statusBarTexture:SetVertexColor(unpack(Details.breakdown_spell_tab.blockspell_color)) --bar color --update the lines @@ -1005,13 +1025,18 @@ local spellBlockContainerMixin = { ---@param self breakdownspellblockframe ClearBlocks = function(self) - for i = 1, #self.SpellBlocks do + for i = 1, self:GetBlocksAmount() do ---@type breakdownspellblock local spellBlock = self.SpellBlocks[i] spellBlock:Hide() spellBlock:SetColor(unpack(CONST_SPELLBLOCK_DEFAULT_COLOR)) + --set the status bar value to zero + spellBlock:SetValue(0) + spellBlock.statusBarTexture:Show() + spellBlock.sparkTexture:Show() + --clear the text shown in their lines for o = 1, 3 do spellBlock.Lines[o].leftText:SetText("") @@ -1026,6 +1051,23 @@ local spellBlockContainerMixin = { spellBlock.Lines[o].rightText:SetText("") end end + + for i = 1, math.min(self:GetBlocksAmount(), 4) do + self:ShowEmptyBlock(i) + end + + self.blocksInUse = 0 + end, + + ---show the empty block in the container, this is done to preview where the rectangle will be + ---@param self breakdownspellblockframe + ---@param index number + ShowEmptyBlock = function(self, index) + local spellBlock = self.SpellBlocks[index] + spellBlock:Show() + spellBlock:SetValue(0) + spellBlock.statusBarTexture:Hide() + spellBlock.sparkTexture:Hide() end, ---get a breakdownspellblock from the container @@ -1033,8 +1075,26 @@ local spellBlockContainerMixin = { ---@param index number ---@return breakdownspellblock GetBlock = function(self, index) + self.blocksInUse = self.blocksInUse + 1 + local spellBlock = self.SpellBlocks[index] + spellBlock.statusBarTexture:Show() + spellBlock.sparkTexture:Show() return self.SpellBlocks[index] end, + + ---get the amount of blocks in use + ---@param self breakdownspellblockframe + ---@return number + GetBlocksInUse = function(self) + return self.blocksInUse + end, + + ---get the total blocks created + ---@param self breakdownspellblockframe + ---@return number + GetBlocksAmount = function(self) + return #self.SpellBlocks + end, } ---create the spell blocks which shows the critical hits, normal hits, etc @@ -1116,6 +1176,7 @@ function spellsTab.CreateSpellBlockContainer(tabFrame) --~create ~createblock ~s container:RegisterChildForDrag(spellBlockFrame) spellBlockFrame.SpellBlocks = {} + spellBlockFrame.blocksInUse = 0 --create the spell blocks within the spellBlockFrame for i = 1, spellBlockContainerSettings.amount do @@ -1151,6 +1212,8 @@ local getTargetBar = function(scrollFrame, lineIndex) --reset header alignment targetBar:ResetFramesToHeaderAlignment() + spellsTab.UpdateBarSettings(targetBar) + --reset columns, hiding them targetBar.Icon:Hide() for inLineIndex = 1, #targetBar.InLineTexts do @@ -1324,12 +1387,12 @@ function spellsTab.CreatePhaseBar(self, index) --~create ~createphase ~phasebar --size and positioning phaseBar:SetHeight(CONST_SPELLSCROLL_LINEHEIGHT) local y = (index-1) * CONST_SPELLSCROLL_LINEHEIGHT * -1 + (1 * -index) - 15 - phaseBar:SetPoint("topleft", self, "topleft", 0, y) - phaseBar:SetPoint("topright", self, "topright", 0, y) + phaseBar:SetPoint("topleft", self, "topleft", 1, y) + phaseBar:SetPoint("topright", self, "topright", -1, y) phaseBar:EnableMouse(true) - phaseBar:SetAlpha(0.9) + phaseBar:SetAlpha(0.823) phaseBar:SetFrameStrata("HIGH") phaseBar:SetScript("OnEnter", nil) phaseBar:SetScript("OnLeave", nil) @@ -1426,6 +1489,8 @@ local getPhaseBar = function(scrollFrame, lineIndex) --reset header alignment phaseBar:ResetFramesToHeaderAlignment() + spellsTab.UpdateBarSettings(phaseBar) + --reset columns, hiding them phaseBar.Icon:Hide() for inLineIndex = 1, #phaseBar.InLineTexts do @@ -1638,6 +1703,8 @@ function spellsTab.CreatePhasesContainer(tabFrame) --~phase ~createphasecontaine tabFrame.PhaseScrollFrame = phaseScrollFrame spellsTab.PhaseScrollFrame = phaseScrollFrame + spellsTab.ApplyStandardBackdrop(container, phaseScrollFrame) + function phaseScrollFrame:RefreshMe() --~refreshme (phases) ~refreshmep --get the value of the top 1 ranking spell ---@type actor @@ -1736,6 +1803,9 @@ function spellsTab.CreatePhasesContainer(tabFrame) --~phase ~createphasecontaine reziser_width = 2, reziser_color = {.5, .5, .5, 0.7}, reziser_max_width = 246, + + header_backdrop_color = {0.1, 0.1, 0.1, 0.4}, + text_color = {1, 1, 1, 0.823}, } ---@type df_headerframe @@ -1942,6 +2012,9 @@ function spellsTab.CreateGenericContainer(tabFrame) --~create ~generic ~createge reziser_width = 2, reziser_color = {.5, .5, .5, 0.7}, reziser_max_width = 246, + + header_backdrop_color = {0.1, 0.1, 0.1, 0.4}, + text_color = {1, 1, 1, 0.823}, } ---@type df_headerframe @@ -2026,6 +2099,8 @@ function spellsTab.CreateTargetContainer(tabFrame) --~create ~target ~createtarg tabFrame.TargetScrollFrame = targetScrollFrame spellsTab.TargetScrollFrame = targetScrollFrame + spellsTab.ApplyStandardBackdrop(container, targetScrollFrame) + ---@param data breakdowntargettablelist function targetScrollFrame:RefreshMe(data) --~refreshme (targets) ~refreshmet --get which column is currently selected and the sort order @@ -2068,6 +2143,9 @@ function spellsTab.CreateTargetContainer(tabFrame) --~create ~target ~createtarg reziser_width = 2, reziser_color = {.5, .5, .5, 0.7}, reziser_max_width = 246, + + header_backdrop_color = {0.1, 0.1, 0.1, 0.4}, + text_color = {1, 1, 1, 0.823}, } ---@type df_headerframe @@ -2386,6 +2464,8 @@ local getSpellBar = function(scrollFrame, lineIndex) --reset header alignment spellBar:ResetFramesToHeaderAlignment() + spellsTab.UpdateBarSettings(spellBar) + --reset columns, hiding them spellBar.spellIcon:Hide() spellBar.expandButton:Hide() @@ -2502,7 +2582,7 @@ end ---creates a scrollframe which show breakdownspellbar to show the spells used by an actor ---@param tabFrame tabframe ---@return breakdownspellscrollframe -function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create ~spell ~container +function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create ~spell ~container ~createspellcontainer ---@type width local width = Details.breakdown_spell_tab.spellcontainer_width ---@type height @@ -2553,7 +2633,6 @@ function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create ~spell ---@type breakdownspellscrollframe local scrollFrame = DF:CreateScrollBox(container, "$parentSpellScroll", refreshSpellsFunc, {}, width, height, defaultAmountOfLines, CONST_SPELLSCROLL_LINEHEIGHT) DF:ReskinSlider(scrollFrame) - scrollFrame:SetBackdrop({}) scrollFrame:SetPoint("topleft", container, "topleft", 0, 0) --need to set the points scrollFrame:SetPoint("bottomright", container, "bottomright", 0, 0) --need to set the points @@ -2563,6 +2642,8 @@ function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create ~spell tabFrame.SpellScrollFrame = scrollFrame spellsTab.SpellScrollFrame = scrollFrame + spellsTab.ApplyStandardBackdrop(container, scrollFrame) + --~header local headerOptions = { padding = 2, @@ -2574,6 +2655,9 @@ function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create ~spell reziser_max_width = 246, header_click_callback = onColumnHeaderClickCallback, + + header_backdrop_color = {0.1, 0.1, 0.1, 0.4}, + text_color = {1, 1, 1, 0.823}, } local headerTable = {} @@ -2833,12 +2917,11 @@ function spellsTab.CreateTargetBar(self, index) --~create ~target ~createtarget --size and positioning targetBar:SetHeight(CONST_SPELLSCROLL_LINEHEIGHT) local y = (index-1) * CONST_SPELLSCROLL_LINEHEIGHT * -1 + (1 * -index) - 15 - targetBar:SetPoint("topleft", self, "topleft", 0, y) - targetBar:SetPoint("topright", self, "topright", 0, y) - + targetBar:SetPoint("topleft", self, "topleft", 1, y) + targetBar:SetPoint("topright", self, "topright", -1, y) targetBar:EnableMouse(true) - targetBar:SetAlpha(0.9) + targetBar:SetAlpha(0.823) targetBar:SetFrameStrata("HIGH") targetBar:SetScript("OnEnter", onEnterBreakdownTargetBar) targetBar:SetScript("OnLeave", onLeaveBreakdownTargetBar) @@ -2904,11 +2987,21 @@ function spellsTab.CreateTargetBar(self, index) --~create ~target ~createtarget return targetBar end + +function spellsTab.UpdateBarSettings(bar) + if (bar.statusBar) then + bar.statusBar:SetAlpha(Details.breakdown_spell_tab.statusbar_alpha) --could be moved to when the bar is updated + bar.statusBar:GetStatusBarTexture():SetTexture(Details.breakdown_spell_tab.statusbar_texture) + bar.statusBar.backgroundTexture:SetColorTexture(unpack(Details.breakdown_spell_tab.statusbar_background_color)) + bar.statusBar.backgroundTexture:SetAlpha(Details.breakdown_spell_tab.statusbar_background_alpha) + end +end + ---create a spellbar within the spell scroll ---@param self breakdownspellscrollframe ---@param index number ---@return breakdownspellbar -function spellsTab.CreateSpellBar(self, index) --~spellbar ~spellline ~spell ~create ~createline ~createspell +function spellsTab.CreateSpellBar(self, index) --~spellbar ~spellline ~spell ~create ~createline ~createspell ~createspellbar ---@type breakdownspellbar local spellBar = CreateFrame("button", self:GetName() .. "SpellBarButton" .. index, self) spellBar.index = index @@ -2916,12 +3009,12 @@ function spellsTab.CreateSpellBar(self, index) --~spellbar ~spellline ~spell ~cr --size and positioning spellBar:SetHeight(CONST_SPELLSCROLL_LINEHEIGHT) local y = (index-1) * CONST_SPELLSCROLL_LINEHEIGHT * -1 + (1 * -index) - 15 - spellBar:SetPoint("topleft", self, "topleft", 0, y) - spellBar:SetPoint("topright", self, "topright", 0, y) + spellBar:SetPoint("topleft", self, "topleft", 1, y) + spellBar:SetPoint("topright", self, "topright", -1, y) spellBar:EnableMouse(true) spellBar:RegisterForClicks("AnyUp", "AnyDown") - spellBar:SetAlpha(0.9) + spellBar:SetAlpha(0.823) spellBar:SetFrameStrata("HIGH") spellBar:SetScript("OnEnter", onEnterSpellBar) spellBar:SetScript("OnLeave", onLeaveSpellBar) @@ -2944,10 +3037,14 @@ function spellsTab.CreateSpellBar(self, index) --~spellbar ~spellline ~spell ~cr ---@type texture this is the statusbar texture local statusBarTexture = statusBar:CreateTexture("$parentTexture", "artwork") - statusBarTexture:SetTexture(SharedMedia:Fetch("statusbar", "Details Hyanda")) statusBar:SetStatusBarTexture(statusBarTexture) statusBar:SetStatusBarColor(1, 1, 1, 1) + ---@type texture background texture + local backgroundTexture = statusBar:CreateTexture("$parentTextureBackground", "border") + backgroundTexture:SetAllPoints() + statusBar.backgroundTexture = backgroundTexture + ---@type texture overlay texture to use when the spellbar is selected local statusBarOverlayTexture = statusBar:CreateTexture("$parentTextureOverlay", "overlay", nil, 7) statusBarOverlayTexture:SetTexture([[Interface/AddOns/Details/images/overlay_indicator_1]]) @@ -2963,13 +3060,6 @@ function spellsTab.CreateSpellBar(self, index) --~spellbar ~spellline ~spell ~cr hightlightTexture:SetAllPoints() statusBar.highlightTexture = hightlightTexture - ---@type texture background texture - local backgroundTexture = statusBar:CreateTexture("$parentTextureBackground", "border") - backgroundTexture:SetAllPoints() - backgroundTexture:SetColorTexture(.05, .05, .05) - backgroundTexture:SetAlpha(1) - statusBar.backgroundTexture = backgroundTexture - --button to expand the bar when there's spells merged ---@type breakdownexpandbutton local expandButton = CreateFrame("button", "$parentExpandButton", spellBar, "BackdropTemplate") diff --git a/functions/profiles.lua b/functions/profiles.lua index 28b917d08..e64d6e47f 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1408,13 +1408,18 @@ local default_global_data = { }, }, ---/run wipe(Details.breakdown_spell_tab) .genericcontainer_headers +--/run Details.breakdown_spell_tab.statusbar_alpha = 0.823 --breakdown spell tab breakdown_spell_tab = { blockcontainer_width = 430, blockcontainer_height = 270, blockcontainer_islocked = true, + statusbar_background_color = {.15, .15, .15}, + statusbar_background_alpha = 0.7, + statusbar_texture = [[Interface\AddOns\Details\images\bar_skyline]], + statusbar_alpha = 0.70, + blockspell_height = 67, blockspell_padding = 5, blockspell_color = {0, 0, 0, 0.7}, diff --git a/startup.lua b/startup.lua index d8bed5503..29df6bc3b 100644 --- a/startup.lua +++ b/startup.lua @@ -79,8 +79,6 @@ function Details:StartMeUp() Details:InitializePlaterIntegrationWindow() Details:InitializeMacrosWindow() - Details.InitializeSpellBreakdownTab() - if (Details.ocd_tracker.show_options) then Details:InitializeCDTrackerWindow() end @@ -597,6 +595,8 @@ function Details:StartMeUp() _G["UpdateAddOnMemoryUsage"] = Details.UpdateAddOnMemoryUsage_Custom end + Details.InitializeSpellBreakdownTab() + pcall(Details222.EJCache.MakeCache) pcall(Details222.ClassCache.MakeCache)