From 000cff80a1f27ca3a44213fea900bc6763b3e974 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 30 Apr 2002 13:17:11 +0000 Subject: call the dir browser when selected git-svn-id: svn://svn.rockbox.org/rockbox/trunk@328 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/app.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'uisimulator/app.c') diff --git a/uisimulator/app.c b/uisimulator/app.c index 5875ac2262..bb0c831729 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 #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 -- cgit v1.2.3