Class: MG::Widget
Overview
directly but use a subclass instead.
Properties collapse
-
#enabled? ⇒ Boolean
Whether the widget is enabled.
-
#highlighted? ⇒ Boolean
Whether the widget is highlighted.
-
#touch_enabled? ⇒ Boolean
Whether the widget is touch enabled.
Attributes inherited from Node
#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #visible?, #z_index
Events collapse
-
#on_touch {|Symbol| ... } ⇒ Widget
Configures a block to be called when a touch event is received on the widget.
Methods inherited from Node
#add, #children, #clear, #delete, #delete_from_parent, #intersects?, #parent, #run_action, #stop_action, #stop_all_actions
Instance Attribute Details
#enabled? ⇒ Boolean
Whether the widget is enabled. When enabled, a widget can be touched or clicked. By default, a widget is enabled.
1156 1157 1158 |
# File 'doc/API_reference.rb', line 1156
def enabled?
@enabled?
end
|
#highlighted? ⇒ Boolean
Whether the widget is highlighted. By default, a widget is not highlighted.
1165 1166 1167 |
# File 'doc/API_reference.rb', line 1165
def highlighted?
@highlighted?
end
|
#touch_enabled? ⇒ Boolean
Whether the widget is touch enabled. When touch enabled, a widget supports on_touch. By default, a widget is not touch enabled.
1161 1162 1163 |
# File 'doc/API_reference.rb', line 1161
def touch_enabled?
@touch_enabled?
end
|
Instance Method Details
#on_touch {|Symbol| ... } ⇒ Widget
Configures a block to be called when a touch event is received on the widget.
1176 |
# File 'doc/API_reference.rb', line 1176 def on_touch; end |