mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 15:54:31 +01:00
Introduce widget::midX and widget::midY helper functions
This commit is contained in:
@@ -952,7 +952,7 @@ void window_staff_overview_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
auto ft = Formatter::Common();
|
||||
peep->FormatActionTo(ft);
|
||||
rct_widget* widget = &w->widgets[WIDX_BTM_LABEL];
|
||||
auto screenPos = w->windowPos + ScreenCoordsXY{ (widget->left + widget->right) / 2, widget->top };
|
||||
auto screenPos = w->windowPos + ScreenCoordsXY{ widget->midX(), widget->top };
|
||||
int32_t width = widget->width();
|
||||
gfx_draw_string_centred_clipped(dpi, STR_BLACK_STRING, gCommonFormatArgs, COLOUR_BLACK, screenPos, width);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user