1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +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

@@ -378,8 +378,8 @@ void window_player_overview_paint(rct_window* w, rct_drawpixelinfo* dpi)
ft.Add<const char*>(buffer);
gfx_draw_string_centred_clipped(
dpi, STR_STRING, gCommonFormatArgs, COLOUR_BLACK,
w->windowPos + ScreenCoordsXY{ (widget->left + widget->right - 11) / 2, widget->top }, widget->width() - 8);
dpi, STR_STRING, gCommonFormatArgs, COLOUR_BLACK, w->windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top },
widget->width() - 8);
}
// Draw ping