From 712cb49a8df96110a38a15dcc945139f23dec65f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Fri, 3 Mar 2023 20:19:39 +0200 Subject: [PATCH] Fix #19545: Unable to scroll staff list with over 32768 staff --- data/language/en-GB.txt | 2 +- src/openrct2-ui/windows/StaffList.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 9a7c0f7cde..b1e6b3a11e 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -1245,7 +1245,7 @@ STR_1863 :Handyman STR_1864 :Mechanic STR_1865 :Security Guard STR_1866 :Entertainer -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Can’t change number of rotations… STR_1869 :{WINDOW_COLOUR_2}Number of rotations: STR_1870 :Number of complete rotations diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index db35bd3714..d18fc00ef9 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -305,7 +305,7 @@ public: auto staffTypeStringId = _staffList.size() == 1 ? namingConvention.Singular : namingConvention.Plural; auto ft = Formatter(); - ft.Add(_staffList.size()); + ft.Add(_staffList.size()); ft.Add(staffTypeStringId); DrawTextBasic( @@ -320,7 +320,7 @@ public: Invalidate(); } - auto scrollHeight = static_cast(_staffList.size()) * SCROLLABLE_ROW_HEIGHT; + auto scrollHeight = static_cast(_staffList.size()) * SCROLLABLE_ROW_HEIGHT; auto i = scrollHeight - widgets[WIDX_STAFF_LIST_LIST].bottom + widgets[WIDX_STAFF_LIST_LIST].top + 21; if (i < 0) i = 0;