Garry's Mod Wiki

Garry's Mod Wiki

  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.

Does not get called when r_drawvgui is disabled.

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 )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...