Text Elements#
Text elements display text in a single font and color. Multiple text elements can be combined with layout elements to create content with multiple fonts/colors.
A new text element can be created with the text()
function in the
eg-overlay-ui
module.
See also
See Fonts for details on how EG-Overlay handles and renders fonts.
Functions#
- eg-overlay-ui.text(text_value, color, font)#
Create a new :lua:class:’uitext’ element.
- Parameters:
- Returns:
A Text element
Version History
Version
Notes
0.0.1
Added
Classes#
- class eg-overlay-ui.uitext#
A text element
- text([newtext])#
Get or set the text displayed in this text.
- Parameters:
newtext (
string
) – The new text to display.- Returns:
The current or new text.
Version History
Version
Notes
0.2.0
Added
Note
The following methods are inherited from
uielement
- x([position])#
Set or get the current position X.
Important
It is normally not necessary to manually position an element.
Version History
Version
Notes
0.3.0
Added
- y([position])#
Set or get the current position Y.
Important
It is normally not necessary to manually position an element.
Version History
Version
Notes
0.3.0
Added
- width([value])#
Get or set the element’s width.
Important
It is normally not necessary to manually set an element’s size.
Version History
Version
Notes
0.3.0
Added
- height([value])#
Get or set the element’s height.
Important
It is normally not necessary to manually set an element’s size.
Version History
Version
Notes
0.3.0
Added