1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

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

@@ -129,7 +129,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
return;
config_err = config_err.word_wrap(80);
warning->set_text(config_err);
warning->popup_centered_minsize();
warning->popup_centered();
} else if (p_id == BUTTON_SIGNALS) {
@@ -757,7 +757,7 @@ void SceneTreeEditor::_renamed() {
if (!Node::_validate_node_name(new_name)) {
error->set_text(TTR("Invalid node name, the following characters are not allowed:") + "\n" + Node::invalid_character);
error->popup_centered_minsize();
error->popup_centered();
if (new_name.empty()) {
which->set_text(0, n->get_name());
@@ -1193,18 +1193,19 @@ SceneTreeEditor::~SceneTreeEditor() {
void SceneTreeDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (is_visible())
tree->update_tree();
} break;
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &SceneTreeDialog::_select));
filter->set_right_icon(get_icon("Search", "EditorIcons"));
filter->set_right_icon(tree->get_icon("Search", "EditorIcons"));
filter->set_clear_button_enabled(true);
} break;
case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &SceneTreeDialog::_select));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
if (is_visible_in_tree())
tree->update_tree();
} break;
}
}
@@ -1239,14 +1240,14 @@ SceneTreeDialog::SceneTreeDialog() {
add_child(vbc);
filter = memnew(LineEdit);
filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter->set_h_size_flags(Control::SIZE_EXPAND_FILL);
filter->set_placeholder(TTR("Filter nodes"));
filter->add_constant_override("minimum_spaces", 0);
filter->connect("text_changed", callable_mp(this, &SceneTreeDialog::_filter_changed));
vbc->add_child(filter);
tree = memnew(SceneTreeEditor(false, false, true));
tree->set_v_size_flags(SIZE_EXPAND_FILL);
tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
tree->get_scene_tree()->connect("item_activated", callable_mp(this, &SceneTreeDialog::_select));
vbc->add_child(tree);
}