diff options
Diffstat (limited to 'editor/editor_name_dialog.cpp')
| -rw-r--r-- | editor/editor_name_dialog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/editor/editor_name_dialog.cpp b/editor/editor_name_dialog.cpp index 29d5dda658..d4c418bfc9 100644 --- a/editor/editor_name_dialog.cpp +++ b/editor/editor_name_dialog.cpp @@ -32,14 +32,16 @@ #include "class_db.h" #include "os/keyboard.h" -void EditorNameDialog::_line_gui_input(const InputEvent &p_event) { +void EditorNameDialog::_line_gui_input(const Ref<InputEvent> &p_event) { - if (p_event.type == InputEvent::KEY) { + Ref<InputEventKey> k = p_event; - if (!p_event.key.pressed) + if (k.is_valid()) { + + if (!k->is_pressed()) return; - switch (p_event.key.scancode) { + switch (k->get_scancode()) { case KEY_ENTER: case KEY_RETURN: { |