forked from len0rd/rockbox
Removed lcd_getfontsize(). Removed font parameters to lcd_putsxy and lcd_getstringsize.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2403 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
614272c45f
commit
a4c3b03f15
19 changed files with 156 additions and 171 deletions
|
|
@ -866,33 +866,33 @@ bool set_time(char* string, int timedate[])
|
|||
lcd_puts(0, 1, buffer);
|
||||
|
||||
/* recalculate the positions and offsets */
|
||||
lcd_getstringsize(string, FONT_UI, &width, &prev_line_height);
|
||||
lcd_getstringsize(buffer, FONT_UI, &width, &line_height);
|
||||
lcd_getstringsize(":", FONT_UI, &separator_width, &height);
|
||||
lcd_getstringsize(string, &width, &prev_line_height);
|
||||
lcd_getstringsize(buffer, &width, &line_height);
|
||||
lcd_getstringsize(":", &separator_width, &height);
|
||||
|
||||
strncpy(reffub, buffer, 2);
|
||||
reffub[2] = '\0';
|
||||
lcd_getstringsize(reffub, FONT_UI, &width, &height);
|
||||
lcd_getstringsize(reffub, &width, &height);
|
||||
cursor[0][INDEX_X] = 0;
|
||||
cursor[0][INDEX_Y] = prev_line_height;
|
||||
cursor[0][INDEX_WIDTH] = width;
|
||||
|
||||
strncpy(reffub, buffer + 3, 2);
|
||||
reffub[2] = '\0';
|
||||
lcd_getstringsize(reffub, FONT_UI, &width, &height);
|
||||
lcd_getstringsize(reffub, &width, &height);
|
||||
cursor[1][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width;
|
||||
cursor[1][INDEX_Y] = prev_line_height;
|
||||
cursor[1][INDEX_WIDTH] = width;
|
||||
|
||||
strncpy(reffub, buffer + 6, 2);
|
||||
reffub[2] = '\0';
|
||||
lcd_getstringsize(reffub, FONT_UI, &width, &height);
|
||||
lcd_getstringsize(reffub, &width, &height);
|
||||
cursor[2][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width +
|
||||
cursor[1][INDEX_WIDTH] + separator_width;
|
||||
cursor[2][INDEX_Y] = prev_line_height;
|
||||
cursor[2][INDEX_WIDTH] = width;
|
||||
|
||||
lcd_getstringsize(buffer, FONT_UI, &width, &prev_line_height);
|
||||
lcd_getstringsize(buffer, &width, &prev_line_height);
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "%s 20%02d %s %02d ",
|
||||
dayname[timedate[6]],
|
||||
|
|
@ -902,22 +902,22 @@ bool set_time(char* string, int timedate[])
|
|||
lcd_puts(0, 2, buffer);
|
||||
|
||||
/* recalculate the positions and offsets */
|
||||
lcd_getstringsize(buffer, FONT_UI, &width, &line_height);
|
||||
lcd_getstringsize(buffer, &width, &line_height);
|
||||
strncpy(reffub, buffer, 3);
|
||||
reffub[3] = '\0';
|
||||
lcd_getstringsize(reffub, FONT_UI, &weekday_width, &height);
|
||||
lcd_getstringsize(" ", FONT_UI, &separator_width, &height);
|
||||
lcd_getstringsize(reffub, &weekday_width, &height);
|
||||
lcd_getstringsize(" ", &separator_width, &height);
|
||||
|
||||
strncpy(reffub, buffer + 4, 4);
|
||||
reffub[4] = '\0';
|
||||
lcd_getstringsize(reffub, FONT_UI, &width, &height);
|
||||
lcd_getstringsize(reffub, &width, &height);
|
||||
cursor[3][INDEX_X] = weekday_width + separator_width;
|
||||
cursor[3][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height;
|
||||
cursor[3][INDEX_WIDTH] = width;
|
||||
|
||||
strncpy(reffub, buffer + 9, 3);
|
||||
reffub[3] = '\0';
|
||||
lcd_getstringsize(reffub, FONT_UI, &width, &height);
|
||||
lcd_getstringsize(reffub, &width, &height);
|
||||
cursor[4][INDEX_X] = weekday_width + separator_width +
|
||||
cursor[3][INDEX_WIDTH] + separator_width;
|
||||
cursor[4][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height;
|
||||
|
|
@ -925,7 +925,7 @@ bool set_time(char* string, int timedate[])
|
|||
|
||||
strncpy(reffub, buffer + 13, 2);
|
||||
reffub[2] = '\0';
|
||||
lcd_getstringsize(reffub, FONT_UI, &width, &height);
|
||||
lcd_getstringsize(reffub, &width, &height);
|
||||
cursor[5][INDEX_X] = weekday_width + separator_width +
|
||||
cursor[3][INDEX_WIDTH] + separator_width +
|
||||
cursor[4][INDEX_WIDTH] + separator_width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue