]> git.localhorst.tv Git - blank.git/blobdiff - src/ui/HUD.hpp
centralize entity controllers
[blank.git] / src / ui / HUD.hpp
index cab8f93e0bf13c26cccb69a6a3a4d48b6ac28fa9..2302fd2991d2ec954b54a77e41929f00bb5a0d5e 100644 (file)
@@ -47,6 +47,8 @@ public:
        void PostMessage(const std::string &msg) {
                PostMessage(msg.c_str());
        }
+       // whether to always render message box regardless of last post
+       void KeepMessages(bool k) { msg_keep = k; }
 
        void Update(int dt);
        void Render(Viewport &) noexcept;
@@ -79,7 +81,8 @@ private:
 
        // message box
        MessageBox messages;
-       IntervalTimer msg_timer;
+       CoarseTimer msg_timer;
+       bool msg_keep;
 
        // crosshair
        PrimitiveMesh crosshair;