summaryrefslogtreecommitdiff
path: root/apps/plugins/pacbox/pacbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pacbox/pacbox.c')
-rw-r--r--apps/plugins/pacbox/pacbox.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c
index 560e185704..e7b92c38cf 100644
--- a/apps/plugins/pacbox/pacbox.c
+++ b/apps/plugins/pacbox/pacbox.c
@@ -29,7 +29,6 @@
29#include "pacbox.h" 29#include "pacbox.h"
30#include "pacbox_lcd.h" 30#include "pacbox_lcd.h"
31#include "lib/configfile.h" 31#include "lib/configfile.h"
32#include "lib/oldmenuapi.h"
33 32
34PLUGIN_HEADER 33PLUGIN_HEADER
35PLUGIN_IRAM_DECLARE 34PLUGIN_IRAM_DECLARE
@@ -138,7 +137,7 @@ static int settings_to_dip(struct pacman_settings settings)
138 137
139static bool pacbox_menu(void) 138static bool pacbox_menu(void)
140{ 139{
141 int m; 140 int selected=0;
142 int result; 141 int result;
143 int menu_quit=0; 142 int menu_quit=0;
144 int new_setting; 143 int new_setting;
@@ -173,23 +172,14 @@ static bool pacbox_menu(void)
173 { "Alternate", -1 }, 172 { "Alternate", -1 },
174 }; 173 };
175 174
176 static const struct menu_item items[] = { 175 MENUITEM_STRINGLIST(menu, "Pacbox Menu", NULL,
177 { "Difficulty", NULL }, 176 "Difficulty", "Pacmen Per Game", "Bonus Life",
178 { "Pacmen Per Game", NULL }, 177 "Ghost Names", "Display FPS", "Restart", "Quit");
179 { "Bonus Life", NULL },
180 { "Ghost Names", NULL },
181 { "Display FPS", NULL },
182 { "Restart", NULL },
183 { "Quit", NULL },
184 };
185
186 m = menu_init(items, sizeof(items) / sizeof(*items),
187 NULL, NULL, NULL, NULL);
188 178
189 rb->button_clear_queue(); 179 rb->button_clear_queue();
190 180
191 while (!menu_quit) { 181 while (!menu_quit) {
192 result=menu_show(m); 182 result=rb->do_menu(&menu, &selected, NULL, false);
193 183
194 switch(result) 184 switch(result)
195 { 185 {
@@ -243,8 +233,6 @@ static bool pacbox_menu(void)
243 } 233 }
244 } 234 }
245 235
246 menu_exit(m);
247
248 if (need_restart) { 236 if (need_restart) {
249 init_PacmanMachine(settings_to_dip(settings)); 237 init_PacmanMachine(settings_to_dip(settings));
250 } 238 }