GM:HUDPaint

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

Description

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

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.

Examples

Example

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
Navigation