feat(admin_menu): add theme-based outer border color configuration

Introduce OuterCol() function to dynamically set the outer border color based on the announcement_theme configuration. The border will be white when theme is set to "white", otherwise it defaults to the accent color. This allows for better visual customization of the admin menu appearance.
This commit is contained in:
2026-07-20 18:23:44 +02:00
parent 082ff3eedd
commit f9773bd8ba
@@ -16,6 +16,11 @@ local COL_MUTED = Color(160, 160, 160)
local COL_WARN = Color(255, 200, 50) local COL_WARN = Color(255, 200, 50)
local COL_LINE = Color(255, 255, 255, 60) local COL_LINE = Color(255, 255, 255, 60)
-- couleur des contours extérieurs selon la config ("blue" ou "white")
local function OuterCol()
return (BladW.Announcement.Conf or {}).announcement_theme == "white" and COL_TEXT or COL_ACCENT
end
-- nb de caractères d'un champ (UTF-8, un accent = 1) -- nb de caractères d'un champ (UTF-8, un accent = 1)
local function EntryLen(entry) local function EntryLen(entry)
local v = entry:GetValue() local v = entry:GetValue()
@@ -89,7 +94,7 @@ local function OpenAAdminMenu()
frame.Paint = function(self, w, h) frame.Paint = function(self, w, h)
rndx.Draw(20, 0, 0, w, h, nil, rndx.SHAPE_FIGMA + rndx.BLUR) rndx.Draw(20, 0, 0, w, h, nil, rndx.SHAPE_FIGMA + rndx.BLUR)
rndx.Draw(20, 0, 0, w, h, COL_BG, rndx.SHAPE_FIGMA) rndx.Draw(20, 0, 0, w, h, COL_BG, rndx.SHAPE_FIGMA)
rndx.DrawOutlined(20, 0, 0, w, h, COL_TEXT, 3, rndx.SHAPE_FIGMA) rndx.DrawOutlined(20, 0, 0, w, h, OuterCol(), 3, rndx.SHAPE_FIGMA)
rndx.DrawMaterial(0, w * 0.5 - 30, 20, 60, 60, COL_TEXT, logo) rndx.DrawMaterial(0, w * 0.5 - 30, 20, 60, 60, COL_TEXT, logo)
draw.SimpleText("Envoyer une annonce", "bladw_text", w * 0.5, 94, COL_TEXT, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) draw.SimpleText("Envoyer une annonce", "bladw_text", w * 0.5, 94, COL_TEXT, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)