#include "Text.hpp"
#include "../graphics/align.hpp"
+#include "../graphics/PrimitiveMesh.hpp"
#include <deque>
#include <string>
void Position(const glm::vec3 &, Gravity) noexcept;
void Foreground(const glm::vec4 &col) noexcept { fg = col; }
- void Background(const glm::vec4 &col) noexcept { bg = col; }
+ void Background(const glm::vec4 &col) noexcept { bg = col; dirty = true; }
void PushLine(const char *);
void PushLine(const std::string &l) {
void Render(Viewport &) noexcept;
+private:
+ void Recalc();
+
private:
const Font &font;
std::deque<Text> lines;
glm::vec3 pos;
glm::vec3 adv;
+ glm::vec2 size;
glm::vec4 bg;
glm::vec4 fg;
+ PrimitiveMesh bg_mesh;
+
Gravity grav;
+ bool dirty;
};