diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-04-30 13:17:11 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-04-30 13:17:11 +0000 |
| commit | 000cff80a1f27ca3a44213fea900bc6763b3e974 (patch) | |
| tree | 3bc810d3239841ee7b91bb898a59c8188c00bb6a | |
| parent | 2df9d9a16c044c331d11b43e5367f4088b710544 (diff) | |
| download | rockbox-000cff80a1f27ca3a44213fea900bc6763b3e974.zip rockbox-000cff80a1f27ca3a44213fea900bc6763b3e974.tar.gz rockbox-000cff80a1f27ca3a44213fea900bc6763b3e974.tar.bz2 rockbox-000cff80a1f27ca3a44213fea900bc6763b3e974.tar.xz | |
call the dir browser when selected
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@328 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | uisimulator/app.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/uisimulator/app.c b/uisimulator/app.c index 5875ac2..bb0c8317 100644 --- a/uisimulator/app.c +++ b/uisimulator/app.c @@ -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 |