diff options
Diffstat (limited to 'scene/2d/canvas_item.h')
-rw-r--r-- | scene/2d/canvas_item.h | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h index 10d5082dfc..1e6a251c9c 100644 --- a/scene/2d/canvas_item.h +++ b/scene/2d/canvas_item.h @@ -222,6 +222,9 @@ public: /* EDITOR */ + // Select the node + virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const; + // Save and restore a CanvasItem state virtual void _edit_set_state(const Dictionary &p_state){}; virtual Dictionary _edit_get_state() const { return Dictionary(); }; @@ -234,36 +237,21 @@ public: virtual void _edit_set_scale(const Size2 &p_scale) = 0; virtual Size2 _edit_get_scale() const = 0; + // Used to rotate the node + virtual bool _edit_use_rotation() const { return false; }; + virtual void _edit_set_rotation(float p_rotation){}; + virtual float _edit_get_rotation() const { return 0.0; }; + // Used to resize/move the node + virtual bool _edit_use_rect() const { return false; }; // MAYBE REPLACE BY A _edit_get_editmode() virtual void _edit_set_rect(const Rect2 &p_rect){}; virtual Rect2 _edit_get_rect() const { return Rect2(0, 0, 0, 0); }; - virtual bool _edit_use_rect() const { return false; }; - - Rect2 _edit_get_item_and_children_rect() const; - - // used to select the node - virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const; - - // Used to rotate the node - virtual void - _edit_set_rotation(float p_rotation){}; - virtual float _edit_get_rotation() const { - return 0.0; - }; - virtual bool _edit_use_rotation() const { - return false; - }; + virtual Size2 _edit_get_minimum_size() const { return Size2(-1, -1); }; // LOOKS WEIRD // Used to set a pivot + virtual bool _edit_use_pivot() const { return false; }; virtual void _edit_set_pivot(const Point2 &p_pivot){}; - virtual Point2 _edit_get_pivot() const { - return Point2(); - }; - virtual bool _edit_use_pivot() const { - return false; - }; - - virtual Size2 _edit_get_minimum_size() const; + virtual Point2 _edit_get_pivot() const { return Point2(); }; /* VISIBILITY */ @@ -358,6 +346,9 @@ public: void set_notify_transform(bool p_enable); bool is_transform_notification_enabled() const; + // Used by control nodes to retreive the parent's anchorable area + virtual Rect2 get_anchorable_rect() const { return Rect2(0, 0, 0, 0); }; + int get_canvas_layer() const; CanvasItem(); |