summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.h
diff options
context:
space:
mode:
authorGilles Roudiere <gilles.roudiere@gmail.com>2017-07-30 15:32:22 +0200
committerGilles Roudiere <gilles.roudiere@gmail.com>2017-08-13 21:20:13 +0200
commitb329cb9c71ff43d013bd29574db251ddebf9f245 (patch)
treed5155c3a1be7b1104d4c2a7eaa8b94e8990d6a9e /editor/plugins/canvas_item_editor_plugin.h
parentfcff42dcb717478d963ce6ad197c5ed7bdfb080c (diff)
Snap anchors when dragged, depending on the zoom level
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.h')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h1
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 fd89a451e1..0263bc1083 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);