From Garry's Mod
Jump to: navigation, search
 GM:HUDPaint( )


Called whenever the HUD should be drawn. Called right before GM:HUDDrawScoreBoard and after GM:HUDPaintBackground.

Not called when the Camera SWEP is equipped. See also GM:DrawOverlay.

NOTE Only be called when r_drawvgui is enabled and the game is not paused
NOTE This is a rendering hook with a 2D rendering context.
This means that the only rendering functions will work in it are functions with a 2D rendering context.



Draws a transparent black box in the top left corner of the screen.

hook.Add("HUDPaint", "HUDPaint_DrawABox", function()
	surface.SetDrawColor( 0, 0, 0, 128 )
	surface.DrawRect( 0, 0, 128, 128 )
end )

Personal tools