Garry's Mod Wiki

Garry's Mod Wiki

  DCheckBox:OnChange( boolean bVal )

Description

Called when the "checked" state is changed. This is for Overriding

Arguments

1 boolean bVal
Whether the CheckBox is checked or not.

Example

Creates a metamethod on the DCheckBox class to print any changes to the console.

function DCheckBox:OnChange(bVal) if (bVal) then print("Checked!") else print("Unchecked!") end end
Output: All new checkboxes created will print Checked! or Unchecked! when their checked state is changed.

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 four times a day. Edits and history are not available.

Last Parsed: Loading...