summaryrefslogtreecommitdiff
path: root/scene/gui/line_edit.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-31 11:55:06 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-10-31 11:55:06 +0100
commit33c7c8020a7c1b4103642ff5124b2b76ecdeea14 (patch)
tree92b930936d793f4adac2727a60070bac14967bf7 /scene/gui/line_edit.h
parent6946bc56ef422ae2de51200297f626c4751b06f5 (diff)
parent3aed3edc0677c59ebd96175410d9cc1f5427c053 (diff)
Merge pull request #67489 from timothyqiu/auto-select-all
Allow selecting SpinBox & LineEdit text when focus enters
Diffstat (limited to 'scene/gui/line_edit.h')
-rw-r--r--scene/gui/line_edit.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 861c7f273b..e0a079b623 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -174,6 +174,9 @@ private:
double caret_blink_timer = 0.0;
bool caret_blinking = false;
+ bool pending_select_all_on_focus = false;
+ bool select_all_on_focus = false;
+
struct ThemeCache {
Ref<StyleBox> normal;
Ref<StyleBox> read_only;
@@ -365,6 +368,10 @@ public:
void set_flat(bool p_enabled);
bool is_flat() const;
+ void set_select_all_on_focus(bool p_enabled);
+ bool is_select_all_on_focus() const;
+ void clear_pending_select_all_on_focus(); // For other controls, e.g. SpinBox.
+
virtual bool is_text_field() const override;
void show_virtual_keyboard();