1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Popups are now windows also (broken!)

This commit is contained in:
Juan Linietsky
2020-03-12 09:37:40 -03:00
parent 543fb1c4da
commit 441f1a5fe9
159 changed files with 3311 additions and 3285 deletions

View File

@@ -94,7 +94,7 @@ void GroupDialog::_load_nodes(Node *p_current) {
if (!_can_edit(p_current, selected_group)) {
node->set_selectable(0, false);
node->set_custom_color(0, groups->get_color("disabled_font_color", "Editor"));
node->set_custom_color(0, groups->get_theme_color("disabled_font_color", "Editor"));
}
}
@@ -204,7 +204,7 @@ void GroupDialog::_add_group(String p_name) {
TreeItem *new_group = groups->create_item(groups_root);
new_group->set_text(0, name);
new_group->add_button(0, groups->get_icon("Remove", "EditorIcons"), 0);
new_group->add_button(0, groups->get_theme_icon("Remove", "EditorIcons"), 0);
new_group->set_editable(0, true);
new_group->select(0);
groups->ensure_cursor_is_visible();
@@ -361,12 +361,12 @@ void GroupDialog::_delete_group_item(const String &p_name) {
void GroupDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
add_button->set_icon(groups->get_icon("Forward", "EditorIcons"));
remove_button->set_icon(groups->get_icon("Back", "EditorIcons"));
add_button->set_icon(groups->get_theme_icon("Forward", "EditorIcons"));
remove_button->set_icon(groups->get_theme_icon("Back", "EditorIcons"));
add_filter->set_right_icon(groups->get_icon("Search", "EditorIcons"));
add_filter->set_right_icon(groups->get_theme_icon("Search", "EditorIcons"));
add_filter->set_clear_button_enabled(true);
remove_filter->set_right_icon(groups->get_icon("Search", "EditorIcons"));
remove_filter->set_right_icon(groups->get_theme_icon("Search", "EditorIcons"));
remove_filter->set_clear_button_enabled(true);
} break;
}
@@ -426,7 +426,7 @@ GroupDialog::GroupDialog() {
groups->set_allow_reselect(true);
groups->set_allow_rmb_select(true);
groups->set_v_size_flags(Control::SIZE_EXPAND_FILL);
groups->add_constant_override("draw_guides", 1);
groups->add_theme_constant_override("draw_guides", 1);
groups->connect("item_selected", callable_mp(this, &GroupDialog::_group_selected));
groups->connect("button_pressed", callable_mp(this, &GroupDialog::_delete_group_pressed));
groups->connect("item_edited", callable_mp(this, &GroupDialog::_group_renamed));
@@ -459,10 +459,10 @@ GroupDialog::GroupDialog() {
nodes_to_add->set_hide_folding(true);
nodes_to_add->set_select_mode(Tree::SELECT_MULTI);
nodes_to_add->set_v_size_flags(Control::SIZE_EXPAND_FILL);
nodes_to_add->add_constant_override("draw_guides", 1);
nodes_to_add->add_theme_constant_override("draw_guides", 1);
HBoxContainer *add_filter_hbc = memnew(HBoxContainer);
add_filter_hbc->add_constant_override("separate", 0);
add_filter_hbc->add_theme_constant_override("separate", 0);
vbc_add->add_child(add_filter_hbc);
add_filter = memnew(LineEdit);
@@ -505,10 +505,10 @@ GroupDialog::GroupDialog() {
nodes_to_remove->set_hide_root(true);
nodes_to_remove->set_hide_folding(true);
nodes_to_remove->set_select_mode(Tree::SELECT_MULTI);
nodes_to_remove->add_constant_override("draw_guides", 1);
nodes_to_remove->add_theme_constant_override("draw_guides", 1);
HBoxContainer *remove_filter_hbc = memnew(HBoxContainer);
remove_filter_hbc->add_constant_override("separate", 0);
remove_filter_hbc->add_theme_constant_override("separate", 0);
vbc_remove->add_child(remove_filter_hbc);
remove_filter = memnew(LineEdit);
@@ -637,7 +637,7 @@ void GroupsEditor::update_tree() {
TreeItem *item = tree->create_item(root);
item->set_text(0, gi.name);
if (can_be_deleted) {
item->add_button(0, get_icon("Remove", "EditorIcons"), 0);
item->add_button(0, get_theme_icon("Remove", "EditorIcons"), 0);
} else {
item->set_selectable(0, false);
}
@@ -694,8 +694,8 @@ GroupsEditor::GroupsEditor() {
tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vbc->add_child(tree);
tree->connect("button_pressed", callable_mp(this, &GroupsEditor::_remove_group));
tree->add_constant_override("draw_guides", 1);
add_constant_override("separation", 3 * EDSCALE);
tree->add_theme_constant_override("draw_guides", 1);
add_theme_constant_override("separation", 3 * EDSCALE);
}
GroupsEditor::~GroupsEditor() {