DgsSwitchButtonGetState
Jump to navigation
Jump to search
Syntax
bool dgsSwitchButtonGetState( element switchButton )
Required Arguments
- switchButton: Switch you want to get the state from.
Returns
Returns a bool of the Switch Button.
Example
DGS = exports.dgs button = DGS:dgsCreateSwitchButton( 0.7, 0.1, 0.2, 0.1, "On", "Off", true, true ) addEventHandler ( "onDgsMouseClickDown", button, function() outputChatBox ( "The switch turns "..(DGS:dgsSwitchButtonGetState(source) and "on" or "off")) end)