From 6b716dc1575f91f00c37e73579edca272e08d18c Mon Sep 17 00:00:00 2001 From: pss9205 <9205011@naver.com> Date: Wed, 24 Jan 2018 00:06:37 +0900 Subject: [PATCH] Fix #7021: Extra rating factors overflow the vehicle tab in Korean (#7073) --- contributors.md | 1 + src/openrct2-ui/windows/Ride.cpp | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/contributors.md b/contributors.md index 13d6f4df13..9dbaefbc69 100644 --- a/contributors.md +++ b/contributors.md @@ -102,6 +102,7 @@ The following people are not part of the project team, but have been contributin * Robert Lewicki (rlewicki) * Tyler Ruckinger (TyPR124) * Justin Gottula (jgottula) +* Seongsik Park (pss9205) ## Toolchain * (Balletie) - macOS diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 2b6ea9c6d9..fde8f6402f 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -2915,17 +2915,16 @@ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi) // Description y += gfx_draw_string_left_wrapped(dpi, &rideEntry->naming.description, x, y, 300, STR_BLACK_STRING, COLOUR_BLACK); - y += 5; + y += 2; // Capacity gfx_draw_string_left(dpi, STR_CAPACITY, &rideEntry->capacity, COLOUR_BLACK, x, y); - y += 5; // Excitement Factor factor = rideEntry->excitement_multiplier; if (factor > 0) { - y += 10; + y += LIST_ROW_HEIGHT; gfx_draw_string_left(dpi, STR_EXCITEMENT_FACTOR, &factor, COLOUR_BLACK, x, y); } @@ -2933,18 +2932,25 @@ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi) factor = rideEntry->intensity_multiplier; if (factor > 0) { - y += 10; + sint32 lineHeight = font_get_line_height(FONT_SPRITE_BASE_MEDIUM); + if (lineHeight != 10) + x += 150; + else + y += LIST_ROW_HEIGHT; + gfx_draw_string_left(dpi, STR_INTENSITY_FACTOR, &factor, COLOUR_BLACK, x, y); + + if (lineHeight != 10) + x -= 150; } // Nausea Factor factor = rideEntry->nausea_multiplier; if (factor > 0) { - y += 10; + y += LIST_ROW_HEIGHT; gfx_draw_string_left(dpi, STR_NAUSEA_FACTOR, &factor, COLOUR_BLACK, x, y); } - } typedef struct rct_vehichle_paintinfo {