Merge pull request #97985 from RobProductions/add-tablet-nav-preset
Add `Tablet/Trackpad` 3D navigation preset
This commit is contained in:
commit
c5f0d571b5
5 changed files with 49 additions and 12 deletions
|
|
@ -2140,6 +2140,18 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
|||
nav_mode = change_nav_from_shortcut;
|
||||
}
|
||||
|
||||
} else if (m->get_button_mask().has_flag(MouseButtonMask::MB_XBUTTON1)) {
|
||||
NavigationMode change_nav_from_shortcut = _get_nav_mode_from_shortcut_check(NAVIGATION_MOUSE_4, shortcut_check_sets, false);
|
||||
if (change_nav_from_shortcut != NAVIGATION_NONE) {
|
||||
nav_mode = change_nav_from_shortcut;
|
||||
}
|
||||
|
||||
} else if (m->get_button_mask().has_flag(MouseButtonMask::MB_XBUTTON2)) {
|
||||
NavigationMode change_nav_from_shortcut = _get_nav_mode_from_shortcut_check(NAVIGATION_MOUSE_5, shortcut_check_sets, false);
|
||||
if (change_nav_from_shortcut != NAVIGATION_NONE) {
|
||||
nav_mode = change_nav_from_shortcut;
|
||||
}
|
||||
|
||||
} else if (EDITOR_GET("editors/3d/navigation/emulate_3_button_mouse")) {
|
||||
// Handle trackpad (no external mouse) use case
|
||||
NavigationMode change_nav_from_shortcut = _get_nav_mode_from_shortcut_check(NAVIGATION_LEFT_MOUSE, shortcut_check_sets, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue