feat(ui): update text input area on field changes and window resize

This commit is contained in:
2026-07-17 16:40:40 +08:00
parent fa38b20a3e
commit 5a1f2dd239
4 changed files with 33 additions and 2 deletions

View File

@@ -40,6 +40,8 @@ public:
void start_text_input();
void stop_text_input();
void update_text_input_area(const glm::vec4& textbox,
float cursor_position_x);
private:
Config m_game_config;

View File

@@ -31,7 +31,7 @@ public:
bool handle_mouse_button_event(const MouseButtonEvent& e) override;
bool handle_text_input_event(const TextInputEvent& e) override;
bool handle_key_event(const KeyEvent& e) override;
bool handle_window_resize_event(const WindowResizeEvent& e) override;
const std::string& input_text() const;
template <typename F> TextField& set_on_finish(F&& f) {
@@ -69,5 +69,6 @@ private:
void on_render(Renderer& renderer) override;
void on_update(float dt) override;
void update_show_text();
void update_input_area();
};
} // namespace Cubed