GuiText Class Reference
Display, manage, and manipulate text in the GUI.
More...
#include <gui.h>
List of all members.
Detailed Description
Display, manage, and manipulate text in the GUI.
Constructor & Destructor Documentation
GuiText::GuiText |
( |
const char * |
t, |
|
|
int |
s, |
|
|
GXColor |
c | |
|
) |
| | |
Constructor
- Parameters:
-
| t | Text |
| s | Font size |
| c | Font color |
Constructor for the
GuiText class.
GuiText::GuiText |
( |
const char * |
t |
) |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Assumes SetPresets() has been called to setup preferred text attributes
- Parameters:
-
Constructor for the
GuiText class, uses presets
Destructor.
Destructor for the GuiText class.
Member Function Documentation
void GuiText::Draw |
( |
|
) |
[virtual] |
Constantly called to draw the text.
Draw the text on screen
Reimplemented from GuiElement.
void GuiText::SetAlignment |
( |
int |
hor, |
|
|
int |
vert | |
|
) |
| | [virtual] |
Sets the text alignment
- Parameters:
-
| hor | Horizontal alignment (ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTRE) |
| vert | Vertical alignment (ALIGN_TOP, ALIGN_BOTTOM, ALIGN_MIDDLE) |
Reimplemented from GuiElement.
void GuiText::SetColor |
( |
GXColor |
c |
) |
|
Sets the font color
- Parameters:
-
void GuiText::SetFontSize |
( |
int |
s |
) |
|
Sets the font size
- Parameters:
-
void GuiText::SetMaxWidth |
( |
int |
w |
) |
|
Sets the maximum width of the drawn texture image
- Parameters:
-
void GuiText::SetPresets |
( |
int |
sz, |
|
|
GXColor |
c, |
|
|
int |
w, |
|
|
u16 |
s, |
|
|
int |
h, |
|
|
int |
v | |
|
) |
| | |
Sets up preset values to be used by GuiText(t) Useful when printing multiple text elements, all with the same attributes set
- Parameters:
-
| sz | Font size |
| c | Font color |
| w | Maximum width of texture image (for text wrapping) |
| s | Font size |
| h | Text alignment (horizontal) |
| v | Text alignment (vertical) |
void GuiText::SetScroll |
( |
int |
s |
) |
|
Enables/disables text scrolling
- Parameters:
-
void GuiText::SetStyle |
( |
u16 |
s |
) |
|
Sets the FreeTypeGX style attributes
- Parameters:
-
void GuiText::SetText |
( |
const char * |
t |
) |
|
Sets the text of the GuiText element
- Parameters:
-
void GuiText::SetWrap |
( |
bool |
w, |
|
|
int |
width = 0 | |
|
) |
| | |
Enables/disables text wrapping
- Parameters:
-
| w | Wrapping on/off |
| width | Maximum width (0 to disable) |
The documentation for this class was generated from the following files: