diff options
author | Krow Savcik <krow@savcik.xyz> | 2024-07-19 16:03:17 +0300 |
---|---|---|
committer | Krow Savcik <krow@savcik.xyz> | 2024-07-19 16:03:17 +0300 |
commit | 689d8faa8638c1d14f79c7960afe3139bd042f96 (patch) | |
tree | 9cde927210182d800d5bdb89d16ff1a59a776b80 /src/ui.c | |
parent | 39c5caccf8486d4a2ffc551b8acf0806fd832d4f (diff) |
fix: update sbdf file
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -754,7 +754,7 @@ ui_panel_timeline_redraw(UIPanelTimeline *p) dest.w = 140; dest.h = 24; SDL_RenderSetViewport(ren, &dest); - SBDF_SDLPrint(ren, font, cur_canvas->layers[i]->name, 2, 5); + SBDF_SDLPrint(ren, font, cur_canvas->layers[i]->name, 2, 17); } /* Draw Frame row */ @@ -774,7 +774,7 @@ ui_panel_timeline_redraw(UIPanelTimeline *p) SDL_RenderDrawLine(ren, 22, 2, 22, 21); SDL_RenderDrawLine(ren, 23, 2, 23, 21); SDL_SetRenderDrawColor(ren, INTTOCOLA(0x000000ff)); - j = i; k = 2; + j = i+1; k = 2; text[3] = '\0'; while (j) { text[k--] = (j%10) + '0'; @@ -786,7 +786,15 @@ ui_panel_timeline_redraw(UIPanelTimeline *p) text[k] = text[j]; } - SBDF_SDLPrint(ren, font, text, 9, 5); + SBDF_GetSize(font, text, &k, NULL, &j, NULL); + j -= k; + if (j > 24) { + j = 9; + } else { + j = (24 - j)/2 - k; + } + + SBDF_SDLPrint(ren, font, text, j, 17); } } SDL_RenderSetViewport(ren, NULL); |