Another round of polishing and few aditions

- Added bar texture "Skyline Compact".
- Tooltip show 8 spells, up from 6.
- Breakdown color scheme improved.
- Backend changes.
This commit is contained in:
Tercio Jose
2024-03-08 14:03:34 -03:00
parent c1e1191c07
commit acc03f4769
12 changed files with 61 additions and 15 deletions
+6
View File
@@ -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
+3 -1
View File
@@ -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]])
+8 -2
View File
@@ -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
+16 -3
View File
@@ -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
+2 -1
View File
@@ -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
@@ -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)
@@ -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
@@ -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
@@ -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
+1
View File
@@ -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},
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

+2
View File
@@ -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()