Fix #9574: Text overflow in scenario objective window.

This commit is contained in:
Aaron van Geffen 2019-07-29 15:16:36 +02:00 committed by GitHub
parent 3ac43114a6
commit 5066ebebf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View file

@ -2,6 +2,7 @@
------------------------------------------------------------------------
- Fix: [#7883] Headless server log is stored incorrectly if server name contains CJK in Ubuntu
- Improved: [#9466] Add the rain weather effect to the OpenGL renderer.
- Fix: [#9574] Text overflow in scenario objective window when using CJK languages.
- Fix: [#9625] Show correct cost in scenery selection.
- Fix: [#9669] The tile inspector shortcut key does not work with debugging tools disabled.

View file

@ -124,7 +124,7 @@ static rct_widget window_park_stats_widgets[] = {
static rct_widget window_park_objective_widgets[] = {
MAIN_PARK_WIDGETS,
{ WWT_BUTTON, 1, 7, 222, 209, 220, STR_ENTER_NAME_INTO_SCENARIO_CHART, STR_NONE }, // enter name
{ WWT_BUTTON, 1, 7, 222, 207, 220, STR_ENTER_NAME_INTO_SCENARIO_CHART, STR_NONE }, // enter name
{ WIDGETS_END },
};
@ -1509,7 +1509,12 @@ static void window_park_objective_mouseup(rct_window* w, rct_widgetindex widgetI
*/
static void window_park_objective_resize(rct_window* w)
{
window_set_resize(w, 230, 226, 230, 226);
#ifndef NO_TTF
if (gCurrentTTFFontSet != nullptr)
window_set_resize(w, 230, 270, 230, 270);
else
#endif
window_set_resize(w, 230, 226, 230, 226);
}
/**
@ -1544,9 +1549,13 @@ static void window_park_objective_invalidate(rct_window* w)
window_park_set_pressed_tab(w);
window_park_prepare_window_title_text();
//
// Show name input button on scenario completion.
if (gParkFlags & PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT)
{
window_park_objective_widgets[WIDX_ENTER_NAME].type = WWT_BUTTON;
window_park_objective_widgets[WIDX_ENTER_NAME].top = w->height - 19;
window_park_objective_widgets[WIDX_ENTER_NAME].bottom = w->height - 6;
}
else
window_park_objective_widgets[WIDX_ENTER_NAME].type = WWT_EMPTY;