diff options
author | Gilles Roudière <gilles.roudiere@gmail.com> | 2019-10-21 23:37:07 +0200 |
---|---|---|
committer | Gilles Roudière <gilles.roudiere@gmail.com> | 2020-01-09 22:15:48 +0100 |
commit | b5251eb00f7daa339ad61923f16608432a902f46 (patch) | |
tree | dc8034fc276d71436ef611ff392a56297e64cadc /scene/gui | |
parent | 76678b2609921f27f52c1a2e2bd62b8d2a27bb4b (diff) |
Don't compile editor-only function when tools=no
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/control.cpp | 11 | ||||
-rw-r--r-- | scene/gui/control.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 5e656eea70..9a67745e0d 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -47,6 +47,7 @@ #include "editor/plugins/canvas_item_editor_plugin.h" #endif +#ifdef TOOLS_ENABLED Dictionary Control::_edit_get_state() const { Dictionary s; @@ -155,6 +156,11 @@ bool Control::_edit_use_pivot() const { return true; } +Size2 Control::_edit_get_minimum_size() const { + return get_combined_minimum_size(); +} +#endif + void Control::set_custom_minimum_size(const Size2 &p_custom) { if (p_custom == data.custom_minimum_size) @@ -193,11 +199,6 @@ Size2 Control::get_combined_minimum_size() const { return data.minimum_size_cache; } -Size2 Control::_edit_get_minimum_size() const { - - return get_combined_minimum_size(); -} - Transform2D Control::_get_internal_transform() const { Transform2D rot_scale; diff --git a/scene/gui/control.h b/scene/gui/control.h index a9831b9793..357858beb6 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -279,6 +279,7 @@ public: }; /* EDITOR */ +#ifdef TOOLS_ENABLED virtual Dictionary _edit_get_state() const; virtual void _edit_set_state(const Dictionary &p_state); @@ -301,6 +302,7 @@ public: virtual bool _edit_use_pivot() const; virtual Size2 _edit_get_minimum_size() const; +#endif void accept_event(); |