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

This commit is contained in:
Aaron van Geffen authored and GitHub committed 2020-06-24 22:44:00 -03:00
1 parent 14a07359b3
commit 681b8d7938
47 files changed
+247 -272

No files matched your search

+2 -2
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);