You've already forked godot
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user