summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.h
diff options
context:
space:
mode:
authorGilles Roudiere <gilles.roudiere@gmail.com>2017-07-29 16:57:32 +0200
committerGilles Roudiere <gilles.roudiere@gmail.com>2017-08-13 21:20:13 +0200
commitfcff42dcb717478d963ce6ad197c5ed7bdfb080c (patch)
tree7b0c1ab4e702cfbfab9913656a7dbb672bb36ab5 /editor/plugins/canvas_item_editor_plugin.h
parentbd0384a9e93e3e8d792cef678dd9f3467a6a088d (diff)
Make anchors draggable
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.h')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index bd6591011a..fd89a451e1 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -144,11 +144,14 @@ class CanvasItemEditor : public VBoxContainer {
DRAG_BOTTOM_RIGHT,
DRAG_BOTTOM,
DRAG_BOTTOM_LEFT,
+ DRAG_ANCHOR_TOP_LEFT,
+ DRAG_ANCHOR_TOP_RIGHT,
+ DRAG_ANCHOR_BOTTOM_RIGHT,
+ DRAG_ANCHOR_BOTTOM_LEFT,
DRAG_ALL,
DRAG_ROTATE,
DRAG_PIVOT,
DRAG_NODE_2D,
-
};
enum KeyMoveMODE {
@@ -327,10 +330,12 @@ class CanvasItemEditor : public VBoxContainer {
void _key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE p_move_mode);
void _list_select(const Ref<InputEventMouseButton> &b);
- DragType _find_drag_type(const Point2 &p_click, Vector2 &r_point);
+ DragType _get_resize_handle_drag_type(const Point2 &p_click, Vector2 &r_point);
void _prepare_drag(const Point2 &p_click_pos);
+ DragType _get_anchor_handle_drag_type(const Point2 &p_click, Vector2 &r_point);
Vector2 _anchor_to_position(Control *p_control, Vector2 anchor);
+ Vector2 _position_to_anchor(Control *p_control, Vector2 position);
void _popup_callback(int p_op);
bool updating_scroll;