diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-05-21 04:21:45 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-06-03 19:57:03 -0400 |
commit | bc5c10e0f84aecb598fcf2000c9bc7eb8ed4b28e (patch) | |
tree | 56a880a19106781b9aba864c57b60d700e5cef34 | |
parent | 5d9cab3aeb3c62df6b7b44e6e68c0ebbb67f7a45 (diff) |
Use a more specific type for AcceptDialog register_text_enter
-rw-r--r-- | doc/classes/AcceptDialog.xml | 2 | ||||
-rw-r--r-- | scene/gui/dialogs.cpp | 2 | ||||
-rw-r--r-- | scene/gui/dialogs.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index f4cf246713..f644606040 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -49,7 +49,7 @@ <method name="register_text_enter"> <return type="void"> </return> - <argument index="0" name="line_edit" type="Node"> + <argument index="0" name="line_edit" type="Control"> </argument> <description> Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index b6884bd37d..7cae091c57 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -155,7 +155,7 @@ bool AcceptDialog::has_autowrap() { return label->has_autowrap(); } -void AcceptDialog::register_text_enter(Node *p_line_edit) { +void AcceptDialog::register_text_enter(Control *p_line_edit) { ERR_FAIL_NULL(p_line_edit); LineEdit *line_edit = Object::cast_to<LineEdit>(p_line_edit); if (line_edit) { diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index b072055d49..69035001c0 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -77,7 +77,7 @@ public: Label *get_label() { return label; } static void set_swap_cancel_ok(bool p_swap); - void register_text_enter(Node *p_line_edit); + void register_text_enter(Control *p_line_edit); Button *get_ok_button() { return ok; } Button *add_button(const String &p_text, bool p_right = false, const String &p_action = ""); |