1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Rename Control margin to offset

This commit is contained in:
Marcel Admiraal
2020-12-22 16:24:29 +00:00
parent 30d469a5e0
commit 4b8b803931
106 changed files with 1278 additions and 1278 deletions

View File

@@ -100,24 +100,24 @@ void EditorLayoutsDialog::_post_popup() {
EditorLayoutsDialog::EditorLayoutsDialog() {
makevb = memnew(VBoxContainer);
add_child(makevb);
makevb->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, 5);
makevb->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -5);
makevb->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5);
makevb->set_anchor_and_offset(SIDE_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, Control::ANCHOR_BEGIN, 5);
layout_names->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -5);
layout_names->set_offset(SIDE_TOP, 5);
layout_names->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5);
layout_names->set_anchor_and_offset(SIDE_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);
name = memnew(LineEdit);
makevb->add_child(name);
name->set_margin(MARGIN_TOP, 5);
name->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, 5);
name->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -5);
name->set_offset(SIDE_TOP, 5);
name->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5);
name->set_anchor_and_offset(SIDE_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));
}