X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FHUD.hpp;h=2302fd2991d2ec954b54a77e41929f00bb5a0d5e;hb=150d065f431d665326fd8028748c48a74ad956bb;hp=cab8f93e0bf13c26cccb69a6a3a4d48b6ac28fa9;hpb=75172fd735e34082c34b47ae7c194445b53038d9;p=blank.git diff --git a/src/ui/HUD.hpp b/src/ui/HUD.hpp index cab8f93..2302fd2 100644 --- a/src/ui/HUD.hpp +++ b/src/ui/HUD.hpp @@ -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;