1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Make anchors snap to each other

This commit is contained in:
Gilles Roudiere
2017-08-02 19:24:05 +02:00
parent b73613e1eb
commit f5ff7e9fa0
2 changed files with 31 additions and 26 deletions

View File

@@ -334,7 +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);
float _anchor_snap(const float anchor, bool *snapped = NULL);
float _anchor_snap(float anchor, bool *snapped = NULL, float p_opposite_anchor = -1);
Vector2 _anchor_to_position(Control *p_control, Vector2 anchor);
Vector2 _position_to_anchor(Control *p_control, Vector2 position);