Add Blizzard theme

Due to how aux loads its frames, the theme currently cannot be toggleable in-game and must be toggled by changing USE_BLIZZARD_THEME in aux-addon.lua
This commit is contained in:
OldManAlpha
2025-06-25 11:27:50 -07:00
parent 5cdf826af6
commit f412bad657
9 changed files with 436 additions and 189 deletions
+12 -14
View File
@@ -10,7 +10,7 @@ local ROW_HEIGHT = 39
function M:render()
if getn(self.item_records or T.empty) > getn(self.rows) then
self.content_frame:SetPoint('BOTTOMRIGHT', -15, 0)
self.content_frame:SetPoint('BOTTOMRIGHT', gui.is_blizzard() and -30 or -15, 0)
else
self.content_frame:SetPoint('BOTTOMRIGHT', 0, 0)
end
@@ -57,18 +57,11 @@ function M.new(parent, on_click, selected)
scroll_frame:SetPoint('TOPLEFT', content_frame, 'TOPLEFT', 0, 29)
scroll_frame:SetPoint('BOTTOMRIGHT', content_frame, 'BOTTOMRIGHT', 0, 0)
local scroll_bar = _G[scroll_frame:GetName() .. 'ScrollBar']
scroll_bar:ClearAllPoints()
scroll_bar:SetPoint('TOPRIGHT', parent, -4, 2)
scroll_bar:SetPoint('BOTTOMRIGHT', parent, -4, 4)
scroll_bar:SetWidth(10)
local thumbTex = scroll_bar:GetThumbTexture()
thumbTex:SetPoint('CENTER', 0, 0)
thumbTex:SetTexture(aux.color.content.background())
thumbTex:SetHeight(150)
thumbTex:SetWidth(scroll_bar:GetWidth())
_G[scroll_bar:GetName() .. 'ScrollUpButton']:Hide()
_G[scroll_bar:GetName() .. 'ScrollDownButton']:Hide()
gui.set_scrollbar_style(scroll_frame, not gui.is_blizzard() and {
{'TOPRIGHT', parent, -4, 2}, {'BOTTOMRIGHT', parent, -4, 4} -- Default
} or {
{'TOPRIGHT', parent, -7, -14}, {'BOTTOMRIGHT', parent, -7, 18} -- Blizzard
})
local rows = T.acquire()
local row_index = 1
@@ -104,7 +97,12 @@ function M.new(parent, on_click, selected)
local highlight = row:CreateTexture()
highlight:SetAllPoints(row)
highlight:Hide()
highlight:SetTexture(1, .9, 0, .4)
if not gui.is_blizzard() then
highlight:SetTexture(1, .9, 0, .4)
else
highlight:SetTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]])
highlight:SetTexCoord(0.1, 0.8, 0, 1)
end
row.highlight = highlight
rows[row_index] = row