mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-15 16:32:41 +01:00
Change: Ability to set aspect ratio of a widget.
This allows setting the shape of a widget without dealing with absolute pixel sizes.
This commit is contained in:
committed by
Peter Nelson
parent
f267b37a33
commit
d43ff8dc49
@@ -127,6 +127,7 @@ public:
|
||||
}
|
||||
|
||||
this->smallest_x = this->children.front()->smallest_x + this->children.back()->smallest_x; // First and last are always shown, rest not
|
||||
this->ApplyAspectRatio();
|
||||
}
|
||||
|
||||
void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) override
|
||||
|
||||
Reference in New Issue
Block a user