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.tar.gz rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.zip |
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 168a67baa9..d237007460 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "lib/oldmenuapi.h" | ||
23 | #include "lib/helper.h" | 22 | #include "lib/helper.h" |
24 | #include "lib/playback_control.h" | 23 | #include "lib/playback_control.h" |
25 | 24 | ||
@@ -287,17 +286,10 @@ static const struct opt_items fps_settings[9] = { | |||
287 | int fps_values[9] = { | 286 | int fps_values[9] = { |
288 | 20, 25, 30, 35, 40, 45, 50, 55, 60 }; | 287 | 20, 25, 30, 35, 40, 45, 50, 55, 60 }; |
289 | 288 | ||
290 | static const struct menu_item items[] = { | 289 | MENUITEM_STRINGLIST(menu, "Fireworks Menu", NULL, |
291 | { "Start Demo", NULL }, | 290 | "Start Demo", "Auto-Fire", "Particles Per Firework", |
292 | { "Auto-Fire", NULL }, | 291 | "Particle Life", "Gravity", "Show Rockets", |
293 | { "Particles Per Firework", NULL }, | 292 | "FPS (Speed)", "Playback Control", "Quit"); |
294 | { "Particle Life", NULL }, | ||
295 | { "Gravity", NULL }, | ||
296 | { "Show Rockets", NULL }, | ||
297 | { "FPS (Speed)", NULL }, | ||
298 | { "Playback Control", NULL }, | ||
299 | { "Quit", NULL } | ||
300 | }; | ||
301 | 293 | ||
302 | /* called on startup. initializes all variables, etc */ | 294 | /* called on startup. initializes all variables, etc */ |
303 | void init_all(void) | 295 | void init_all(void) |
@@ -348,7 +340,7 @@ void init_rocket(int rocket) | |||
348 | /* startup/configuration menu. */ | 340 | /* startup/configuration menu. */ |
349 | void fireworks_menu(void) | 341 | void fireworks_menu(void) |
350 | { | 342 | { |
351 | int m, result; | 343 | int selected = 0, result; |
352 | bool menu_quit = false; | 344 | bool menu_quit = false; |
353 | 345 | ||
354 | rb->lcd_setfont(FONT_UI); | 346 | rb->lcd_setfont(FONT_UI); |
@@ -359,14 +351,11 @@ void fireworks_menu(void) | |||
359 | rb->lcd_clear_display(); | 351 | rb->lcd_clear_display(); |
360 | rb->lcd_update(); | 352 | rb->lcd_update(); |
361 | 353 | ||
362 | m = menu_init(items, sizeof(items) / sizeof(*items), | ||
363 | NULL, NULL, NULL, NULL); | ||
364 | |||
365 | rb->button_clear_queue(); | 354 | rb->button_clear_queue(); |
366 | 355 | ||
367 | while(!menu_quit) | 356 | while(!menu_quit) |
368 | { | 357 | { |
369 | result = menu_show(m); | 358 | result = rb->do_menu(&menu, &selected, NULL, false); |
370 | 359 | ||
371 | switch(result) | 360 | switch(result) |
372 | { | 361 | { |
@@ -419,8 +408,6 @@ void fireworks_menu(void) | |||
419 | break; | 408 | break; |
420 | } | 409 | } |
421 | } | 410 | } |
422 | |||
423 | menu_exit(m); | ||
424 | } | 411 | } |
425 | 412 | ||
426 | /* this is the plugin entry point */ | 413 | /* this is the plugin entry point */ |