Revision Difference
GM:HUDPaintBackground#529791
<function name="HUDPaintBackground" parent="GM" type="hook">
<ishook>yes</ishook>
<description>
Called before <page>GM:HUDPaint</page> when the HUD background is being drawn.
⤶
⤶
Things rendered in this hook will **always** appear behind things rendered in <page>GM:HUDPaint</page>.⤶
⤶
Things rendered in this hook will **always** appear behind things rendered in <page>GM:HUDPaint</page>.⤶
<rendercontext hook="true" type="2D"></rendercontext>
</description>
<realm>Client</realm>
<predicted>No</predicted>
</function>
⤶
⤶
⤶
<example>⤶
<description>Draws a transparent black box in the top left corner of the screen, behind all other HUD elements.</description>⤶
<code>⤶
hook.Add( "HUDPaintBackground", "HUDPaintBackground_DrawABox", function()⤶
surface.SetDrawColor( 0, 0, 0, 128 )⤶
surface.DrawRect( 50, 50, 128, 128 )⤶
end )⤶
</code>⤶
⤶
</example>