1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00

Introduce widget::midX and widget::midY helper functions

This commit is contained in:
Aaron van Geffen
2020-06-25 10:31:15 +02:00
parent 681b8d7938
commit 2e153a7e95
25 changed files with 61 additions and 84 deletions

View File

@@ -204,7 +204,7 @@ static void window_about_openrct2_common_paint(rct_window* w, rct_drawpixelinfo*
const auto& aboutOpenRCT2 = w->widgets[WIDX_TAB_ABOUT_OPENRCT2];
const auto& aboutRCT2 = w->widgets[WIDX_TAB_ABOUT_RCT2];
int32_t y = w->windowPos.y + ((aboutOpenRCT2.top + aboutOpenRCT2.bottom) / 2) - 3;
int32_t y = w->windowPos.y + aboutOpenRCT2.midY() - 3;
ScreenCoordsXY aboutOpenRCT2Coords(w->windowPos.x + aboutOpenRCT2.left + 45, y);
ScreenCoordsXY aboutRCT2Coords(w->windowPos.x + aboutRCT2.left + 45, y);