Class: MG::Text
Properties 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 Widget
#enabled?, #highlighted?, #touch_enabled?
Attributes inherited from Node
#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #visible?, #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
Methods inherited from Node
#add, #children, #clear, #delete, #delete_from_parent, #intersects?, #parent, #run_action, #stop_action, #stop_all_actions
Constructor Details
#initialize(text = '', font = '', font_size = 0) ⇒ Text
Creates a new Text widget with optional content, font name and size.
1188 |
# File 'doc/API_reference.rb', line 1188 def initialize(text='', font='', font_size=0); end |
Instance Attribute Details
#area_size ⇒ Size
Returns the text rendering area size.
1206 1207 1208 |
# File 'doc/API_reference.rb', line 1206 def area_size @area_size end |
#font ⇒ String
Returns name of the font used by the widget.
1200 1201 1202 |
# File 'doc/API_reference.rb', line 1200 def font @font end |
#font_size ⇒ Integer
Returns size of the font used by the widget.
1203 1204 1205 |
# File 'doc/API_reference.rb', line 1203 def font_size @font_size end |
#horizontal_align ⇒ :left, ...
Returns the horizontal alignment of the text.
1212 1213 1214 |
# File 'doc/API_reference.rb', line 1212 def horizontal_align @horizontal_align end |
#text ⇒ String
Returns content of the widget.
1194 1195 1196 |
# File 'doc/API_reference.rb', line 1194 def text @text end |
#text_color ⇒ Color
Returns color of the text part of the widget.
1197 1198 1199 |
# File 'doc/API_reference.rb', line 1197 def text_color @text_color end |
#vertical_align ⇒ :top, ...
Returns the vertical alignment of the text.
1209 1210 1211 |
# File 'doc/API_reference.rb', line 1209 def vertical_align @vertical_align end |