Garry's Mod Wiki

Garry's Mod Wiki

  boolean DisableClipping( boolean disable )

Description

Sets whether rendering should be limited to being inside a panel or not. Needs to be used inside one of the 2d rendering hooks

See also Panel:NoClipping.

Arguments

1 boolean disable
Whether or not clipping should be disabled

Returns

1 boolean oldState
Whether the clipping was enabled or not before this function call

Example

Renders a white box outside of the panel

function PANEL:Paint() local old = DisableClipping( true ) draw.RoundedBox( 0, -50, -50, 25, 25, color_white ) DisableClipping( old ) end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...