Working multiple window support, including editor

This commit is contained in:
Juan Linietsky 2020-03-06 14:00:16 -03:00 committed by Juan Linietsky
parent f51fdc6eef
commit 4758057f20
105 changed files with 1956 additions and 1742 deletions

View file

@ -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));
}