Merge pull request #70646 from KoBeWi/relatable_offset

Add `pivot_offset_ratio` property to Control
This commit is contained in:
Thaddeus Crews 2025-10-13 12:30:10 -05:00
commit e560ea47d4
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
5 changed files with 57 additions and 11 deletions

View file

@ -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();