diff options
| author | Björn Stenberg <bjorn@haxx.se> | 2002-05-26 17:11:02 +0000 |
|---|---|---|
| committer | Björn Stenberg <bjorn@haxx.se> | 2002-05-26 17:11:02 +0000 |
| commit | faf157f208dde15fb2258e6e5c48ddfb904f9325 (patch) | |
| tree | 40052beccb952eb2d906861bde75835ca9a3c593 | |
| parent | 052fc4d9b20905804df0ddfa0018491b1c2169fc (diff) | |
| download | rockbox-faf157f208dde15fb2258e6e5c48ddfb904f9325.zip rockbox-faf157f208dde15fb2258e6e5c48ddfb904f9325.tar.gz rockbox-faf157f208dde15fb2258e6e5c48ddfb904f9325.tar.bz2 rockbox-faf157f208dde15fb2258e6e5c48ddfb904f9325.tar.xz | |
Added sound menu, adapted to new menu API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@709 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/main_menu.c | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c index f4c0982..2c23c31 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -23,42 +23,16 @@ #include "lcd.h" #include "button.h" #include "kernel.h" - -void show_splash(void); +#include "main_menu.h" +#include "sound_menu.h" #ifdef HAVE_LCD_BITMAP - #include "screensaver.h" extern void tetris(void); - -/* recorder menu */ -enum Main_Menu_Ids { - Tetris, Screen_Saver, Splash, Credits -}; - -struct menu_items items[] = { - { Tetris, "Tetris", tetris }, - { Screen_Saver, "Screen Saver", screensaver }, - { Splash, "Splash", show_splash }, - { Credits, "Credits", show_credits }, -}; - -#else - -/* player menu */ -enum Main_Menu_Ids { - Splash, Credits -}; - -struct menu_items items[] = { - { Splash, "Splash", show_splash }, - { Credits, "Credits", show_credits }, -}; - #endif #ifdef HAVE_LCD_BITMAP -int show_logo(void) +static int show_logo(void) { unsigned char buffer[112 * 8]; @@ -132,6 +106,23 @@ void show_splash(void) void main_menu(void) { - menu_init( items, sizeof(items)/sizeof(struct menu_items) ); - menu_run(); + int m; + enum { + Tetris, Screen_Saver, Splash, Credits, Sound + }; + + /* main menu */ + struct menu_items items[] = { + { Sound, "Sound", sound_menu }, +#ifdef HAVE_LCD_BITMAP + { Tetris, "Tetris", tetris }, + { Screen_Saver, "Screen Saver", screensaver }, +#endif + { Splash, "Splash", show_splash }, + { Credits, "Credits", show_credits } + }; + + m=menu_init( items, sizeof items / sizeof(struct menu_items) ); + menu_run(m); + menu_exit(m); } |