wiremod-svn-archive/wire/lua/entities/gmod_wire_button/cl_init.lua
tad2020 f4759aef8f fixed small bug with my Increment/Decrement gate
added that flashing thing that gmod buttons do
2007-05-16 04:37:10 +00:00

28 lines
633 B
Lua

include('shared.lua')
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_OPAQUE
/*---------------------------------------------------------
Name: DrawTranslucent
Desc: Draw translucent
---------------------------------------------------------*/
function ENT:DrawTranslucent()
if ( LocalPlayer():GetEyeTrace().Entity == self.Entity && EyePos():Distance( self.Entity:GetPos() ) < 512 ) then
if ( self:IsOn() ) then
self:DrawEntityOutline( 1.05 + math.sin( CurTime() * 60 ) * 0.05 )
else
self:DrawEntityOutline( 1.0 )
end
end
self:Draw()
end