Garry's Mod Wiki

GM:PostDrawHUD

  GM:PostDrawHUD()

Description

Called after GM:PreDrawHUD, GM:HUDPaintBackground and GM:HUDPaint but before GM:DrawOverlay.

Unlike GM:HUDPaint(Background) hooks, this will still be called when the main menu is visible. And so will be GM:PreDrawHUD

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("PostDrawHUD", "PostDrawHUD_DrawABox", function() surface.SetDrawColor( 0, 0, 0, 128 ) surface.DrawRect( 50, 50, 128, 128 ) end )