feat(announcement): add logo asset and update menu
- add materials/nocode/announcement/logo.png - update cl_menu.lua and bladWinRpMenu_loader.lua Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
6cc464b145
commit
307ba0975d
3 files changed
+32
-23
No files matched your search
@@ -3,9 +3,9 @@
|
|||||||
-- Fichier : lua/autorun/bladWinRpMenu_loader.lua
|
-- Fichier : lua/autorun/bladWinRpMenu_loader.lua
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
|
|
||||||
local MURA = {}
|
local NoCode = {}
|
||||||
|
|
||||||
MURA.config = {
|
NoCode.config = {
|
||||||
-- Dossier(s)-module(s) à charger.
|
-- Dossier(s)-module(s) à charger.
|
||||||
-- • sans wildcard -> nom exact d'UN dossier : "bladw_announcement"
|
-- • sans wildcard -> nom exact d'UN dossier : "bladw_announcement"
|
||||||
-- • avec wildcard -> glob, charge TOUS ceux qui matchent :
|
-- • avec wildcard -> glob, charge TOUS ceux qui matchent :
|
||||||
@@ -19,10 +19,6 @@ MURA.config = {
|
|||||||
exclude = { "template.lua", "disabled", "_dev" },
|
exclude = { "template.lua", "disabled", "_dev" },
|
||||||
}
|
}
|
||||||
|
|
||||||
if SERVER then
|
|
||||||
resource.AddSingleFile("resource/fonts/Aurebesh.ttf")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
-- Logs
|
-- Logs
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
@@ -49,7 +45,7 @@ local function StartsWith(str, prefix)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function IsExcluded(name)
|
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
|
if name == ex then return true end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
@@ -115,18 +111,18 @@ local function LoadFile(path)
|
|||||||
if shouldSend then
|
if shouldSend then
|
||||||
AddCSLuaFile(path)
|
AddCSLuaFile(path)
|
||||||
stats.sent = stats.sent + 1
|
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))
|
Log(C.info, (" [→] [%s] %s"):format(realm, path))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not shouldLoad then return 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)
|
local ok, err = pcall(include, path)
|
||||||
if ok then
|
if ok then
|
||||||
stats.loaded = stats.loaded + 1
|
stats.loaded = stats.loaded + 1
|
||||||
if MURA.config.verbose then
|
if NoCode.config.verbose then
|
||||||
Log(C.ok, (" [✓] [%s] %s"):format(realm, path))
|
Log(C.ok, (" [✓] [%s] %s"):format(realm, path))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -137,7 +133,7 @@ local function LoadFile(path)
|
|||||||
else
|
else
|
||||||
include(path)
|
include(path)
|
||||||
stats.loaded = stats.loaded + 1
|
stats.loaded = stats.loaded + 1
|
||||||
if MURA.config.verbose then
|
if NoCode.config.verbose then
|
||||||
Log(C.ok, (" [✓] [%s] %s"):format(realm, path))
|
Log(C.ok, (" [✓] [%s] %s"):format(realm, path))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -164,13 +160,13 @@ local function LoadFolder(dir, depth)
|
|||||||
local dirs = Merge(dirs1, dirs2)
|
local dirs = Merge(dirs1, dirs2)
|
||||||
|
|
||||||
if #files == 0 and #dirs == 0 then
|
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))
|
Log(C.warn, (" [!] Dossier vide ou introuvable : %s"):format(dir))
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if MURA.config.verbose and depth > 0 then
|
if NoCode.config.verbose and depth > 0 then
|
||||||
Log(C.dim, string.rep(" ", depth) .. "📂 " .. basename .. "/")
|
Log(C.dim, string.rep(" ", depth) .. "📂 " .. basename .. "/")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -209,7 +205,7 @@ local function SendFolder(dir)
|
|||||||
local path = dir .. "/" .. fname
|
local path = dir .. "/" .. fname
|
||||||
AddCSLuaFile(path)
|
AddCSLuaFile(path)
|
||||||
stats.sent = stats.sent + 1
|
stats.sent = stats.sent + 1
|
||||||
if MURA.config.verbose then
|
if NoCode.config.verbose then
|
||||||
Log(C.info, (" [→] [LIB] %s"):format(path))
|
Log(C.info, (" [→] [LIB] %s"):format(path))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -309,24 +305,24 @@ end
|
|||||||
|
|
||||||
Log(C.title, "")
|
Log(C.title, "")
|
||||||
Log(C.title, " ╔══════════════════════════════════════╗")
|
Log(C.title, " ╔══════════════════════════════════════╗")
|
||||||
Log(C.title, " ║ MURA — Autoloader ║")
|
Log(C.title, " ║ NoCode — Autoloader ║")
|
||||||
Log(C.title, " ╚══════════════════════════════════════╝")
|
Log(C.title, " ╚══════════════════════════════════════╝")
|
||||||
Log(C.info, " Dossier racine : lua/" .. MURA.config.root)
|
Log(C.info, " Dossier racine : lua/" .. NoCode.config.root)
|
||||||
Log(C.dim, "")
|
Log(C.dim, "")
|
||||||
|
|
||||||
-- 1) Expédie les bibliothèques partagées au client (rndx, etc.)
|
-- 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)
|
SendFolder(lib)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 2) Charge chaque module racine correspondant au préfixe
|
-- 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
|
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
|
else
|
||||||
for _, root in ipairs(roots) do
|
for _, root in ipairs(roots) do
|
||||||
if MURA.config.verbose then
|
if NoCode.config.verbose then
|
||||||
Log(C.title, " ▶ " .. root)
|
Log(C.title, " ▶ " .. root)
|
||||||
end
|
end
|
||||||
LoadFolder(root)
|
LoadFolder(root)
|
||||||
|
|||||||
@@ -1,10 +1,23 @@
|
|||||||
local rndx = include("lib/rndx.lua")
|
local rndx = include("lib/rndx.lua")
|
||||||
|
local logo = Material("nocode/announcement/logo.png")
|
||||||
|
|
||||||
hook.Add("HUDPaint", "BladeWin:Announcement", function()
|
hook.Add("HUDPaint", "BladeWin:Announcement", function()
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if not IsValid(ply) then return end
|
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)
|
end)
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 164 KiB |
Reference in new issue
Block a user