mirror of
https://github.com/CFC-Servers/cfc_spawn_protection.git
synced 2025-03-04 03:13:14 -05:00
Style spawn protection to be more hl2ish (#39)
This commit is contained in:
parent
1db5ab5c23
commit
a2c4bb853f
@ -1,21 +1,24 @@
|
||||
local textColor = Color( 0, 100, 255 )
|
||||
local outlineColor = color_black
|
||||
local textColor = Color( 255, 235, 20, 255 )
|
||||
local boxColor = Color( 0, 0, 0, 76 )
|
||||
local TEXT_ALIGN_CENTER = TEXT_ALIGN_CENTER
|
||||
|
||||
local scrw = ScrW()
|
||||
local scrh = ScrH()
|
||||
|
||||
surface.CreateFont( "SpawnProtection", {
|
||||
font = "Roboto",
|
||||
font = "Verdana",
|
||||
size = ScreenScale( 15 ),
|
||||
weight = 600,
|
||||
weight = 400,
|
||||
} )
|
||||
|
||||
local text = "Spawn protection enabled"
|
||||
|
||||
local function drawNotice()
|
||||
local active = LocalPlayer():GetNWBool( "HasSpawnProtection", false )
|
||||
if not active then return end
|
||||
|
||||
draw.SimpleTextOutlined( "Spawn protection enabled", "SpawnProtection", scrw * 0.5, scrh * 0.9, textColor, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, outlineColor )
|
||||
draw.RoundedBox( 10, scrw * 0.355, scrh * 0.9, scrw * 0.29, scrh * 0.075, boxColor )
|
||||
draw.SimpleText( text, "SpawnProtection", scrw * 0.5, scrh * 0.936, textColor, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
|
||||
end
|
||||
|
||||
hook.Add( "HUDPaint", "DrawSpawnProtection", drawNotice )
|
||||
|
Loading…
Reference in New Issue
Block a user