You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Native pan and zoom for macOS
This commit is contained in:
@@ -623,6 +623,16 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
|
||||
return do_input_action(p_camera, mm->get_position(), false);
|
||||
}
|
||||
|
||||
Ref<InputEventPanGesture> pan_gesture = p_event;
|
||||
if (pan_gesture.is_valid()) {
|
||||
|
||||
if (pan_gesture->get_command() || pan_gesture->get_shift()) {
|
||||
const real_t delta = pan_gesture->get_delta().y;
|
||||
floor->set_value(floor->get_value() + SGN(delta));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user