diff options
author | Franklin Wei <me@fwei.tk> | 2017-07-26 23:27:19 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-07-27 19:09:50 -0400 |
commit | 1a5149a0aea30c5701e5bd2a1c219f7e2a2b9575 (patch) | |
tree | 3565720ed8b9943953aa271cefd7b93671b56006 | |
parent | aa7b168fd7268d557af84a70ba155e69048d9e59 (diff) | |
download | rockbox-1a5149a0aea30c5701e5bd2a1c219f7e2a2b9575.tar.gz rockbox-1a5149a0aea30c5701e5bd2a1c219f7e2a2b9575.zip |
puzzles: tweak text positioning
-rw-r--r-- | apps/plugins/puzzles/rockbox.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index b193a85430..379b4230df 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c | |||
@@ -277,14 +277,10 @@ static void rb_draw_text(void *handle, int x, int y, int fonttype, | |||
277 | int w, h; | 277 | int w, h; |
278 | rb->lcd_getstringsize(text, &w, &h); | 278 | rb->lcd_getstringsize(text, &w, &h); |
279 | 279 | ||
280 | static int cap_h = -1; | ||
281 | if(cap_h < 0) | ||
282 | rb->lcd_getstringsize("X", NULL, &cap_h); | ||
283 | |||
284 | if(align & ALIGN_VNORMAL) | 280 | if(align & ALIGN_VNORMAL) |
285 | y -= h; | 281 | y -= h; |
286 | else if(align & ALIGN_VCENTRE) | 282 | else if(align & ALIGN_VCENTRE) |
287 | y -= cap_h / 2; | 283 | y -= h / 2; |
288 | 284 | ||
289 | if(align & ALIGN_HCENTRE) | 285 | if(align & ALIGN_HCENTRE) |
290 | x -= w / 2; | 286 | x -= w / 2; |