From ce10290959ca896823acf2bdcb948a5a3541e664 Mon Sep 17 00:00:00 2001 From: zhenyan121 <3367366583@qq.com> Date: Mon, 20 Jul 2026 10:16:12 +0800 Subject: [PATCH] feat(chat): implement message expiration after 5 seconds --- include/Cubed/ui/chat_box.hpp | 4 ++-- include/Cubed/ui/text_field.hpp | 2 +- src/ui/chat_box.cpp | 19 +++++++++++++++++-- src/ui/text_field.cpp | 2 +- src/ui/world_ui_manager.cpp | 3 ++- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/include/Cubed/ui/chat_box.hpp b/include/Cubed/ui/chat_box.hpp index 34ac158..0ee7416 100644 --- a/include/Cubed/ui/chat_box.hpp +++ b/include/Cubed/ui/chat_box.hpp @@ -33,11 +33,11 @@ public: private: static constexpr int MAX_MESSGAES_SUM = 50; - + static constexpr float DISAPPEAR_TIME = 5.0f; struct Line { std::unique_ptr