diff options
Diffstat (limited to 'source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c index bea951e7708..709b7b03376 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c @@ -662,6 +662,12 @@ wmKeyMap *WM_gizmogroup_setup_keymap_generic_drag(const wmGizmoGroupType *UNUSED return WM_gizmo_keymap_generic_drag_with_keyconfig(kc); } +wmKeyMap *WM_gizmogroup_setup_keymap_generic_maybe_drag(const wmGizmoGroupType *UNUSED(gzgt), + wmKeyConfig *kc) +{ + return WM_gizmo_keymap_generic_maybe_drag_with_keyconfig(kc); +} + /** * Variation of #WM_gizmogroup_keymap_common but with keymap items for selection * @@ -767,6 +773,17 @@ struct wmKeyMap *WM_gizmo_keymap_generic_click_drag(wmWindowManager *wm) return WM_gizmo_keymap_generic_click_drag_with_keyconfig(wm->defaultconf); } +/** Drag or press depending on preference. */ +struct wmKeyMap *WM_gizmo_keymap_generic_maybe_drag_with_keyconfig(wmKeyConfig *kc) +{ + const char *idname = "Generic Gizmo Maybe Drag"; + return WM_keymap_ensure(kc, idname, SPACE_EMPTY, RGN_TYPE_WINDOW); +} +struct wmKeyMap *WM_gizmo_keymap_generic_maybe_drag(wmWindowManager *wm) +{ + return WM_gizmo_keymap_generic_drag_with_keyconfig(wm->defaultconf); +} + /** \} */ /* -------------------------------------------------------------------- */ |