Garry's Mod Wiki

GM:HUDPaintBackground

GM:HUDPaintBackground

  GM:HUDPaintBackground()

Description

Called before GM:HUDPaint when the HUD background is being drawn.

Just like GM:HUDPaint, this hook will not be called when the main menu is visible. GM:PostDrawHUD does not have this behavior.

Things rendered in this hook will always appear behind things rendered in GM:HUDPaint.

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, behind all other HUD elements.

hook.Add( "HUDPaintBackground", "HUDPaintBackground_DrawABox", function() surface.SetDrawColor( 0, 0, 0, 128 ) surface.DrawRect( 50, 50, 128, 128 ) end )

Special Pages


Wikis

?

Render Time: 60ms

DB GetPage 42
Generate Html 4
SaveChanges (1) 6
Render Body 0
Render Sidebar 6