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/reversi | |
| parent | cb57a568e8dc9def607dc9ab27f515309bd13841 (diff) | |
| download | rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.zip rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.gz rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.bz2 rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.xz | |
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')
| -rw-r--r-- | apps/plugins/reversi/reversi-gui.c | 23 |
1 files changed, 6 insertions, 17 deletions
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); } |