mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Compile certain CanvasItem._edit_*() functions with DEBUG_ENABLED
This commit is contained in:
parent
c6c464cf9a
commit
58e79bfa9a
41 changed files with 155 additions and 121 deletions
|
|
@ -174,7 +174,7 @@ protected:
|
|||
void _draw_multiline_bind_compat_84523(const Vector<Point2> &p_points, const Color &p_color, real_t p_width);
|
||||
void _draw_multiline_colors_bind_compat_84523(const Vector<Point2> &p_points, const Vector<Color> &p_colors, real_t p_width);
|
||||
static void _bind_compatibility_methods();
|
||||
#endif
|
||||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
void _validate_property(PropertyInfo &p_property) const;
|
||||
|
||||
|
|
@ -193,11 +193,9 @@ public:
|
|||
NOTIFICATION_WORLD_2D_CHANGED = 36,
|
||||
};
|
||||
|
||||
/* EDITOR */
|
||||
#ifdef TOOLS_ENABLED
|
||||
// Select the node
|
||||
virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
|
||||
/* EDITOR AND DEBUGGING */
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
// Save and restore a CanvasItem state
|
||||
virtual void _edit_set_state(const Dictionary &p_state) {}
|
||||
virtual Dictionary _edit_get_state() const { return Dictionary(); }
|
||||
|
|
@ -216,9 +214,7 @@ public:
|
|||
virtual real_t _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 Size2 _edit_get_minimum_size() const { return Size2(-1, -1); } // LOOKS WEIRD
|
||||
|
||||
// Used to set a pivot
|
||||
|
|
@ -227,7 +223,18 @@ public:
|
|||
virtual Point2 _edit_get_pivot() const { return Point2(); }
|
||||
|
||||
virtual Transform2D _edit_get_transform() const;
|
||||
#endif
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
// Those need to be available in debug runtime, to allow for node selection.
|
||||
|
||||
// Select the node.
|
||||
virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
|
||||
|
||||
// Used to resize/move the node.
|
||||
virtual bool _edit_use_rect() const { return false; } // Maybe replace with _edit_get_editmode().
|
||||
virtual Rect2 _edit_get_rect() const { return Rect2(0, 0, 0, 0); }
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
void update_draw_order();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue