Don't compile editor-only function when tools=no

This commit is contained in:
Gilles Roudière 2019-10-21 23:37:07 +02:00
parent 76678b2609
commit b5251eb00f
38 changed files with 126 additions and 42 deletions

View file

@ -33,6 +33,7 @@
#include "core/math/geometry.h"
#include "skeleton_2d.h"
#ifdef TOOLS_ENABLED
Dictionary Polygon2D::_edit_get_state() const {
Dictionary state = Node2D::_edit_get_state();
state["offset"] = offset;
@ -87,6 +88,7 @@ bool Polygon2D::_edit_is_selected_on_click(const Point2 &p_point, double p_toler
}
return Geometry::is_point_in_polygon(p_point - get_offset(), polygon2d);
}
#endif
void Polygon2D::_skeleton_bone_setup_changed() {
update();