1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 11:15:13 +01:00

set font when drawing checkboxes, extracted draw string left centred to new method

This commit is contained in:
IntelOrca
2015-06-17 16:21:50 +01:00
parent f4c46c479d
commit 542eb057d9
4 changed files with 19 additions and 6 deletions

View File

@@ -766,11 +766,7 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
colour |= 0x40;
}
// TODO extract this to a string method and maybe a draw vertically centred
char *buffer = (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER;
format_string(buffer, (rct_string_id)widget->image, (void*)0x013CE952);
int height = string_get_height_raw(buffer);
gfx_draw_string(dpi, buffer, colour, l + 14, yMid - (height / 2));
gfx_draw_string_left_centred(dpi, (rct_string_id)widget->image, (void*)0x013CE952, colour, l + 14, yMid);
}
/**