Garry's Mod Wiki

Revision Difference

Global.DisableClipping#526346

<function name="DisableClipping" parent="Global" type="libraryfunc"> <description> Sets whether rendering should be limited to being inside a panel or not. See also <page>Panel:NoClipping</page>. </description> <realm>Client and Menu</realm> <args> <arg name="disable" type="boolean">Whether or not clipping should be disabled</arg> </args> <rets> <ret name="oldState" type="boolean" added="2020.02.17"><note>Next update</note>Whether the clipping was enabled or not before this function call</ret> <ret name="oldState" type="boolean" added="2020.03.17">Whether the clipping was enabled or not before this function call</ret> </rets> </function> <example> <description>Renders a white box outside of the panel</description> <code> function PANEL:Paint() DisableClipping(true) draw.RoundedBox(0, -50, -50, 25, 25, color_white) DisableClipping(false) end </code> </example>