1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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
This commit is contained in:
Pedro J. Estébanez
2017-03-23 00:47:51 +01:00
parent 33a2c5def0
commit 61d7ae3466
2 changed files with 49 additions and 49 deletions

View File

@@ -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;