DgsSwitchButtonGetState: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==Syntax== <syntaxhighlight lang="lua"> bool dgsSwitchButtonGetState( element switchButton ) </syntaxhighlight> ===Required Arguments=== *'''switchButton:''' Switch you wa...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Revision as of 14:36, 22 April 2020
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)