WEAPON:DrawWeaponSelection
Description
This hook draws the selection icon in the weapon selection menu.
Arguments
Example
As defined in weapon_base
function SWEP:DrawWeaponSelection( x, y, wide, tall, alpha )
-- Set us up the texture
surface.SetDrawColor( 255, 255, 255, alpha )
surface.SetTexture( self.WepSelectIcon )
-- Lets get a sin wave to make it bounce
local fsin = 0
if ( self.BounceWeaponIcon == true ) then
fsin = math.sin( CurTime() * 10 ) * 5
end
-- Borders
y = y + 10
x = x + 10
wide = wide - 20
-- Draw that mother
surface.DrawTexturedRect( x + (fsin), y - (fsin), wide-fsin*2 , ( wide / 2 ) + (fsin) )
-- Draw weapon info box
self:PrintWeaponInfo( x + wide + 20, y + tall * 0.95, alpha )
end