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:
@@ -10,6 +10,11 @@ local COL_WHITE = Color(255, 255, 255)
|
||||
local COL_BG = Color(0, 0, 0, 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)
|
||||
local function AnnScale()
|
||||
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, 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
|
||||
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
|
||||
|
||||
-- contenu empilé et centré
|
||||
|
||||
Reference in New Issue
Block a user