Class: MG::Text
Properties (collapse)
-
- (Size) area_size
The text rendering area size.
-
- (String) font
Name of the font used by the widget.
-
- (Integer) font_size
Size of the font used by the widget.
-
- (:left, ...) horizontal_align
The horizontal alignment of the text.
-
- (String) text
Content of the widget.
-
- (Color) text_color
Color of the text part of the widget.
-
- (:top, ...) vertical_align
The vertical alignment of the text.
Attributes inherited from Widget
Attributes inherited from Node
#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #visible?, #z_index
Constructors (collapse)
-
- (Text) initialize(text = '', font = '', font_size = 0)
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
Constructor Details
- (Text) initialize(text = '', font = '', font_size = 0)
Creates a new Text widget with optional content, font name and size.
707 |
# File 'motion-game', line 707 def initialize(text='', font='', font_size=0); end |
Instance Attribute Details
- (Size) area_size
Returns the text rendering area size.
725 726 727 |
# File 'motion-game', line 725 def area_size @area_size end |
- (String) font
Returns name of the font used by the widget.
719 720 721 |
# File 'motion-game', line 719 def font @font end |
- (Integer) font_size
Returns size of the font used by the widget.
722 723 724 |
# File 'motion-game', line 722 def font_size @font_size end |
- (:left, ...) horizontal_align
Returns the horizontal alignment of the text.
731 732 733 |
# File 'motion-game', line 731 def horizontal_align @horizontal_align end |
- (String) text
Returns content of the widget.
713 714 715 |
# File 'motion-game', line 713 def text @text end |
- (Color) text_color
Returns color of the text part of the widget.
716 717 718 |
# File 'motion-game', line 716 def text_color @text_color end |
- (:top, ...) vertical_align
Returns the vertical alignment of the text.
728 729 730 |
# File 'motion-game', line 728 def vertical_align @vertical_align end |