Class: MG::CheckBox
Overview
check_box.on_selected { |type| puts “selected!” if type == :selected }
Instance Attribute Summary
Attributes inherited from Node
#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #z_index
Constructors collapse
-
#initialize(background, cross) ⇒ CheckBox
constructor
Creates a new CheckBox widget.
Instance Method Summary collapse
-
#on_selected {|Symbol| ... } ⇒ self
Configures a block to be called when a touch event is received on the widget.
-
#selected=(value) ⇒ Object
Set selected state for checkbox.
-
#selected? ⇒ Boolean
Get selected state of checkbox.
Methods inherited from Widget
#enabled=, #enabled?, #highlighted=, #highlighted?, #on_touch, #touch_enabled=, #touch_enabled?
Methods inherited from Node
#add, #children, #clear, #delete, #delete_from_parent, #intersects?, #number_of_running_actions, #parent, #run_action, #schedule, #schedule_once, #stop_action, #stop_all_actions, #unschedule, #visible=, #visible?
Constructor Details
#initialize(background, cross) ⇒ CheckBox
Creates a new CheckBox widget.
1541 |
# File 'doc/API_reference.rb', line 1541 def initialize(background, cross); end |
Instance Method Details
#on_selected {|Symbol| ... } ⇒ self
Configures a block to be called when a touch event is received on the widget.
1560 |
# File 'doc/API_reference.rb', line 1560 def on_selected; end |
#selected=(value) ⇒ Object
Set selected state for checkbox.
1552 |
# File 'doc/API_reference.rb', line 1552 def selected=(value); end |
#selected? ⇒ Boolean
Get selected state of checkbox.
1548 |
# File 'doc/API_reference.rb', line 1548 def selected?; end |