diff options
| author | Gilles Roudiere | 2017-07-30 15:32:22 +0200 |
|---|---|---|
| committer | Gilles Roudiere | 2017-08-13 21:20:13 +0200 |
| commit | b329cb9c71ff43d013bd29574db251ddebf9f245 (patch) | |
| tree | d5155c3a1be7b1104d4c2a7eaa8b94e8990d6a9e /editor/plugins/canvas_item_editor_plugin.h | |
| parent | fcff42dcb717478d963ce6ad197c5ed7bdfb080c (diff) | |
| download | godot-b329cb9c71ff43d013bd29574db251ddebf9f245.tar.gz godot-b329cb9c71ff43d013bd29574db251ddebf9f245.tar.zst godot-b329cb9c71ff43d013bd29574db251ddebf9f245.zip | |
Snap anchors when dragged, depending on the zoom level
Diffstat (limited to '')
| -rw-r--r-- | editor/plugins/canvas_item_editor_plugin.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index fd89a451e..0263bc108 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -334,6 +334,7 @@ class CanvasItemEditor : public VBoxContainer { void _prepare_drag(const Point2 &p_click_pos); DragType _get_anchor_handle_drag_type(const Point2 &p_click, Vector2 &r_point); + Vector2 _anchor_snap(Vector2 anchor); Vector2 _anchor_to_position(Control *p_control, Vector2 anchor); Vector2 _position_to_anchor(Control *p_control, Vector2 position); |
