dobrograd-13-06-2022/garrysmod/addons/feature-wire/lua/wire/stools/digitalscreen.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

30 lines
1.1 KiB
Lua

WireToolSetup.setCategory( "Visuals/Screens" )
WireToolSetup.open( "digitalscreen", "Digital Screen", "gmod_wire_digitalscreen", nil, "Digital Screens" )
if CLIENT then
language.Add( "tool.wire_digitalscreen.name", "Digital Screen Tool (Wire)" )
language.Add( "tool.wire_digitalscreen.desc", "Spawns a digital screen, which can be used to draw pixel by pixel." )
TOOL.Information = { { name = "left", text = "Create/Update " .. TOOL.Name } }
end
WireToolSetup.BaseLang()
WireToolSetup.SetupMax( 20 )
if SERVER then
function TOOL:GetConVars()
return self:GetClientInfo("width"), self:GetClientInfo("height")
end
end
TOOL.ClientConVar = {
model = "models/props_lab/monitor01b.mdl",
width = 32,
height = 32,
createflat = 0,
}
function TOOL.BuildCPanel(panel)
WireDermaExts.ModelSelect(panel, "wire_digitalscreen_model", list.Get( "WireScreenModels" ), 5)
panel:NumSlider("Width", "wire_digitalscreen_width", 1, 512, 0)
panel:NumSlider("Height", "wire_digitalscreen_height", 1, 512, 0)
panel:CheckBox("#Create Flat to Surface", "wire_digitalscreen_createflat")
end