1 #ifndef GONG_UI_MESSAGEBOX_HPP_
2 #define GONG_UI_MESSAGEBOX_HPP_
5 #include "../graphics/align.hpp"
6 #include "../graphics/glm.hpp"
7 #include "../graphics/PrimitiveMesh.hpp"
23 explicit MessageBox(const graphics::Font &);
25 void Position(const glm::vec3 &, graphics::Gravity) noexcept;
27 void Foreground(const glm::vec4 &col) noexcept { fg = col; }
28 void Background(const glm::vec4 &col) noexcept { bg = col; dirty = true; }
30 void PushLine(const char *);
31 void PushLine(const std::string &l) {
35 void Render(graphics::Viewport &) noexcept;
41 const graphics::Font &font;
42 std::deque<Text> lines;
43 std::size_t max_lines;
49 graphics::PrimitiveMesh::Color bg;
50 graphics::PrimitiveMesh::Color fg;
52 graphics::PrimitiveMesh bg_mesh;
54 graphics::Gravity grav;