mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add drag zoom feature with CTRL+MiddleMouseButton
This change introduces a DragType enum to scene/gui/view_panner.cpp of dragging, which includes: - DRAG_TYPE_NONE: Not dragging - DRAG_TYPE_PAN: Panning (dragging using MMB) - DRAG_TYPE_ZOOM: Zooming (dragging using CTRL+MMB) The goal of this change is the third option, which was already available in 3D viewport but not in 2D. This feature should work in other editors as well such as Animation Track Editor and Visual Shader Editor and so on.
This commit is contained in:
parent
80a3d205f1
commit
82e23da12e
7 changed files with 67 additions and 15 deletions
|
|
@ -4129,6 +4129,7 @@ void CanvasItemEditor::_update_editor_settings() {
|
|||
panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/2d_editor_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
|
||||
panner->set_scroll_speed(EDITOR_GET("editors/panning/2d_editor_pan_speed"));
|
||||
panner->setup_warped_panning(get_viewport(), EDITOR_GET("editors/panning/warped_mouse_panning"));
|
||||
panner->set_zoom_style((ViewPanner::ZoomStyle)EDITOR_GET("editors/panning/zoom_style").operator int());
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_project_settings_changed() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue