Difference between revisions of "UI.Checkbox"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2023.1<br/> '''Class:''' UI<br/> === Description === Creates Checkbox widgets. The widget can be a '''Checkbox''' or a '''Radio''...")
 
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Example ===
+
=== Examples ===
 
'''A Checkbox'''
 
'''A Checkbox'''
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
Line 38: Line 38:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
{{GIDEROS IMPORTANT LINKS}}
+
{{UI}}

Latest revision as of 07:18, 17 October 2023

Available since: Gideros 2023.1
Class: UI

Description

Creates Checkbox widgets. The widget can be a Checkbox or a Radio.

UI.Checkbox.new()

Examples

A Checkbox

local gui = UI.Checkbox.new()
gui:setPosition(50, 50)
stage:addChild(gui)

gui:setTicked(true)
gui:setTristate(true)

function gui:onWidgetChange(w)
	print(w:isTicked(), w:isThird())
end

A Radio

local gui = UI.Radio.new()
gui:setPosition(50, 50)
stage:addChild(gui)

gui:setTicked(true)
gui:setTristate(true)

function gui:onWidgetChange(w)
	print(w:isTicked(), w:isThird())
end