forked from len0rd/rockbox
Added sound menu, adapted to new menu API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@709 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
052fc4d9b2
commit
faf157f208
1 changed files with 22 additions and 31 deletions
|
|
@ -23,42 +23,16 @@
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
#include "main_menu.h"
|
||||||
void show_splash(void);
|
#include "sound_menu.h"
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
||||||
#include "screensaver.h"
|
#include "screensaver.h"
|
||||||
extern void tetris(void);
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int show_logo(void)
|
static int show_logo(void)
|
||||||
{
|
{
|
||||||
unsigned char buffer[112 * 8];
|
unsigned char buffer[112 * 8];
|
||||||
|
|
||||||
|
|
@ -132,6 +106,23 @@ void show_splash(void)
|
||||||
|
|
||||||
void main_menu(void)
|
void main_menu(void)
|
||||||
{
|
{
|
||||||
menu_init( items, sizeof(items)/sizeof(struct menu_items) );
|
int m;
|
||||||
menu_run();
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue