mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-14 19:42:38 +01:00
Fix #19545: Unable to scroll staff list with over 32768 staff
This commit is contained in:
@@ -1245,7 +1245,7 @@ STR_1863 :Handyman
|
|||||||
STR_1864 :Mechanic
|
STR_1864 :Mechanic
|
||||||
STR_1865 :Security Guard
|
STR_1865 :Security Guard
|
||||||
STR_1866 :Entertainer
|
STR_1866 :Entertainer
|
||||||
STR_1867 :{BLACK}{COMMA16} {STRINGID}
|
STR_1867 :{BLACK}{COMMA32} {STRINGID}
|
||||||
STR_1868 :Can’t change number of rotations…
|
STR_1868 :Can’t change number of rotations…
|
||||||
STR_1869 :{WINDOW_COLOUR_2}Number of rotations:
|
STR_1869 :{WINDOW_COLOUR_2}Number of rotations:
|
||||||
STR_1870 :Number of complete rotations
|
STR_1870 :Number of complete rotations
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ public:
|
|||||||
auto staffTypeStringId = _staffList.size() == 1 ? namingConvention.Singular : namingConvention.Plural;
|
auto staffTypeStringId = _staffList.size() == 1 ? namingConvention.Singular : namingConvention.Plural;
|
||||||
|
|
||||||
auto ft = Formatter();
|
auto ft = Formatter();
|
||||||
ft.Add<uint16_t>(_staffList.size());
|
ft.Add<uint32_t>(_staffList.size());
|
||||||
ft.Add<StringId>(staffTypeStringId);
|
ft.Add<StringId>(staffTypeStringId);
|
||||||
|
|
||||||
DrawTextBasic(
|
DrawTextBasic(
|
||||||
@@ -320,7 +320,7 @@ public:
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto scrollHeight = static_cast<int16_t>(_staffList.size()) * SCROLLABLE_ROW_HEIGHT;
|
auto scrollHeight = static_cast<int32_t>(_staffList.size()) * SCROLLABLE_ROW_HEIGHT;
|
||||||
auto i = scrollHeight - widgets[WIDX_STAFF_LIST_LIST].bottom + widgets[WIDX_STAFF_LIST_LIST].top + 21;
|
auto i = scrollHeight - widgets[WIDX_STAFF_LIST_LIST].bottom + widgets[WIDX_STAFF_LIST_LIST].top + 21;
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user