mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 00:42:45 +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
@@ -1869,6 +1869,7 @@ public:
|
||||
this->fill_y = (display->fill_y == 0 && bar->fill_y == 0) ? 0 : std::min(display->fill_y, bar->fill_y);
|
||||
this->resize_x = std::max(display->resize_x, bar->resize_x);
|
||||
this->resize_y = std::min(display->resize_y, bar->resize_y);
|
||||
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