Draw the stats window with art 1.12 actually ships

Neither texture it asked for exists on this client, and ClassicAPI ships no
art of its own. UI-DialogBox-Background-Dark is a later addition -- 1.12 has
only the un-suffixed UI-DialogBox-Background -- and ItemSocketingFrame is TBC,
so the featured emotes' border was cropped out of a sheet whose folder isn't
there at all.

UI-Quickslot2 is the obvious stand-in for that border, but its hole is ~55% of
the texture, so a 70px emote needs a 128px ring and runs into the title above
and the caption below. It is a small backdrop frame instead, styled like the
autocomplete popup, which keeps the 86/70 sizing. The emote moves onto that
frame to draw above the backdrop; topSentTex/topSeenTex keep their names, so
the animator still finds them.
This commit is contained in:
Brues
2026-09-14 14:05:29 -05:00
parent bea278e730
commit 6348b85740
+16 -8
View File
@@ -49,8 +49,13 @@ local WIN_H = 516
local FALLBACK_TEX = "Interface\\AddOns\\TwitchEmotes\\Emotes\\1337.tga"
local BORDER_TEX = "Interface\\ItemSocketingFrame\\UI-EngineeringSockets"
local BORDER = { left = 0.015625, right = 0.6875, top = 0.41210938, bottom = 0.49609375 }
-- Same panel styling as the autocomplete popup.
local FEATURED_BACKDROP = {
bgFile = "Interface\\Buttons\\WHITE8X8",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 8, edgeSize = 8,
insets = { left = 3, right = 3, top = 3, bottom = 3 },
}
local sentKeys = {}
local seenKeys = {}
@@ -184,15 +189,18 @@ local function makeFeatured(f, label, centerX)
title:SetPoint("CENTER", f, "TOPLEFT", centerX, -52)
title:SetText(label)
local border = f:CreateTexture(nil, "ARTWORK")
border:SetTexture(BORDER_TEX)
-- a frame rather than a texture, so the emote can sit on its OVERLAY layer
-- above the backdrop
local border = CreateFrame("Frame", nil, f)
border:SetSize(86, 86)
border:SetTexCoord(BORDER.left, BORDER.right, BORDER.top, BORDER.bottom)
border:SetPoint("CENTER", f, "TOPLEFT", centerX, -108)
border:SetBackdrop(FEATURED_BACKDROP)
border:SetBackdropColor(0.05, 0.05, 0.05, 0.95)
border:SetBackdropBorderColor(1, 1, 1, 1)
local tex = f:CreateTexture(nil, "OVERLAY")
local tex = border:CreateTexture(nil, "OVERLAY")
tex:SetSize(70, 70)
tex:SetPoint("CENTER", f, "TOPLEFT", centerX, -108)
tex:SetPoint("CENTER", border, "CENTER", 0, 0)
local cap = f:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
cap:SetPoint("CENTER", f, "TOPLEFT", centerX, -160)
@@ -212,7 +220,7 @@ local function buildWindow()
f:SetScript("OnDragStop", f.StopMovingOrSizing)
f:SetFrameStrata("HIGH")
f:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background-Dark",
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true, tileSize = 32, edgeSize = 32,
insets = { left = 11, right = 12, top = 12, bottom = 11 },