diff --git a/lua/autorun/bladWinRpMenu_loader.lua b/lua/autorun/bladWinRpMenu_loader.lua index aa05d9b..48d505a 100644 --- a/lua/autorun/bladWinRpMenu_loader.lua +++ b/lua/autorun/bladWinRpMenu_loader.lua @@ -3,9 +3,9 @@ -- Fichier : lua/autorun/bladWinRpMenu_loader.lua -- ============================================================ -local MURA = {} +local NoCode = {} -MURA.config = { +NoCode.config = { -- Dossier(s)-module(s) à charger. -- • sans wildcard -> nom exact d'UN dossier : "bladw_announcement" -- • avec wildcard -> glob, charge TOUS ceux qui matchent : @@ -19,10 +19,6 @@ MURA.config = { exclude = { "template.lua", "disabled", "_dev" }, } -if SERVER then - resource.AddSingleFile("resource/fonts/Aurebesh.ttf") -end - -- ============================================================ -- Logs -- ============================================================ @@ -49,7 +45,7 @@ local function StartsWith(str, prefix) end local function IsExcluded(name) - for _, ex in ipairs(MURA.config.exclude) do + for _, ex in ipairs(NoCode.config.exclude) do if name == ex then return true end end return false @@ -115,18 +111,18 @@ local function LoadFile(path) if shouldSend then AddCSLuaFile(path) stats.sent = stats.sent + 1 - if MURA.config.verbose and not shouldLoad then + if NoCode.config.verbose and not shouldLoad then Log(C.info, (" [→] [%s] %s"):format(realm, path)) end end if not shouldLoad then return end - if MURA.config.safe_load then + if NoCode.config.safe_load then local ok, err = pcall(include, path) if ok then stats.loaded = stats.loaded + 1 - if MURA.config.verbose then + if NoCode.config.verbose then Log(C.ok, (" [✓] [%s] %s"):format(realm, path)) end else @@ -137,7 +133,7 @@ local function LoadFile(path) else include(path) stats.loaded = stats.loaded + 1 - if MURA.config.verbose then + if NoCode.config.verbose then Log(C.ok, (" [✓] [%s] %s"):format(realm, path)) end end @@ -164,13 +160,13 @@ local function LoadFolder(dir, depth) local dirs = Merge(dirs1, dirs2) if #files == 0 and #dirs == 0 then - if MURA.config.verbose and depth > 0 then + if NoCode.config.verbose and depth > 0 then Log(C.warn, (" [!] Dossier vide ou introuvable : %s"):format(dir)) end return end - if MURA.config.verbose and depth > 0 then + if NoCode.config.verbose and depth > 0 then Log(C.dim, string.rep(" ", depth) .. "📂 " .. basename .. "/") end @@ -209,7 +205,7 @@ local function SendFolder(dir) local path = dir .. "/" .. fname AddCSLuaFile(path) stats.sent = stats.sent + 1 - if MURA.config.verbose then + if NoCode.config.verbose then Log(C.info, (" [→] [LIB] %s"):format(path)) end end @@ -309,24 +305,24 @@ end Log(C.title, "") Log(C.title, " ╔══════════════════════════════════════╗") -Log(C.title, " ║ MURA — Autoloader ║") +Log(C.title, " ║ NoCode — Autoloader ║") Log(C.title, " ╚══════════════════════════════════════╝") -Log(C.info, " Dossier racine : lua/" .. MURA.config.root) +Log(C.info, " Dossier racine : lua/" .. NoCode.config.root) Log(C.dim, "") -- 1) Expédie les bibliothèques partagées au client (rndx, etc.) -for _, lib in ipairs(MURA.config.libs or {}) do +for _, lib in ipairs(NoCode.config.libs or {}) do SendFolder(lib) end -- 2) Charge chaque module racine correspondant au préfixe -local roots = FindRootFolders(MURA.config.root) +local roots = FindRootFolders(NoCode.config.root) if #roots == 0 then - Log(C.warn, (" [!] Aucun module trouvé pour le préfixe : %s"):format(MURA.config.root)) + Log(C.warn, (" [!] Aucun module trouvé pour le préfixe : %s"):format(NoCode.config.root)) else for _, root in ipairs(roots) do - if MURA.config.verbose then + if NoCode.config.verbose then Log(C.title, " ▶ " .. root) end LoadFolder(root) diff --git a/lua/bladw_announcement/client/cl_menu.lua b/lua/bladw_announcement/client/cl_menu.lua index a183726..307ba67 100644 --- a/lua/bladw_announcement/client/cl_menu.lua +++ b/lua/bladw_announcement/client/cl_menu.lua @@ -1,10 +1,23 @@ local rndx = include("lib/rndx.lua") +local logo = Material("nocode/announcement/logo.png") hook.Add("HUDPaint", "BladeWin:Announcement", function() local ply = LocalPlayer() if not IsValid(ply) then return end - - rndx.Draw(100, 343, 133, 788, 38, Color(30, 30, 30)) - + --[[ + rndx.Draw(14, 788, 38, 343, 133, nil, rndx.SHAPE_FIGMA + rndx.BLUR) + rndx.Draw(14, 788, 38, 343, 133, Color(0,0,0, 200), rndx.SHAPE_FIGMA) + rndx.DrawOutlined(14, 788, 38, 343, 133, Color(255, 255, 255), 3, rndx.SHAPE_FIGMA) + rndx.DrawMaterial(0, 910, 20, 100, 100, color_white, logo) + draw.SimpleText("Annonce", "bladw_text", 960, 113, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) + draw.SimpleText("Lorem ipsum dolor sit amet, consectetur.", "bladw_text_Medium", 960, 140, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) + ]] + rndx.Draw(14, 788, 38, 343, 133, nil, rndx.SHAPE_FIGMA + rndx.BLUR) + rndx.Draw(14, 788, 38, 343, 133, Color(0,0,0, 200), rndx.SHAPE_FIGMA) + rndx.DrawOutlined(14, 788, 38, 343, 133, Color(255, 255, 255), 3, rndx.SHAPE_FIGMA) + rndx.DrawMaterial(0, 788, 20, 100, 100, color_white, logo) + draw.SimpleText("Annonce", "bladw_text", 960, 113, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) + draw.SimpleText("Lorem ipsum dolor sit amet, consectetur.", "bladw_text_Medium", 960, 140, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) + rndx.Draw(14, 900, 40, 200, 15, color_white, rndx.SHAPE_FIGMA) end) \ No newline at end of file diff --git a/materials/nocode/announcement/logo.png b/materials/nocode/announcement/logo.png new file mode 100644 index 0000000..44f9c0c Binary files /dev/null and b/materials/nocode/announcement/logo.png differ