0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 22:58:04 +03:00

fix text centering, ie in menu

This commit is contained in:
OneOfEleven
2023-10-23 11:11:28 +01:00
parent 61f48bf629
commit 0d36e997d4
4 changed files with 41 additions and 39 deletions

View File

@ -105,7 +105,7 @@ void UI_print_string(
uint8_t *f_buf;
if (end > start)
start += (((end - start) - (length * (char_width - 1))) + 1) / 2;
start += ((end - start) - (length * char_spacing)) / 2;
f_buf = g_frame_buffer[line] + start;
for (i = 0; i < length; i++)