Garry's Mod Wiki

GM:DrawOverlay

  GM:DrawOverlay()

Description

Called after all other 2D draw hooks are called. Draws over all VGUI Panels and HUDs.

Unlike GM:HUDPaint, this hook is called with the game paused and while the Camera SWEP is equipped.

Only gets called when r_drawvgui is enabled.
This is a rendering hook which provides a 2d rendering context.

Example

Draws a simple box in top left corner that will be visible even when the main menu is open.

hook.Add("DrawOverlay", "DrawOverlayExample", function() draw.RoundedBox( 4, 50, 50, 100, 100, Color( 255, 255, 255 ) ) end )