diff options
Diffstat (limited to 'scene/gui')
| -rw-r--r-- | scene/gui/control.cpp | 8 | ||||
| -rw-r--r-- | scene/gui/control.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 6ca6d82807..b7c1d35fd7 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -94,6 +94,14 @@ Point2 Control::_edit_get_position() const { return get_position(); }; +void Control::_edit_set_scale(const Size2 &p_scale) { + set_scale(p_scale); +} + +Size2 Control::_edit_get_scale() const { + return data.scale; +} + void Control::_edit_set_rect(const Rect2 &p_edit_rect) { set_position((get_position() + get_transform().basis_xform(p_edit_rect.position)).snapped(Vector2(1, 1))); set_size(p_edit_rect.size.snapped(Vector2(1, 1))); diff --git a/scene/gui/control.h b/scene/gui/control.h index a215490295..b5453e60f5 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -283,6 +283,9 @@ public: virtual void _edit_set_position(const Point2 &p_position); virtual Point2 _edit_get_position() const; + virtual void _edit_set_scale(const Size2 &p_scale); + virtual Size2 _edit_get_scale() const; + virtual void _edit_set_rect(const Rect2 &p_edit_rect); virtual Rect2 _edit_get_rect() const; virtual bool _edit_use_rect() const; |