mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
feat(chat): implement message expiration after 5 seconds
This commit is contained in:
@@ -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<Label> label;
|
||||
uint64_t time;
|
||||
bool render = false;
|
||||
bool render = true;
|
||||
};
|
||||
int m_lines = 10;
|
||||
bool m_scale = 1.0f;
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
TextField& set_app(App* app);
|
||||
TextField& set_typing(bool typing, bool finished);
|
||||
TextField& clear_input();
|
||||
|
||||
bool is_typing() const;
|
||||
bool handle_mouse_move_event(const MouseMoveEvent& e) override;
|
||||
bool handle_mouse_button_event(const MouseButtonEvent& e) override;
|
||||
bool handle_text_input_event(const TextInputEvent& e) override;
|
||||
|
||||
Reference in New Issue
Block a user