summaryrefslogtreecommitdiff
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r--editor/editor_settings.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index b9291bcd0f..f230a9b435 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -369,7 +369,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Skip locales which we can't render properly (see above comment).
// Test against language code without regional variants (e.g. ur_PK).
String lang_code = locale.get_slice("_", 0);
- if (locales_to_skip.find(lang_code) != -1) {
+ if (locales_to_skip.has(lang_code)) {
continue;
}
@@ -377,7 +377,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
lang_hint += locale;
int score = TranslationServer::get_singleton()->compare_locales(host_lang, locale);
- if (score >= best_score) {
+ if (score > 0 && score >= best_score) {
best = locale;
best_score = score;
if (score == 10) {
@@ -643,10 +643,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/2d/bone_outline_size", 2);
_initial_set("editors/2d/viewport_border_color", Color(0.4, 0.4, 1.0, 0.4));
_initial_set("editors/2d/constrain_editor_view", true);
- _initial_set("editors/2d/warped_mouse_panning", true);
- _initial_set("editors/2d/simple_panning", false);
- _initial_set("editors/2d/scroll_to_pan", false);
- _initial_set("editors/2d/pan_speed", 20);
+
+ // Panning
+ // Enum should be in sync with ControlScheme in ViewPanner.
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/panning/2d_editor_panning_scheme", 0, "Scroll Zooms,Scroll Pans");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/panning/sub_editors_panning_scheme", 0, "Scroll Zooms,Scroll Pans");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/panning/animation_editors_panning_scheme", 1, "Scroll Zooms,Scroll Pans");
+ _initial_set("editors/panning/simple_panning", false);
+ _initial_set("editors/panning/warped_mouse_panning", true);
+ _initial_set("editors/panning/2d_editor_pan_speed", 20);
// Tiles editor
_initial_set("editors/tiles_editor/display_grid", true);