mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 12:03:07 +01:00
Introduce widget::midX and widget::midY helper functions
This commit is contained in:
@@ -1058,7 +1058,7 @@ static void window_editor_object_selection_paint(rct_window* w, rct_drawpixelinf
|
||||
|
||||
// Draw name of object
|
||||
{
|
||||
auto screenPos = w->windowPos + ScreenCoordsXY{ (widget->left + widget->right) / 2 + 1, widget->bottom + 3 };
|
||||
auto screenPos = w->windowPos + ScreenCoordsXY{ widget->midX() + 1, widget->bottom + 3 };
|
||||
width = w->width - w->widgets[WIDX_LIST].right - 6;
|
||||
auto ft = Formatter::Common();
|
||||
ft.Add<rct_string_id>(STR_STRING);
|
||||
|
||||
Reference in New Issue
Block a user