]> git.localhorst.tv Git - blank.git/blobdiff - src/ui/Interface.hpp
also post UI messages to graphical output
[blank.git] / src / ui / Interface.hpp
index d6c301981ef45125ac10cbf7a4eeabd7b987dbe6..00b76e66b0c2232ea48cfc0eec1f053e03c3aaac 100644 (file)
@@ -4,12 +4,14 @@
 #include "HUD.hpp"
 #include "../app/FPSController.hpp"
 #include "../app/IntervalTimer.hpp"
+#include "../graphics/FixedText.hpp"
 #include "../graphics/Font.hpp"
-#include "../graphics/Text.hpp"
+#include "../graphics/MessageBox.hpp"
 #include "../model/geometry.hpp"
 #include "../model/OutlineModel.hpp"
 #include "../world/Block.hpp"
 
+#include <string>
 #include <glm/glm.hpp>
 
 
@@ -64,6 +66,11 @@ public:
        void ToggleCounter();
        void UpdateCounter();
 
+       void PostMessage(const char *);
+       void PostMessage(const std::string &msg) {
+               PostMessage(msg.c_str());
+       }
+
        void Update(int dt);
 
        void Render(Viewport &) noexcept;
@@ -86,7 +93,9 @@ private:
        OutlineModel outline;
        glm::mat4 outline_transform;
 
-       Text counter_text;
+       FixedText counter_text;
+       MessageBox messages;
+       IntervalTimer msg_timer;
 
        Config config;