mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
feat(ui): update text input area on field changes and window resize
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user