summaryrefslogtreecommitdiff
path: root/editor/project_settings_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r--editor/project_settings_editor.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 2b2e03ce38..a7c336eb16 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -81,7 +81,8 @@ void ProjectSettingsEditor::_notification(int p_what) {
globals_editor->edit(ProjectSettings::get_singleton());
search_button->set_icon(get_icon("Search", "EditorIcons"));
- clear_button->set_icon(get_icon("Close", "EditorIcons"));
+ search_box->set_right_icon(get_icon("Search", "EditorIcons"));
+ search_box->set_clear_button_enabled(true);
action_add_error->add_color_override("font_color", get_color("error_color", "Editor"));
@@ -119,7 +120,8 @@ void ProjectSettingsEditor::_notification(int p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
search_button->set_icon(get_icon("Search", "EditorIcons"));
- clear_button->set_icon(get_icon("Close", "EditorIcons"));
+ search_box->set_right_icon(get_icon("Search", "EditorIcons"));
+ search_box->set_clear_button_enabled(true);
action_add_error->add_color_override("font_color", get_color("error_color", "Editor"));
popup_add->set_item_icon(popup_add->get_item_index(INPUT_KEY), get_icon("Keyboard", "EditorIcons"));
popup_add->set_item_icon(popup_add->get_item_index(INPUT_JOY_BUTTON), get_icon("JoyButton", "EditorIcons"));
@@ -213,10 +215,8 @@ void ProjectSettingsEditor::_action_edited() {
undo_redo->create_action(TTR("Change Action deadzone"));
undo_redo->add_do_method(ProjectSettings::get_singleton(), "set", name, new_action);
- undo_redo->add_do_method(this, "_update_actions");
undo_redo->add_do_method(this, "_settings_changed");
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set", name, old_action);
- undo_redo->add_undo_method(this, "_update_actions");
undo_redo->add_undo_method(this, "_settings_changed");
undo_redo->commit_action();
}
@@ -806,6 +806,10 @@ void ProjectSettingsEditor::popup_project_settings() {
plugin_settings->update_plugins();
}
+void ProjectSettingsEditor::update_plugins() {
+ plugin_settings->update_plugins();
+}
+
void ProjectSettingsEditor::_item_selected(const String &p_path) {
String selected_path = p_path;
@@ -887,7 +891,6 @@ void ProjectSettingsEditor::_item_del() {
return;
}
- print_line("to delete.. " + property);
undo_redo->create_action(TTR("Delete Item"));
Variant value = ProjectSettings::get_singleton()->get(property);
@@ -1003,6 +1006,7 @@ void ProjectSettingsEditor::_copy_to_platform_about_to_show() {
Set<String> presets;
+ presets.insert("bptc");
presets.insert("s3tc");
presets.insert("etc");
presets.insert("etc2");
@@ -1591,15 +1595,6 @@ void ProjectSettingsEditor::_toggle_search_bar(bool p_pressed) {
}
}
-void ProjectSettingsEditor::_clear_search_box() {
-
- if (search_box->get_text() == "")
- return;
-
- search_box->clear();
- globals_editor->get_inspector()->update_tree();
-}
-
void ProjectSettingsEditor::set_plugins_page() {
tab_container->set_current_tab(plugin_settings->get_index());
@@ -1662,7 +1657,6 @@ void ProjectSettingsEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_translation_filter_option_changed"), &ProjectSettingsEditor::_translation_filter_option_changed);
ClassDB::bind_method(D_METHOD("_translation_filter_mode_changed"), &ProjectSettingsEditor::_translation_filter_mode_changed);
- ClassDB::bind_method(D_METHOD("_clear_search_box"), &ProjectSettingsEditor::_clear_search_box);
ClassDB::bind_method(D_METHOD("_toggle_search_bar"), &ProjectSettingsEditor::_toggle_search_bar);
ClassDB::bind_method(D_METHOD("_copy_to_platform_about_to_show"), &ProjectSettingsEditor::_copy_to_platform_about_to_show);
@@ -1753,10 +1747,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
search_bar->add_child(search_box);
- clear_button = memnew(ToolButton);
- search_bar->add_child(clear_button);
- clear_button->connect("pressed", this, "_clear_search_box");
-
globals_editor = memnew(SectionedInspector);
props_base->add_child(globals_editor);
globals_editor->get_inspector()->set_undo_redo(EditorNode::get_singleton()->get_undo_redo());