diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2015-12-12 13:54:26 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-12 13:54:26 -0300 |
| commit | 890b462ffbe6b3ece94b90170d95d719bc4a9075 (patch) | |
| tree | dc14ce189bb23180534670cd609125c906c8075b /scene/gui/control.h | |
| parent | cc7880fba55e945b8a37fa8aca5a7faa065d3f6c (diff) | |
| download | redot-engine-890b462ffbe6b3ece94b90170d95d719bc4a9075.tar.gz | |
added rotation and scale support to gui controls
Diffstat (limited to 'scene/gui/control.h')
| -rw-r--r-- | scene/gui/control.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h index 4311b299c8..09a4b48e6b 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -107,7 +107,10 @@ private: float margin[4]; AnchorType anchor[4]; - FocusMode focus_mode; + FocusMode focus_mode; + + float rotation; + Vector2 scale; bool pending_resize; @@ -211,6 +214,8 @@ private: void _size_changed(); String _get_tooltip() const; + void _set_rotation_deg(float p_rot); + float _get_rotation_deg() const; protected: bool window_has_modal_stack() const; @@ -299,6 +304,13 @@ public: Rect2 get_rect() const; Rect2 get_global_rect() const; Rect2 get_window_rect() const; ///< use with care, as it blocks waiting for the visual server + + void set_rotation(float p_rotation); + float get_rotation() const; + + void set_scale(const Vector2& p_scale); + Vector2 get_scale() const; + void set_area_as_parent_rect(int p_margin=0); @@ -382,7 +394,7 @@ public: void warp_mouse(const Point2& p_to_pos); - virtual bool is_text_field() const; + virtual bool is_text_field() const; Control(); ~Control(); |
