summaryrefslogtreecommitdiff
path: root/apps/plugins/fireworks.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/fireworks.c')
-rw-r--r--apps/plugins/fireworks.c25
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] = {
287int fps_values[9] = { 286int 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
290static const struct menu_item items[] = { 289MENUITEM_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 */
303void init_all(void) 295void init_all(void)
@@ -348,7 +340,7 @@ void init_rocket(int rocket)
348/* startup/configuration menu. */ 340/* startup/configuration menu. */
349void fireworks_menu(void) 341void 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 */