1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Fix #14674: Recent Messages only shows at most 6 or 7 notifications

This commit is contained in:
GalBr
2022-02-11 22:47:08 +02:00
committed by GitHub
parent 29083f4cb2
commit cb83d8ff05
3 changed files with 8 additions and 4 deletions

View File

@@ -42,6 +42,8 @@ static rct_widget window_news_widgets[] = {
WIDGETS_END,
};
// clang-format on
class NewsWindow final : public Window
{
private:
@@ -120,8 +122,8 @@ public:
ScreenSize OnScrollGetSize(int32_t scrollIndex) override
{
static int32_t _scrollHeight = static_cast<int32_t>(gNewsItems.GetArchived().size()) * CalculateItemHeight();
return {WW, _scrollHeight};
int32_t scrollHeight = static_cast<int32_t>(gNewsItems.GetArchived().size()) * CalculateItemHeight();
return { WW, scrollHeight };
}
void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override
@@ -190,7 +192,8 @@ public:
// Background
gfx_fill_rect_inset(
&dpi, { -1, y, 383, y + itemHeight - 1 }, colours[1], (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_GREY));
&dpi, { -1, y, 383, y + itemHeight - 1 }, colours[1],
(INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_GREY));
// Date text
{
@@ -218,7 +221,6 @@ public:
{
press = INSET_RECT_FLAG_BORDER_INSET;
}
}
gfx_fill_rect_inset(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 23, 23 } }, colours[2], press);