diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-06-16 04:25:21 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-06-16 04:25:21 +0000 |
| commit | af9f4056510f248c4c9c1335167853bb455e8cc0 (patch) | |
| tree | eff7ad7726083ee605d753bd9aa9e22213b1acf0 /apps/plugins/fireworks.c | |
| parent | cb57a568e8dc9def607dc9ab27f515309bd13841 (diff) | |
| download | rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.zip rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.gz rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.bz2 rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.xz | |
Accept FS#10094 by Teruaki Kawashima:
Replace the old menu API with the "new" one (a very long time overdue so huge thanks for the work.)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21306 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/fireworks.c')
| -rw-r--r-- | apps/plugins/fireworks.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c index 168a67b..d237007 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c @@ -19,7 +19,6 @@ * ****************************************************************************/ #include "plugin.h" -#include "lib/oldmenuapi.h" #include "lib/helper.h" #include "lib/playback_control.h" @@ -287,17 +286,10 @@ static const struct opt_items fps_settings[9] = { int fps_values[9] = { 20, 25, 30, 35, 40, 45, 50, 55, 60 }; -static const struct menu_item items[] = { - { "Start Demo", NULL }, - { "Auto-Fire", NULL }, - { "Particles Per Firework", NULL }, - { "Particle Life", NULL }, - { "Gravity", NULL }, - { "Show Rockets", NULL }, - { "FPS (Speed)", NULL }, - { "Playback Control", NULL }, - { "Quit", NULL } -}; +MENUITEM_STRINGLIST(menu, "Fireworks Menu", NULL, + "Start Demo", "Auto-Fire", "Particles Per Firework", + "Particle Life", "Gravity", "Show Rockets", + "FPS (Speed)", "Playback Control", "Quit"); /* called on startup. initializes all variables, etc */ void init_all(void) @@ -348,7 +340,7 @@ void init_rocket(int rocket) /* startup/configuration menu. */ void fireworks_menu(void) { - int m, result; + int selected = 0, result; bool menu_quit = false; rb->lcd_setfont(FONT_UI); @@ -359,14 +351,11 @@ void fireworks_menu(void) rb->lcd_clear_display(); rb->lcd_update(); - m = menu_init(items, sizeof(items) / sizeof(*items), - NULL, NULL, NULL, NULL); - rb->button_clear_queue(); while(!menu_quit) { - result = menu_show(m); + result = rb->do_menu(&menu, &selected, NULL, false); switch(result) { @@ -419,8 +408,6 @@ void fireworks_menu(void) break; } } - - menu_exit(m); } /* this is the plugin entry point */ |