feat(announcement_menu): add theme-aware outer border color for loader style

introduce OuterCol() function to dynamically determine the outer border color based on the announcement theme configuration (white or blue). update the loader style border to use this function instead of hardcoded white color, allowing theme consistency across the announcement menu.
This commit is contained in:
2026-07-20 18:23:49 +02:00
parent f9773bd8ba
commit e794c49c84
@@ -10,6 +10,11 @@ local COL_WHITE = Color(255, 255, 255)
local COL_BG = Color(0, 0, 0, 200) local COL_BG = Color(0, 0, 0, 200)
local COL_TRACK = Color(54, 54, 54, 200) local COL_TRACK = Color(54, 54, 54, 200)
-- couleur des contours extérieurs selon la config ("blue" ou "white")
local function OuterCol()
return (BladW.Announcement.Conf or {}).announcement_theme == "white" and COL_WHITE or COL_ACCENT
end
-- fonts responsives (refaites quand la résolution change) -- fonts responsives (refaites quand la résolution change)
local function AnnScale() local function AnnScale()
return math.min(ScrW() / 1920, ScrH() / 1080) return math.min(ScrW() / 1920, ScrH() / 1080)
@@ -203,9 +208,9 @@ hook.Add("HUDPaint", "BladeWin:Announcement", function()
rndx.Draw(radius, boxX, boxY, boxW, boxH, nil, rndx.SHAPE_FIGMA + rndx.BLUR) rndx.Draw(radius, boxX, boxY, boxW, boxH, nil, rndx.SHAPE_FIGMA + rndx.BLUR)
rndx.Draw(radius, boxX, boxY, boxW, boxH, COL_BG, rndx.SHAPE_FIGMA) rndx.Draw(radius, boxX, boxY, boxW, boxH, COL_BG, rndx.SHAPE_FIGMA)
-- le loader garde son contour blanc (le simple lui a sa jauge sur le bord) -- le loader garde un contour fixe (couleur selon le thème config ; le simple a sa jauge sur le bord)
if style == "loader" then if style == "loader" then
rndx.DrawOutlined(radius, boxX, boxY, boxW, boxH, COL_WHITE, 3 * s, rndx.SHAPE_FIGMA) rndx.DrawOutlined(radius, boxX, boxY, boxW, boxH, OuterCol(), 3 * s, rndx.SHAPE_FIGMA)
end end
-- contenu empilé et centré -- contenu empilé et centré