Class: MG::TextField
Instance Attribute Summary collapse
-
#font ⇒ String
Name of the font used by the widget.
-
#font_size ⇒ Integer
Size of the font used by the widget.
-
#horizontal_align ⇒ :left, ...
The horizontal alignment of the text.
-
#placeholder ⇒ String
A placeholder string.
-
#string ⇒ String
A string of TextField.
-
#vertical_align ⇒ :top, ...
The vertical alignment of the text.
Attributes inherited from Node
#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #z_index
Constructors collapse
-
#initialize(placeholder = '', font = '', font_size = 0) ⇒ TextField
constructor
Creates a new Text widget with optional content, font name and size.
Instance Method Summary collapse
-
#on_event {|Symbol| ... } ⇒ self
Configures a block to be called when a slider event is received on the widget.
-
#password_enabled=(value) ⇒ Boolean
Toggle enable password input mode.
-
#password_enabled? ⇒ Boolean
Query whether password is enabled or not.
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(placeholder = '', font = '', font_size = 0) ⇒ TextField
Creates a new Text widget with optional content, font name and size.
1381 |
# File 'doc/API_reference.rb', line 1381 def initialize(placeholder='', font='', font_size=0); end |
Instance Attribute Details
#font ⇒ String
Returns name of the font used by the widget.
1390 1391 1392 |
# File 'doc/API_reference.rb', line 1390 def font @font end |
#font_size ⇒ Integer
Returns size of the font used by the widget.
1393 1394 1395 |
# File 'doc/API_reference.rb', line 1393 def font_size @font_size end |
#horizontal_align ⇒ :left, ...
Returns the horizontal alignment of the text.
1410 1411 1412 |
# File 'doc/API_reference.rb', line 1410 def horizontal_align @horizontal_align end |
#placeholder ⇒ String
Returns a placeholder string.
1387 1388 1389 |
# File 'doc/API_reference.rb', line 1387 def placeholder @placeholder end |
#string ⇒ String
Returns a string of TextField.
1396 1397 1398 |
# File 'doc/API_reference.rb', line 1396 def string @string end |
#vertical_align ⇒ :top, ...
Returns the vertical alignment of the text.
1407 1408 1409 |
# File 'doc/API_reference.rb', line 1407 def vertical_align @vertical_align end |
Instance Method Details
#on_event {|Symbol| ... } ⇒ self
Configures a block to be called when a slider event is received on the widget.
1418 |
# File 'doc/API_reference.rb', line 1418 def on_event; end |
#password_enabled=(value) ⇒ Boolean
Toggle enable password input mode.
1404 |
# File 'doc/API_reference.rb', line 1404 def password_enabled=(value); end |
#password_enabled? ⇒ Boolean
Query whether password is enabled or not.
1400 |
# File 'doc/API_reference.rb', line 1400 def password_enabled?; end |