From af9f4056510f248c4c9c1335167853bb455e8cc0 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 16 Jun 2009 04:25:21 +0000 Subject: 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 --- apps/plugins/reversi/reversi-gui.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'apps/plugins/reversi') diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index b6bbd5f..2eb6f5b 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c @@ -47,7 +47,6 @@ further options: #include "reversi-strategy.h" #include "reversi-gui.h" -#include "lib/oldmenuapi.h" #include "lib/playback_control.h" PLUGIN_HEADER @@ -375,23 +374,15 @@ static bool reversi_gui_choose_strategy( /* Returns true iff USB ws connected while in the menu */ static bool reversi_gui_menu(void) { - int m, index, num_items, i; + int index, num_items, i; int result; - static const struct menu_item items[] = { - { "Start new game", NULL }, - { "Pass the move", NULL }, - { MENU_TEXT_STRAT_BLACK, NULL }, - { MENU_TEXT_STRAT_WHITE, NULL }, - { MENU_TEXT_WRAP_MODE, NULL }, - { "Playback Control", NULL }, - { "Quit", NULL }, - }; + MENUITEM_STRINGLIST(menu, "Reversi Menu", NULL, + "Start new game", "Pass the move", + MENU_TEXT_STRAT_BLACK, MENU_TEXT_STRAT_WHITE, + MENU_TEXT_WRAP_MODE, "Playback Control", "Quit"); - m = menu_init(items, sizeof(items) / sizeof(*items), - NULL, NULL, NULL, NULL); - - result = menu_show(m); + result = rb->do_menu(&menu, NULL, NULL, false); switch (result) { case 0: /* Start a new game */ @@ -433,8 +424,6 @@ static bool reversi_gui_menu(void) { break; } - menu_exit(m); - return (result == MENU_ATTACHED_USB); } -- cgit v1.1