summaryrefslogtreecommitdiffstats
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r--editor/editor_settings.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index b1a91fa3dd..d0c89c49c4 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -527,15 +527,18 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Touchscreen
bool has_touchscreen_ui = DisplayServer::get_singleton()->is_touchscreen_available();
- EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/increase_scrollbar_touch_area", has_touchscreen_ui, "")
- set_restart_if_changed("interface/touchscreen/increase_scrollbar_touch_area", true);
- EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_long_press_as_right_click", has_touchscreen_ui, "")
- set_restart_if_changed("interface/touchscreen/enable_long_press_as_right_click", true);
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_pan_and_scale_gestures", has_touchscreen_ui, "")
set_restart_if_changed("interface/touchscreen/enable_pan_and_scale_gestures", true);
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/touchscreen/scale_gizmo_handles", has_touchscreen_ui ? 3 : 1, "1,5,1")
set_restart_if_changed("interface/touchscreen/scale_gizmo_handles", true);
+ // Disable some touchscreen settings by default for the XR Editor.
+ bool is_native_touchscreen = has_touchscreen_ui && !OS::get_singleton()->has_feature("xr_editor");
+ EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_long_press_as_right_click", is_native_touchscreen, "")
+ set_restart_if_changed("interface/touchscreen/enable_long_press_as_right_click", true);
+ EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/increase_scrollbar_touch_area", is_native_touchscreen, "")
+ set_restart_if_changed("interface/touchscreen/increase_scrollbar_touch_area", true);
+
// Scene tabs
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/scene_tabs/display_close_button", 1, "Never,If Tab Active,Always"); // TabBar::CloseButtonDisplayPolicy
_initial_set("interface/scene_tabs/show_thumbnail_on_hover", true);