diff options
Diffstat (limited to 'editor/editor_layouts_dialog.cpp')
-rw-r--r-- | editor/editor_layouts_dialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 776fbd9314..dbd043c494 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -52,12 +52,12 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) { if (get_hide_on_ok()) hide(); ok_pressed(); - accept_event(); + set_input_as_handled(); } break; case KEY_ESCAPE: { hide(); - accept_event(); + set_input_as_handled(); } break; } } @@ -110,15 +110,15 @@ EditorLayoutsDialog::EditorLayoutsDialog() { makevb = memnew(VBoxContainer); add_child(makevb); - makevb->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); - makevb->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -5); + makevb->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, 5); + makevb->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -5); layout_names = memnew(ItemList); makevb->add_child(layout_names); layout_names->set_visible(true); layout_names->set_margin(MARGIN_TOP, 5); - layout_names->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); - layout_names->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -5); + layout_names->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, 5); + layout_names->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -5); layout_names->set_v_size_flags(Control::SIZE_EXPAND_FILL); layout_names->set_select_mode(ItemList::SELECT_MULTI); layout_names->set_allow_rmb_select(true); @@ -126,8 +126,8 @@ EditorLayoutsDialog::EditorLayoutsDialog() { name = memnew(LineEdit); makevb->add_child(name); name->set_margin(MARGIN_TOP, 5); - name->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); - name->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -5); + name->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, 5); + name->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -5); name->connect("gui_input", callable_mp(this, &EditorLayoutsDialog::_line_gui_input)); name->connect("focus_entered", callable_mp(layout_names, &ItemList::unselect_all)); } |