mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
feat(chat): distinguish between send and cancel in chat input
This commit is contained in:
@@ -34,7 +34,7 @@ public:
|
||||
void set_pause(bool pause);
|
||||
void set_error(std::string_view error);
|
||||
void set_mouse(bool pause);
|
||||
void set_chatting(bool chatting);
|
||||
void set_chatting(bool chatting, bool send);
|
||||
// Not thread safe
|
||||
void handle_chat_message(ChatMessage& message);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
float width() const override;
|
||||
float height() const override;
|
||||
void set_d_image(TextureManager& m);
|
||||
void set_typing(bool typing);
|
||||
void set_typing(bool typing, bool finished);
|
||||
void set_app(App* app);
|
||||
template <typename F> ChatBox& set_on_finish(F&& f) {
|
||||
m_text_field->set_on_finish(std::forward<F>(f));
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
TextField& set_default_image(TextureManager& texture_manager);
|
||||
TextField& set_auto_scale(bool auto_scale);
|
||||
TextField& set_app(App* app);
|
||||
TextField& set_typing(bool typing);
|
||||
TextField& set_typing(bool typing, bool finished);
|
||||
TextField& clear_input();
|
||||
bool handle_mouse_move_event(const MouseMoveEvent& e) override;
|
||||
bool handle_mouse_button_event(const MouseButtonEvent& e) override;
|
||||
@@ -74,6 +74,6 @@ private:
|
||||
void update_input_area();
|
||||
|
||||
void start_typing();
|
||||
void stop_typing();
|
||||
void stop_typing(bool finished);
|
||||
};
|
||||
} // namespace Cubed
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
void init() override;
|
||||
void render(Renderer& renderer) override;
|
||||
|
||||
void set_chatting(bool chantting);
|
||||
void set_chatting(bool chantting, bool sned);
|
||||
|
||||
void add_chat_message(ChatMessage& message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user