1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 05:53:02 +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

@@ -238,7 +238,7 @@ static void window_install_track_paint(rct_window* w, rct_drawpixelinfo* dpi)
drawing_engine_invalidate_image(SPR_TEMP);
gfx_draw_sprite(dpi, SPR_TEMP, screenPos, 0);
screenPos = w->windowPos + ScreenCoordsXY{ (widget->left + widget->right) / 2, widget->bottom - 12 };
screenPos = w->windowPos + ScreenCoordsXY{ widget->midX(), widget->bottom - 12 };
// Warnings
const TrackDesign* td6 = _trackDesign.get();