forked from len0rd/rockbox
call the dir browser when selected
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@328 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2df9d9a16c
commit
000cff80a1
1 changed files with 17 additions and 11 deletions
|
|
@ -22,6 +22,8 @@
|
|||
#include "button.h"
|
||||
#include "kernel.h"
|
||||
|
||||
#include "tree.h"
|
||||
|
||||
#ifdef SIMULATOR
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
|
@ -39,8 +41,10 @@ void menu_init(void)
|
|||
{
|
||||
lcd_puts(6, 0, "Rockabox", 0);
|
||||
lcd_puts(6, 8, "Boxrock", 0);
|
||||
lcd_puts(6, 16, "Robkoxx", 0);
|
||||
lcd_puts(6, 16, "Browse", 0);
|
||||
#define LINE_BROWSE 2
|
||||
lcd_puts(6, 24, "Tetris", 0);
|
||||
#define LINE_TETRIS 3
|
||||
lcd_puts(8, 38, "Rockbox!", 2);
|
||||
|
||||
lcd_puts(0, cursor, "-", 0);
|
||||
|
|
@ -75,23 +79,25 @@ void app_main(void)
|
|||
}
|
||||
break;
|
||||
case BUTTON_RIGHT:
|
||||
if(cursor == (MAX_LINE * LINE_HEIGHT)) {
|
||||
case BUTTON_PLAY:
|
||||
switch(cursor) {
|
||||
case (LINE_TETRIS * LINE_HEIGHT):
|
||||
lcd_clearrect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||
tetris();
|
||||
lcd_clearrect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||
menu_init();
|
||||
break;
|
||||
case (LINE_BROWSE * LINE_HEIGHT):
|
||||
lcd_clearrect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||
dirbrowse("/");
|
||||
lcd_update();
|
||||
while((!button_get()));
|
||||
lcd_clearrect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||
menu_init();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
lcd_update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
// for win32 simulator compability
|
||||
void main (void)
|
||||
{
|
||||
app_main ();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue