Garry's Mod Wiki

Revision Difference

GM:PostDrawHUD#526493

<function name="PostDrawHUD" parent="GM" type="hook"> <ishook>yes</ishook> <description> Called after <page>GM:PreDrawHUD</page>, <page>GM:HUDPaintBackground</page> and <page>GM:HUDPaint</page> but before <page>GM:DrawOverlay</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.</description>⤶ <code>⤶ hook.Add("PostDrawHUD", "PostDrawHUD_DrawABox", function()⤶ surface.SetDrawColor( 0, 0, 0, 128 )⤶ surface.DrawRect( 50, 50, 128, 128 )⤶ end )⤶ </code>⤶ ⤶ </example>