forked from len0rd/rockbox
metronome: increase rectangle sizes to use a greater portion of the screen
Change-Id: I6c0b3faa173f5b68282c8e75b039e61d2362f749
This commit is contained in:
parent
4ebf2edf32
commit
e3fb41919d
1 changed files with 9 additions and 6 deletions
|
|
@ -847,6 +847,9 @@ static void metronome_draw(struct screen* display, int state)
|
||||||
ps = part;
|
ps = part;
|
||||||
display->clear_display();
|
display->clear_display();
|
||||||
display->setfont(FONT_SYSFIXED);
|
display->setfont(FONT_SYSFIXED);
|
||||||
|
int rectangle_height = display->lcdheight - ((SYSFONT_HEIGHT + 1) * 7);
|
||||||
|
if (rectangle_height < 12)
|
||||||
|
rectangle_height = 12;
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -863,18 +866,18 @@ static void metronome_draw(struct screen* display, int state)
|
||||||
case 1:
|
case 1:
|
||||||
if((beat+1) % 2 == 0)
|
if((beat+1) % 2 == 0)
|
||||||
display->fillrect( display->lcdwidth/2, 0
|
display->fillrect( display->lcdwidth/2, 0
|
||||||
, display->lcdwidth, 12 );
|
, display->lcdwidth, rectangle_height );
|
||||||
else
|
else
|
||||||
display->fillrect( 0, 0
|
display->fillrect( 0, 0
|
||||||
, display->lcdwidth/2-1, 12 );
|
, display->lcdwidth/2-1, rectangle_height );
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if((beat+1) % 2 == 0)
|
if((beat+1) % 2 == 0)
|
||||||
display->fillrect( display->lcdwidth/2, display->lcdheight-13
|
display->fillrect( display->lcdwidth/2, display->lcdheight - rectangle_height - 1
|
||||||
, display->lcdwidth, 12 );
|
, display->lcdwidth, rectangle_height );
|
||||||
else
|
else
|
||||||
display->fillrect( 0, display->lcdheight-13
|
display->fillrect( 0, display->lcdheight - rectangle_height - 1
|
||||||
, display->lcdwidth/2-1, 12 );
|
, display->lcdwidth/2-1, rectangle_height );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
display->puts((textlen-3)/2,0, "o.O");
|
display->puts((textlen-3)/2,0, "o.O");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue