1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Introduce widget::width and widget::height helper functions (#12053)

This commit is contained in:
Aaron van Geffen
2020-06-25 03:44:00 +02:00
committed by GitHub
parent 14a07359b3
commit 681b8d7938
47 changed files with 247 additions and 272 deletions

View File

@@ -366,7 +366,7 @@ static void window_scroll_wheel_input(rct_window* w, int32_t scrollIndex, int32_
if (scroll->flags & VSCROLLBAR_VISIBLE)
{
int32_t size = widget->bottom - widget->top - 1;
int32_t size = widget->height() - 1;
if (scroll->flags & HSCROLLBAR_VISIBLE)
size -= 11;
size = std::max(0, scroll->v_bottom - size);
@@ -374,7 +374,7 @@ static void window_scroll_wheel_input(rct_window* w, int32_t scrollIndex, int32_
}
else
{
int32_t size = widget->right - widget->left - 1;
int32_t size = widget->width() - 1;
if (scroll->flags & VSCROLLBAR_VISIBLE)
size -= 11;
size = std::max(0, scroll->h_right - size);