fekalnigtacko/src/gfx/text.hpp
2026-01-14 23:33:53 +01:00

26 lines
507 B
C++

#pragma once
#include "font.hpp"
#include "vertex_array.hpp"
namespace gfx
{
class Text
{
public:
Text(std::shared_ptr<const Font> font, uint32_t color);
void SetText(const char* text);
void SetText(const std::string& text) { SetText(text.c_str()); }
const std::shared_ptr<const Font>& GetFont() const { return font_; }
const VertexArray& GetVA() const { return va_; }
private:
std::shared_ptr<const Font> font_;
VertexArray va_;
uint32_t color_;
};
} // namespace gfx