Garry's Mod Wiki

GM:HUDPaint

GM:HUDPaint()

Description

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.

Gets called only when r_drawvgui and CHudGMod are enabled and the game is not paused
This is a rendering hook which provides a 2d rendering context.

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( 50, 50, 128, 128 ) end )

Page Links


Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 3
Generate Html 7
SaveChanges (1) 12
Render Body 0
Render Sidebar 7