A dynamic text label.
More...
#include <GameMenu.hpp>
|
Mesh | mesh = Mesh("") |
| Label mesh.
|
|
glm::vec2 | pos = glm::vec2(0.0f) |
| Label position.
|
|
const Texture * | tid = nullptr |
| Font texture shortcut.
|
|
|
float | _vScale = 1.0f |
| Vertical size on screen.
|
|
const Font * | _font = nullptr |
| Font atlas.
|
|
Font::Alignment | _align = Font::Alignment::LEFT |
| Text alignement.
|
|
◆ MenuLabel()
MenuLabel::MenuLabel |
( |
const glm::vec2 & |
screenPos, |
|
|
float |
verticalScale, |
|
|
const Font * |
font, |
|
|
Font::Alignment |
alignment |
|
) |
| |
Creates a label. The position is in the bottom left corner if the alignment is LEFT, the bottom right if the alignment is RIGHT, and in the middle of the label if it is CENTER.
- Parameters
-
screenPos | position on screen in absolute units |
verticalScale | height of the characters in absolute units |
font | the font to use |
alignment | the text alignment to use |
◆ update()
void MenuLabel::update |
( |
const std::string & |
text | ) |
|
Update the string displayed by the label.
- Parameters
-
text | the new text to display |
The documentation for this class was generated from the following files:
- src/apps/snakegame/GameMenu.hpp
- src/apps/snakegame/GameMenu.cpp