Add an editor setting to enable/disable TouchActionsPanel

Adds an editor setting to enable/disable TouchActionsPanel.

Automatically hide the panel when hardware keyboard is connected.
This commit is contained in:
Anish Mishra 2025-04-04 16:17:57 +05:30
parent b462db5adb
commit a5c03dcd08
5 changed files with 22 additions and 1 deletions

View file

@ -584,6 +584,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
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);
// Only available in the Android editor.
EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/touchscreen/enable_touch_actions_panel", true, "")
set_restart_if_changed("interface/touchscreen/enable_touch_actions_panel", 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, "")