diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index ca68c24c3..2fccc5848 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -2658,6 +2658,12 @@ function detailsFramework:SetTemplate(frame, template) frame:HookScript("OnLeave", templateOnLeave) end end + + elseif (frame.SetColorTexture) then + if (template.backdropcolor) then + local r, g, b, a = detailsFramework:ParseColors(template.backdropcolor) + frame:SetColorTexture(r, g, b, a) + end end if (frame.SetIcon) then diff --git a/boot.lua b/boot.lua index 988d3ed27..038b8003c 100644 --- a/boot.lua +++ b/boot.lua @@ -1236,9 +1236,11 @@ do SharedMedia:Register("statusbar", "Details D'ictum (reverse)", [[Interface\AddOns\Details\images\bar4_reverse]]) --flat bars + SharedMedia:Register("statusbar", "Skyline", [[Interface\AddOns\Details\images\bar_skyline]]) + SharedMedia:Register("statusbar", "Details Serenity", [[Interface\AddOns\Details\images\bar_serenity]]) SharedMedia:Register("statusbar", "BantoBar", [[Interface\AddOns\Details\images\BantoBar]]) - SharedMedia:Register("statusbar", "Skyline", [[Interface\AddOns\Details\images\bar_skyline]]) + SharedMedia:Register("statusbar", "Skyline Compact", [[Interface\AddOns\Details\images\bar_textures\bar_skyline_compact.png]]) SharedMedia:Register("statusbar", "WorldState Score", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]]) SharedMedia:Register("statusbar", "DGround", [[Interface\AddOns\Details\images\bar_background]]) SharedMedia:Register("statusbar", "Details Flat", [[Interface\AddOns\Details\images\bar_background]]) diff --git a/classes/class_damage.lua b/classes/class_damage.lua index a486388fa..af46390a5 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -3891,6 +3891,7 @@ function damageClass:ToolTip_DamageDone (instancia, numero, barra, keydown) if (ActorDamage == 0) then ActorDamage = 0.00000001 end + local ActorSkillsContainer = self.spells._ActorTable local ActorSkillsSortTable = {} @@ -3959,6 +3960,11 @@ function damageClass:ToolTip_DamageDone (instancia, numero, barra, keydown) --Details:AddTooltipHeaderStatusbar (r, g, b, barAlha) end + GameCooltip:SetOption("AlignAsBlizzTooltip", false) + GameCooltip:SetOption("AlignAsBlizzTooltipFrameHeightOffset", -6) + GameCooltip:SetOption("YSpacingMod", -6) + local iconSize = Details.DefaultTooltipIconSize + local topAbility = ActorSkillsSortTable [1] and ActorSkillsSortTable [1][2] or 0.0001 if (#ActorSkillsSortTable > 0) then @@ -3992,7 +3998,7 @@ function damageClass:ToolTip_DamageDone (instancia, numero, barra, keydown) GameCooltip:AddLine(nome_magia, FormatTooltipNumber (_, _math_floor(totalDPS)) .." ("..percent.."%)") end - GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W + 4, icon_size.H + 4, icon_border.L, icon_border.R, icon_border.T, icon_border.B) + GameCooltip:AddIcon (icone_magia, nil, nil, iconSize, iconSize, icon_border.L, icon_border.R, icon_border.T, icon_border.B) Details:AddTooltipBackgroundStatusbar (false, totalDamage/topAbility*100) end else @@ -4015,7 +4021,7 @@ function damageClass:ToolTip_DamageDone (instancia, numero, barra, keydown) if (spellName) then GameCooltip:AddLine(spellName, FormatTooltipNumber (_, damageDone) .. " (" .. _math_floor(damageDone / self.total * 100) .. "%)") Details:AddTooltipBackgroundStatusbar (false, damageDone / self.total * 100) - GameCooltip:AddIcon (spellIcon, 1, 1, icon_size.W, icon_size.H, 0.1, 0.9, 0.1, 0.9) + GameCooltip:AddIcon (spellIcon, 1, 1, iconSize, iconSize, 0.1, 0.9, 0.1, 0.9) end end end diff --git a/core/control.lua b/core/control.lua index 667f53229..fb91b8a12 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1590,10 +1590,10 @@ GameCooltip:SetOption("RightBorderSize", 2) --offset between the right border and the right icon, default: -10 + offset GameCooltip:SetOption("VerticalOffset", 5) --amount of space to leave between the top border and the first line of the tooltip, default: 0 GameCooltip:SetOption("RightTextMargin", 0) --offset between the right text to the right icon, default: -3 - GameCooltip:SetOption("AlignAsBlizzTooltip", true) - GameCooltip:SetOption("AlignAsBlizzTooltipFrameHeightOffset", -8) + GameCooltip:SetOption("AlignAsBlizzTooltip", false) GameCooltip:SetOption("LineHeightSizeOffset", 4) GameCooltip:SetOption("VerticalPadding", -4) + GameCooltip:SetOption("YSpacingMod", -6) GameCooltip:SetBackdrop(1, Details.cooltip_preset2_backdrop, bgColor, borderColor) end @@ -1775,6 +1775,12 @@ self:RefreshMainWindow(true) end + function Details:RefreshAllMainWindowsTemp() + return Details:RefreshMainWindow(-1) + end + + local nextBreakdownUpdateAt = 0 + function Details:RefreshMainWindow(instanceObject, bForceRefresh) --getting deprecated soon if (not instanceObject or type(instanceObject) == "boolean") then bForceRefresh = instanceObject @@ -1813,7 +1819,14 @@ local actorObject = Details:GetActorObjectFromBreakdownWindow() if (actorObject) then if (actorObject and not actorObject.__destroyed) then - return actorObject:MontaInfo() --MontaInfo a nil value + if (nextBreakdownUpdateAt < GetTime()) then + if (Details.in_combat) then + nextBreakdownUpdateAt = GetTime() + 0.5 + else + nextBreakdownUpdateAt = GetTime() + 5 + end + return actorObject:MontaInfo() + end else Details:Msg("Invalid actor object on breakdown window.") if (actorObject.__destroyed) then diff --git a/core/gears.lua b/core/gears.lua index 48a022c55..3e1446e89 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -508,7 +508,8 @@ function _detalhes:RefreshUpdater(suggested_interval) if (specialserials[specialSerial]) then return end --_detalhes.atualizador = _detalhes:ScheduleRepeatingTimer("RefreshMainWindow", updateInterval, -1) - _detalhes.atualizador = Details.Schedules.NewTicker(updateInterval, Details.RefreshMainWindow, Details, -1) + --_detalhes.atualizador = Details.Schedules.NewTicker(updateInterval, Details.RefreshMainWindow, Details, -1) + _detalhes.atualizador = C_Timer.NewTicker(updateInterval, Details.RefreshAllMainWindowsTemp) end ---set the amount of time between each update of all windows diff --git a/frames/window_breakdown/breakdown_spells_spellframes.lua b/frames/window_breakdown/breakdown_spells_spellframes.lua index d9e5f03ff..639f4db36 100644 --- a/frames/window_breakdown/breakdown_spells_spellframes.lua +++ b/frames/window_breakdown/breakdown_spells_spellframes.lua @@ -960,7 +960,7 @@ local updateSpellBar = function(spellBar, index, actorName, combatObject, scroll spellBar.spellId = spellId spellBar.spellIconFrame.spellId = spellId - spellBar.statusBar.backgroundTexture:SetAlpha(Details.breakdown_spell_tab.spellbar_background_alpha) + --spellBar.statusBar.backgroundTexture:SetAlpha(Details.breakdown_spell_tab.spellbar_background_alpha) --statusbar color by school local r, g, b = Details:GetSpellSchoolColor(spellTable.spellschool or 1) diff --git a/frames/window_breakdown/window_playerbreakdown.lua b/frames/window_breakdown/window_playerbreakdown.lua index 8bcad7299..0d18855f8 100644 --- a/frames/window_breakdown/window_playerbreakdown.lua +++ b/frames/window_breakdown/window_playerbreakdown.lua @@ -202,6 +202,16 @@ function Details222.BreakdownWindow.ApplyFontSettings(fontString) detailsFramework:SetFontFace(fontString, Details.breakdown_general.font_face) end +function Details222.BreakdownWindow.ApplyTextureSettings(statusBar) + local textureFile = SharedMedia:Fetch("statusbar", Details.breakdown_general.bar_texture) + local texture = statusBar:GetStatusBarTexture() + if (texture) then + texture:SetTexture(textureFile) + else + statusBar:SetStatusBarTexture(textureFile) + end +end + ------------------------------------------------------------------------------------------------------------------------------ --self = instancia --jogador = classe_damage ou classe_heal diff --git a/frames/window_breakdown/window_playerbreakdown_list.lua b/frames/window_breakdown/window_playerbreakdown_list.lua index 12156401b..018c38a87 100644 --- a/frames/window_breakdown/window_playerbreakdown_list.lua +++ b/frames/window_breakdown/window_playerbreakdown_list.lua @@ -281,6 +281,8 @@ local createPlayerScrollBox = function(breakdownWindowFrame, breakdownSideMenu, Details222.BreakdownWindow.ApplyFontSettings(self.itemLevelText) Details222.BreakdownWindow.ApplyFontSettings(self.percentileText) + Details222.BreakdownWindow.ApplyTextureSettings(self.totalStatusBar) + --set the statusbar local r, g, b = self.playerObject:GetClassColor() self.totalStatusBar:SetStatusBarColor(r, g, b, 1) @@ -364,12 +366,10 @@ local createPlayerScrollBox = function(breakdownWindowFrame, breakdownSideMenu, rankText.textsize = fontSize local totalStatusBar = CreateFrame("statusbar", nil, line) - totalStatusBar:SetSize(scrollbox_size[1]-player_line_height, 4) + totalStatusBar:SetSize(scrollbox_size[1]-player_line_height, player_line_height) totalStatusBar:SetMinMaxValues(0, 100) - totalStatusBar:SetStatusBarTexture([[Interface\AddOns\Details\images\bar_skyline]]) totalStatusBar:SetFrameLevel(line:GetFrameLevel()+1) totalStatusBar:SetAlpha(0.5) - totalStatusBar:SetPoint("bottomleft", specIcon, "bottomright", 0, 0) line.specIcon = specIcon diff --git a/frames/window_breakdown/window_playerbreakdown_spells.lua b/frames/window_breakdown/window_playerbreakdown_spells.lua index cdf507628..4576cc50d 100644 --- a/frames/window_breakdown/window_playerbreakdown_spells.lua +++ b/frames/window_breakdown/window_playerbreakdown_spells.lua @@ -562,7 +562,7 @@ function spellsTab.OnCreateTabCallback(tabButton, tabFrame) --~init --create a button in the breakdown window to open the options for this tab local optionsButton = DF:CreateButton(tabFrame, Details.OpenSpellBreakdownOptions, 130, 18, Loc["STRING_OPTIONS_PLUGINS_OPTIONS"], 14) --optionsButton:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")) - optionsButton:SetPoint("bottomright", tabFrame, "bottomright", -10, -19) + optionsButton:SetPoint("bottomright", tabFrame, "bottomright", -10, -16) optionsButton:SetTemplate("STANDARD_GRAY") optionsButton:SetIcon(Details:GetTextureAtlas("breakdown-icon-optionsbutton")) optionsButton.textsize = 12 @@ -662,9 +662,14 @@ 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) + + --bar.statusBar:GetStatusBarTexture():SetTexture(Details.breakdown_spell_tab.statusbar_texture) + Details222.BreakdownWindow.ApplyTextureSettings(bar.statusBar) + + --bar.statusBar.backgroundTexture:SetColorTexture(unpack(Details.breakdown_spell_tab.statusbar_background_color)) + --bar.statusBar.backgroundTexture:SetAlpha(Details.breakdown_spell_tab.statusbar_background_alpha) + + detailsFramework:SetTemplate(bar.statusBar.backgroundTexture, "STANDARD_GRAY") end end diff --git a/functions/profiles.lua b/functions/profiles.lua index 970164444..3307111c4 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1448,6 +1448,7 @@ local default_global_data = { font_color = {0.9, 0.9, 0.9, 0.923}, font_outline = "NONE", font_face = "DEFAULT", + bar_texture = "Skyline", }, frame_background_color = {0.1215, 0.1176, 0.1294, 0.8}, diff --git a/images/bar_textures/bar_skyline_compact.png b/images/bar_textures/bar_skyline_compact.png new file mode 100644 index 000000000..6e81c18af Binary files /dev/null and b/images/bar_textures/bar_skyline_compact.png differ diff --git a/startup.lua b/startup.lua index 3ea35d465..e80438ef7 100644 --- a/startup.lua +++ b/startup.lua @@ -550,6 +550,8 @@ function Details:StartMeUp() Details.standard_skin = false --enforce to show 6 abilities on the tooltip --_detalhes.tooltip.tooltip_max_abilities = 6 freeeeeedooommmmm + --no no, enforece 8, 8 is much better, 8 is more lines, we like 8 + Details.tooltip.tooltip_max_abilities = 8 Details.InstallRaidInfo()