mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
42
lua/sam/menu/tabs/config/server.lua
Normal file
42
lua/sam/menu/tabs/config/server.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
if SAM_LOADED then return end
|
||||
|
||||
local sam = sam
|
||||
local config = sam.config
|
||||
|
||||
config.add_tab("Server", function(parent)
|
||||
local server_body = parent:Add("SAM.ScrollPanel")
|
||||
server_body:Dock(FILL)
|
||||
server_body:LineMargin(0, 6, 0, 0)
|
||||
|
||||
local i = 0
|
||||
server_body:GetCanvas():On("OnChildAdded", function(s, child)
|
||||
i = i + 1
|
||||
child:SetZPos(i)
|
||||
end)
|
||||
|
||||
for k, v in ipairs(sam.config.get_menu_settings()) do
|
||||
local panel = v.func(server_body)
|
||||
if ispanel(panel) then
|
||||
local setting = server_body:Add("SAM.LabelPanel")
|
||||
setting:DockMargin(8, 6, 8, 0)
|
||||
setting:SetLabel(v.title)
|
||||
setting:SetPanel(panel)
|
||||
end
|
||||
|
||||
server_body:Line()
|
||||
end
|
||||
|
||||
return server_body
|
||||
end, function()
|
||||
return LocalPlayer():HasPermission("manage_config")
|
||||
end, 1)
|
||||
Reference in New Issue
Block a user