mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
puzzles: tweak text positioning
This commit is contained in:
parent
aa7b168fd7
commit
1a5149a0ae
1 changed files with 1 additions and 5 deletions
|
|
@ -277,14 +277,10 @@ static void rb_draw_text(void *handle, int x, int y, int fonttype,
|
|||
int w, h;
|
||||
rb->lcd_getstringsize(text, &w, &h);
|
||||
|
||||
static int cap_h = -1;
|
||||
if(cap_h < 0)
|
||||
rb->lcd_getstringsize("X", NULL, &cap_h);
|
||||
|
||||
if(align & ALIGN_VNORMAL)
|
||||
y -= h;
|
||||
else if(align & ALIGN_VCENTRE)
|
||||
y -= cap_h / 2;
|
||||
y -= h / 2;
|
||||
|
||||
if(align & ALIGN_HCENTRE)
|
||||
x -= w / 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue