Revision Difference
GM:HUDPaint#511148
<function name="HUDPaint" parent="GM" type="hook">⤶
<ishook>yes</ishook>⤶
<description>⤶
Called whenever the HUD should be drawn. Called right before <page>GM:HUDDrawScoreBoard</page> and after <page>GM:HUDPaintBackground</page>.⤶
⤶
Not called when the Camera SWEP is equipped. See also <page>GM:DrawOverlay</page>.⤶
⤶
<note>Only be called when r_drawvgui is enabled and the game is not paused</note>⤶
<rendercontext hook="true" type="2D"/>⤶
</description>⤶
<realm>Client</realm>⤶
<predicted>No</predicted>⤶
</function>⤶
⤶
<example>⤶
<description>Draws a transparent black box in the top left corner of the screen.</description>⤶
<code>⤶
hook.Add("HUDPaint", "HUDPaint_DrawABox", function()⤶
surface.SetDrawColor( 0, 0, 0, 128 )⤶
surface.DrawRect( 50, 50, 128, 128 )⤶
end )⤶
</code>⤶
⤶
</example>