|
Zappy GUI
C++ graphic client: renderer, camera, network
|
Central wrapper for all GUI text. Owns one shared Font (JetBrainsMono) loaded once for the window lifetime; falls back to GetFontDefault() if unloaded. More...
#include <TextRenderer.hpp>
Collaboration diagram for TextRenderer:Static Public Member Functions | |
| static bool | loadFont (const std::string &path) |
| static void | unloadFont () |
| static void | draw (const std::string &text, int x, int y, int fontSize, Color color) |
| static int | measure (const std::string &text, int fontSize) |
Static Private Member Functions | |
| static float | _spacing (int fontSize) |
| static const Font & | _active () |
Static Private Attributes | |
| static Font | _font = {} |
| static bool | _loaded = false |
| static constexpr int | BASE_SIZE |
Central wrapper for all GUI text. Owns one shared Font (JetBrainsMono) loaded once for the window lifetime; falls back to GetFontDefault() if unloaded.
Definition at line 11 of file TextRenderer.hpp.
|
staticprivate |
|
staticprivate |
Definition at line 8 of file TextRenderer.cpp.
Referenced by draw(), and measure().
Here is the caller graph for this function:
|
static |
Definition at line 52 of file TextRenderer.cpp.
References _active(), and _spacing().
Referenced by ButtonWidget::draw(), SpeedSlider::draw(), TooltipWidget::draw(), and TooltipRenderer::Builder::draw().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 30 of file TextRenderer.cpp.
References _buildCodepoints(), _font, _loaded, BASE_SIZE, and unloadFont().
Referenced by RaylibRenderer::init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 59 of file TextRenderer.cpp.
References _active(), and _spacing().
Referenced by EntityTooltipWidget::_positionButton(), ButtonWidget::draw(), TooltipWidget::draw(), and TooltipRenderer::Builder::draw().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 44 of file TextRenderer.cpp.
References _font, and _loaded.
Referenced by loadFont(), and RaylibRenderer::shutdown().
Here is the caller graph for this function:
|
staticprivate |
Definition at line 5 of file TextRenderer.hpp.
Referenced by _active(), loadFont(), and unloadFont().
|
staticprivate |
Definition at line 21 of file TextRenderer.hpp.
Referenced by _active(), loadFont(), and unloadFont().
|
staticconstexprprivate |