mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #70646 from KoBeWi/relatable_offset
Add `pivot_offset_ratio` property to Control
This commit is contained in:
commit
e560ea47d4
5 changed files with 57 additions and 11 deletions
|
|
@ -212,6 +212,7 @@ private:
|
|||
real_t rotation = 0.0;
|
||||
Vector2 scale = Vector2(1, 1);
|
||||
Vector2 pivot_offset;
|
||||
Vector2 pivot_offset_ratio;
|
||||
|
||||
Point2 pos_cache;
|
||||
Size2 size_cache;
|
||||
|
|
@ -535,8 +536,11 @@ public:
|
|||
void set_rotation_degrees(real_t p_degrees);
|
||||
real_t get_rotation() const;
|
||||
real_t get_rotation_degrees() const;
|
||||
void set_pivot_offset_ratio(const Vector2 &p_ratio);
|
||||
Vector2 get_pivot_offset_ratio() const;
|
||||
void set_pivot_offset(const Vector2 &p_pivot);
|
||||
Vector2 get_pivot_offset() const;
|
||||
Vector2 get_combined_pivot_offset() const;
|
||||
|
||||
void update_minimum_size();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue