summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.h
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2017-03-23 00:47:51 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2017-03-24 21:29:46 +0100
commit61d7ae346685259784b47992a0afb3f4be0dbaa6 (patch)
tree4539816e2b0c62f5718803bc44e24661bc51820c /editor/plugins/canvas_item_editor_plugin.h
parent33a2c5def0f55ef67196e35ac3309d3f9b70d967 (diff)
Improved 2D snapping behavior
Make snapping affect nodes created by drag & drop Make snapping for a single Node2D refer to its pivot Refactor duplicate drag setup code Replace one occurrence of the old set_pos by set_position
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.h')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 5f22437d39..ba3f240a49 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -144,6 +144,7 @@ class CanvasItemEditor : public VBoxContainer {
DRAG_ALL,
DRAG_ROTATE,
DRAG_PIVOT,
+ DRAG_NODE_2D,
};
@@ -323,6 +324,7 @@ class CanvasItemEditor : public VBoxContainer {
void _list_select(const InputEventMouseButton &b);
DragType _find_drag_type(const Transform2D &p_xform, const Rect2 &p_local_rect, const Point2 &p_click, Vector2 &r_point);
+ void _prepare_drag(const Point2 &p_click_pos);
void _popup_callback(int p_op);
bool updating_scroll;