mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #19559: Vehicle descriptions spill over into preview
This commit is contained in:
parent
4db5d62476
commit
9e236d1b5a
|
@ -6,6 +6,7 @@
|
|||
- Change: [#21715] [Plugin] Remove access to the internal `owner` property. Note: `ownership` is still accessible.
|
||||
- Change: [#21855] Cheats menu dropdown no longer requires dragging.
|
||||
- Fix: [#866] Boat Hire boats get stuck entering track.
|
||||
- Fix: [#19559] Custom rides with long descriptions extend into lower widgets.
|
||||
- Fix: [#21696] Fullscreen window option not correctly applied on macOS.
|
||||
- Fix: [#21787] Map generator heightmap should respect increased height limits.
|
||||
- Fix: [#21829] When creating a new scenario, the default name contains formatting codes.
|
||||
|
|
|
@ -2559,7 +2559,8 @@ static_assert(std::size(RatingNames) == 6);
|
|||
|
||||
void VehicleResize()
|
||||
{
|
||||
WindowSetResize(*this, 316, 221, 316, 221);
|
||||
auto bottom = widgets[WIDX_VEHICLE_TRAINS].bottom + 6;
|
||||
WindowSetResize(*this, 316, bottom, 316, bottom);
|
||||
}
|
||||
|
||||
void VehicleOnMouseDown(WidgetIndex widgetIndex)
|
||||
|
@ -2842,6 +2843,19 @@ static_assert(std::size(RatingNames) == 6);
|
|||
StringId stringId = rideEntry->nausea_multiplier > 0 ? STR_NAUSEA_FACTOR : STR_NAUSEA_FACTOR_NEGATIVE;
|
||||
DrawTextBasic(dpi, screenCoords, stringId, ft);
|
||||
}
|
||||
|
||||
const auto minimumPreviewStart = screenCoords.y - windowPos.y + kListRowHeight + 5;
|
||||
if (minimumPreviewStart > widgets[WIDX_VEHICLE_TRAINS_PREVIEW].top)
|
||||
{
|
||||
auto heightIncrease = minimumPreviewStart - widgets[WIDX_VEHICLE_TRAINS_PREVIEW].top;
|
||||
height += heightIncrease;
|
||||
ResizeFrameWithPage();
|
||||
|
||||
for (auto i = EnumValue(WIDX_VEHICLE_TRAINS_PREVIEW); i <= WIDX_VEHICLE_CARS_PER_TRAIN_DECREASE; i++)
|
||||
{
|
||||
widgets[i].moveDown(heightIncrease);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct VehicleDrawInfo
|
||||
|
|
Loading…
Reference in New Issue