aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/polygon_2d.h
diff options
context:
space:
mode:
authorGilles Roudiere2017-11-07 08:58:35 +0100
committerGilles Roudiere2018-02-16 10:14:52 +0100
commit8dad41e395220404fb0fdafaa0cd4ed18179231f (patch)
tree37b9190b77fa989f9d9d369b80957c3890e4164f /scene/2d/polygon_2d.h
parent68f277477b5a5f3003405e36c6b6853720cb91de (diff)
downloadgodot-8dad41e395220404fb0fdafaa0cd4ed18179231f.tar.gz
godot-8dad41e395220404fb0fdafaa0cd4ed18179231f.tar.zst
godot-8dad41e395220404fb0fdafaa0cd4ed18179231f.zip
2D editor GUI input rework. Changes are:
- The input handling is done into several distinct functions, and the code is more consistent. - The actions' history is more precise ("Edited CanvasItem" is now "Rotated CanvasItem","Moved CanvasItem",etc...) - Fixed a little bug about input key events not forwarded correctly to plugins - IK is followed by default when you move a bone node, the alt-key allow you to move it normally
Diffstat (limited to 'scene/2d/polygon_2d.h')
-rw-r--r--scene/2d/polygon_2d.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index f62c78c55..66f44cb3f 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -59,6 +59,16 @@ protected:
static void _bind_methods();
public:
+ virtual Dictionary _edit_get_state() const;
+ virtual void _edit_set_state(const Dictionary &p_state);
+
+ virtual void _edit_set_pivot(const Point2 &p_pivot);
+ virtual Point2 _edit_get_pivot() const;
+ virtual bool _edit_use_pivot() const;
+ virtual Rect2 _edit_get_rect() const;
+
+ virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
+
void set_polygon(const PoolVector<Vector2> &p_polygon);
PoolVector<Vector2> get_polygon() const;
@@ -98,15 +108,6 @@ public:
void set_offset(const Vector2 &p_offset);
Vector2 get_offset() const;
- //editor stuff
-
- virtual void _edit_set_pivot(const Point2 &p_pivot);
- virtual Point2 _edit_get_pivot() const;
- virtual bool _edit_use_pivot() const;
-
- virtual Rect2 _edit_get_rect() const;
- virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
-
Polygon2D();
};