90 int textScrollInitialDelay;
92 uint32_t textScrollLastTick = 0;
103 uint32_t measuredGen;
108 uint32_t fullWidthGen;
110 wchar_t* getText(
const char *text)
const;
111 bool scrollStepDue();
113 void forgetMeasurements();
114 int getFullWidth(
int atSize);
Hashed msgid -> UTF-8 string table loaded from a single binary .lang blob (see loadLanguage()).
void setLineSpacing(int px)
Sets the pixels added to the font size to get the distance between wrapped lines (default 6; less for...
void setWrap(bool w, int width=0)
Enables/disables text wrapping.
void setColor(PixelColor c)
Sets the font color.
void resetText()
Updates the text to the selected language.
GuiText(const char *t, int s, PixelColor c)
Constructor.
void setScroll(SCROLL s)
Enables/disables text scrolling.
static void setPresets(int sz, PixelColor c, int w, uint16_t s, ALIGN_H h, ALIGN_V v)
Sets up preset values to be used by GuiText(t) Useful when printing multiple text elements,...
void getNaturalSize(int &w, int &h) override
Gets the text's size for layout: its rendered width and height on one line (at most the maximum width...
void setNudgeY(int n)
Moves the drawn text down (or up, if negative) by this many design pixels, after it is placed.
void setFontSize(int s)
Sets the font size.
void setText(const char *t)
Sets the text of the GuiText element.
int getTextWidth()
Gets the width of the text when rendered.
void draw() override
Constantly called to draw the text.
void setWText(wchar_t *t)
Sets the text of the GuiText element.
void setMaxWidth(int w)
Sets the maximum width of the drawn texture image.
int getLength()
Gets the translated text length of the GuiText element.
void setStyle(uint16_t s)
Sets the GuiTextRenderer style attributes.
void setAlignment(ALIGN_H hor, ALIGN_V vert)
Sets the text alignment.
SCROLL
Scrolling mode of a GuiText (none or horizontal).
ALIGN_V
Vertical alignment of a GuiElement relative to its parent.
ALIGN_H
Horizontal alignment of a GuiElement relative to its parent.
8-bit-per-channel RGBA color used by the video interfaces.