Class: MG::Text
Instance Attribute Summary collapse
-
#area_size ⇒ Size
The text rendering area size.
-
#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.
-
#text ⇒ String
Content of the widget.
-
#text_color ⇒ Color
Color of the text part of the widget.
-
#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(text = '', font = '', font_size = 0) ⇒ Text
constructor
Creates a new Text widget with optional content, font name and size.
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(text = '', font = '', font_size = 0) ⇒ Text
Creates a new Text widget with optional content, font name and size.
1345 |
# File 'doc/API_reference.rb', line 1345 def initialize(text='', font='', font_size=0); end |
Instance Attribute Details
#area_size ⇒ Size
Returns the text rendering area size.
1363 1364 1365 |
# File 'doc/API_reference.rb', line 1363 def area_size @area_size end |
#font ⇒ String
Returns name of the font used by the widget.
1357 1358 1359 |
# File 'doc/API_reference.rb', line 1357 def font @font end |
#font_size ⇒ Integer
Returns size of the font used by the widget.
1360 1361 1362 |
# File 'doc/API_reference.rb', line 1360 def font_size @font_size end |
#horizontal_align ⇒ :left, ...
Returns the horizontal alignment of the text.
1369 1370 1371 |
# File 'doc/API_reference.rb', line 1369 def horizontal_align @horizontal_align end |
#text ⇒ String
Returns content of the widget.
1351 1352 1353 |
# File 'doc/API_reference.rb', line 1351 def text @text end |
#text_color ⇒ Color
Returns color of the text part of the widget.
1354 1355 1356 |
# File 'doc/API_reference.rb', line 1354 def text_color @text_color end |
#vertical_align ⇒ :top, ...
Returns the vertical alignment of the text.
1366 1367 1368 |
# File 'doc/API_reference.rb', line 1366 def vertical_align @vertical_align end |