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.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index fa83a58cff..be1ad1ca9c 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -31,10 +31,10 @@
#include "project_settings_editor.h"
#include "core/config/project_settings.h"
-#include "editor/editor_export.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "servers/movie_writer/movie_writer.h"
ProjectSettingsEditor *ProjectSettingsEditor::singleton = nullptr;
@@ -249,7 +249,7 @@ String ProjectSettingsEditor::_get_setting_name() const {
}
void ProjectSettingsEditor::_add_feature_overrides() {
- Set<String> presets;
+ HashSet<String> presets;
presets.insert("bptc");
presets.insert("s3tc");
@@ -261,6 +261,7 @@ void ProjectSettingsEditor::_add_feature_overrides() {
presets.insert("standalone");
presets.insert("32");
presets.insert("64");
+ presets.insert("movie");
EditorExport *ee = EditorExport::get_singleton();
@@ -292,8 +293,8 @@ void ProjectSettingsEditor::_add_feature_overrides() {
feature_box->clear();
feature_box->add_item(TTR("(All)"), 0); // So it is always on top.
int id = 1;
- for (Set<String>::Element *E = presets.front(); E; E = E->next()) {
- feature_box->add_item(E->get(), id++);
+ for (const String &E : presets) {
+ feature_box->add_item(E, id++);
}
}
@@ -420,7 +421,7 @@ void ProjectSettingsEditor::_action_reordered(const String &p_action_name, const
Variant target_value = ps->get(target_name);
List<PropertyInfo> props;
- OrderedHashMap<String, Variant> action_values;
+ HashMap<String, Variant> action_values;
ProjectSettings::get_singleton()->get_property_list(&props);
undo_redo->create_action(TTR("Update Input Action Order"));
@@ -437,9 +438,9 @@ void ProjectSettingsEditor::_action_reordered(const String &p_action_name, const
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "clear", prop.name);
}
- for (OrderedHashMap<String, Variant>::Element E = action_values.front(); E; E = E.next()) {
- String name = E.key();
- Variant value = E.get();
+ for (const KeyValue<String, Variant> &E : action_values) {
+ String name = E.key;
+ const Variant &value = E.value;
if (name == target_name) {
if (p_before) {
@@ -515,12 +516,12 @@ void ProjectSettingsEditor::_update_theme() {
type_box->clear();
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- // There's no point in adding Nil types, and Object types
- // can't be serialized correctly in the project settings.
- if (i != Variant::NIL && i != Variant::OBJECT) {
- String type = Variant::get_type_name(Variant::Type(i));
- type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
+ if (i == Variant::NIL || i == Variant::OBJECT || i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) {
+ // These types can't be serialized properly, so skip them.
+ continue;
}
+ String type = Variant::get_type_name(Variant::Type(i));
+ type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
}
}
@@ -560,6 +561,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
tab_container = memnew(TabContainer);
tab_container->set_use_hidden_tabs_for_min_size(true);
+ tab_container->set_theme_type_variation("TabContainerOdd");
add_child(tab_container);
VBoxContainer *general_editor = memnew(VBoxContainer);
@@ -586,7 +588,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
general_editor->add_child(header);
property_box = memnew(LineEdit);
- property_box->set_placeholder(TTR("Select a setting or type its name"));
+ property_box->set_placeholder(TTR("Select a Setting or Type its Name"));
property_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
property_box->connect("text_changed", callable_mp(this, &ProjectSettingsEditor::_property_box_changed));
header->add_child(property_box);
@@ -667,10 +669,10 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
autoload_settings->connect("autoload_changed", callable_mp(this, &ProjectSettingsEditor::queue_save));
tab_container->add_child(autoload_settings);
- shaders_global_variables_editor = memnew(ShaderGlobalsEditor);
- shaders_global_variables_editor->set_name(TTR("Shader Globals"));
- shaders_global_variables_editor->connect("globals_changed", callable_mp(this, &ProjectSettingsEditor::queue_save));
- tab_container->add_child(shaders_global_variables_editor);
+ shaders_global_shader_uniforms_editor = memnew(ShaderGlobalsEditor);
+ shaders_global_shader_uniforms_editor->set_name(TTR("Shader Globals"));
+ shaders_global_shader_uniforms_editor->connect("globals_changed", callable_mp(this, &ProjectSettingsEditor::queue_save));
+ tab_container->add_child(shaders_global_shader_uniforms_editor);
plugin_settings = memnew(EditorPluginSettings);
plugin_settings->set_name(TTR("Plugins"));
@@ -682,7 +684,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
timer->set_one_shot(true);
add_child(timer);
- get_ok_button()->set_text(TTR("Close"));
+ set_ok_button_text(TTR("Close"));
set_hide_on_ok(true);
bool use_advanced = EditorSettings::get_singleton()->get_project_metadata("project_settings", "advanced_mode", false);
@@ -697,4 +699,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
import_defaults_editor->set_name(TTR("Import Defaults"));
tab_container->add_child(import_defaults_editor);
import_defaults_editor->connect("project_settings_changed", callable_mp(this, &ProjectSettingsEditor::queue_save));
+
+ MovieWriter::set_extensions_hint(); // ensure extensions are properly displayed.
}