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 /apps/main_menu.c | |
parent | 052fc4d9b20905804df0ddfa0018491b1c2169fc (diff) | |
download | rockbox-faf157f208dde15fb2258e6e5c48ddfb904f9325.tar.gz rockbox-faf157f208dde15fb2258e6e5c48ddfb904f9325.zip |
Added sound menu, adapted to new menu API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@709 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/main_menu.c')
-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 f4c09828d0..2c23c3185b 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c | |||
@@ -23,42 +23,16 @@ | |||
23 | #include "lcd.h" | 23 | #include "lcd.h" |
24 | #include "button.h" | 24 | #include "button.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | 26 | #include "main_menu.h" | |
27 | void show_splash(void); | 27 | #include "sound_menu.h" |
28 | 28 | ||
29 | #ifdef HAVE_LCD_BITMAP | 29 | #ifdef HAVE_LCD_BITMAP |
30 | |||
31 | #include "screensaver.h" | 30 | #include "screensaver.h" |
32 | extern void tetris(void); | 31 | extern void tetris(void); |
33 | |||
34 | /* recorder menu */ | ||
35 | enum Main_Menu_Ids { | ||
36 | Tetris, Screen_Saver, Splash, Credits | ||
37 | }; | ||
38 | |||
39 | struct menu_items items[] = { | ||
40 | { Tetris, "Tetris", tetris }, | ||
41 | { Screen_Saver, "Screen Saver", screensaver }, | ||
42 | { Splash, "Splash", show_splash }, | ||
43 | { Credits, "Credits", show_credits }, | ||
44 | }; | ||
45 | |||
46 | #else | ||
47 | |||
48 | /* player menu */ | ||
49 | enum Main_Menu_Ids { | ||
50 | Splash, Credits | ||
51 | }; | ||
52 | |||
53 | struct menu_items items[] = { | ||
54 | { Splash, "Splash", show_splash }, | ||
55 | { Credits, "Credits", show_credits }, | ||
56 | }; | ||
57 | |||
58 | #endif | 32 | #endif |
59 | 33 | ||
60 | #ifdef HAVE_LCD_BITMAP | 34 | #ifdef HAVE_LCD_BITMAP |
61 | int show_logo(void) | 35 | static int show_logo(void) |
62 | { | 36 | { |
63 | unsigned char buffer[112 * 8]; | 37 | unsigned char buffer[112 * 8]; |
64 | 38 | ||
@@ -132,6 +106,23 @@ void show_splash(void) | |||
132 | 106 | ||
133 | void main_menu(void) | 107 | void main_menu(void) |
134 | { | 108 | { |
135 | menu_init( items, sizeof(items)/sizeof(struct menu_items) ); | 109 | int m; |
136 | menu_run(); | 110 | enum { |
111 | Tetris, Screen_Saver, Splash, Credits, Sound | ||
112 | }; | ||
113 | |||
114 | /* main menu */ | ||
115 | struct menu_items items[] = { | ||
116 | { Sound, "Sound", sound_menu }, | ||
117 | #ifdef HAVE_LCD_BITMAP | ||
118 | { Tetris, "Tetris", tetris }, | ||
119 | { Screen_Saver, "Screen Saver", screensaver }, | ||
120 | #endif | ||
121 | { Splash, "Splash", show_splash }, | ||
122 | { Credits, "Credits", show_credits } | ||
123 | }; | ||
124 | |||
125 | m=menu_init( items, sizeof items / sizeof(struct menu_items) ); | ||
126 | menu_run(m); | ||
127 | menu_exit(m); | ||
137 | } | 128 | } |