diff options
Diffstat (limited to 'src/text.cpp')
-rw-r--r-- | src/text.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/text.cpp b/src/text.cpp index 8726b88..186907f 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -97,6 +97,17 @@ void TextSystem::loadFont(const std::string& name, << font.tex << ")" << std::endl; } +void TextSystem::put(const std::string& font, + float x, + float y, + const std::string& text) +{ + if (fontData.find(font) == fontData.end()) + return; + + fontData[font].text.emplace_back(text, x, y); +} + void TextSystem::updateVBOs(void) { for (auto& data : fontData) { |