summaryrefslogtreecommitdiff
path: root/apps/plugins/reversi/reversi-gui.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-06-16 04:25:21 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-06-16 04:25:21 +0000
commitaf9f4056510f248c4c9c1335167853bb455e8cc0 (patch)
treeeff7ad7726083ee605d753bd9aa9e22213b1acf0 /apps/plugins/reversi/reversi-gui.c
parentcb57a568e8dc9def607dc9ab27f515309bd13841 (diff)
downloadrockbox-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/reversi/reversi-gui.c')
-rw-r--r--apps/plugins/reversi/reversi-gui.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c
index b6bbd5f3b1..2eb6f5bb79 100644
--- a/apps/plugins/reversi/reversi-gui.c
+++ b/apps/plugins/reversi/reversi-gui.c
@@ -47,7 +47,6 @@ further options:
47#include "reversi-strategy.h" 47#include "reversi-strategy.h"
48#include "reversi-gui.h" 48#include "reversi-gui.h"
49 49
50#include "lib/oldmenuapi.h"
51#include "lib/playback_control.h" 50#include "lib/playback_control.h"
52 51
53PLUGIN_HEADER 52PLUGIN_HEADER
@@ -375,23 +374,15 @@ static bool reversi_gui_choose_strategy(
375 374
376/* Returns true iff USB ws connected while in the menu */ 375/* Returns true iff USB ws connected while in the menu */
377static bool reversi_gui_menu(void) { 376static bool reversi_gui_menu(void) {
378 int m, index, num_items, i; 377 int index, num_items, i;
379 int result; 378 int result;
380 379
381 static const struct menu_item items[] = { 380 MENUITEM_STRINGLIST(menu, "Reversi Menu", NULL,
382 { "Start new game", NULL }, 381 "Start new game", "Pass the move",
383 { "Pass the move", NULL }, 382 MENU_TEXT_STRAT_BLACK, MENU_TEXT_STRAT_WHITE,
384 { MENU_TEXT_STRAT_BLACK, NULL }, 383 MENU_TEXT_WRAP_MODE, "Playback Control", "Quit");
385 { MENU_TEXT_STRAT_WHITE, NULL },
386 { MENU_TEXT_WRAP_MODE, NULL },
387 { "Playback Control", NULL },
388 { "Quit", NULL },
389 };
390 384
391 m = menu_init(items, sizeof(items) / sizeof(*items), 385 result = rb->do_menu(&menu, NULL, NULL, false);
392 NULL, NULL, NULL, NULL);
393
394 result = menu_show(m);
395 386
396 switch (result) { 387 switch (result) {
397 case 0: /* Start a new game */ 388 case 0: /* Start a new game */
@@ -433,8 +424,6 @@ static bool reversi_gui_menu(void) {
433 break; 424 break;
434 } 425 }
435 426
436 menu_exit(m);
437
438 return (result == MENU_ATTACHED_USB); 427 return (result == MENU_ATTACHED_USB);
439} 428}
440 429