Accept the first patch at FS#9953 - Add Playback Control to more plugins, by Joshua Simmons
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20111 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
af59e2ac31
commit
15dbde1ab7
|
@ -28,6 +28,7 @@
|
|||
#include "lib/xlcd.h"
|
||||
#include "lib/pluginlib_actions.h"
|
||||
#include "lib/fixedpoint.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -2398,7 +2399,8 @@ static int bubbles(struct game_context* bb) {
|
|||
********************/
|
||||
MENUITEM_STRINGLIST(menu,"Bubbles Menu",NULL,
|
||||
"Start New Game", "Resume Game",
|
||||
"Level", "Display High Scores", "Quit");
|
||||
"Level", "Display High Scores", "Playback Control",
|
||||
"Quit");
|
||||
while(!startgame){
|
||||
switch (rb->do_menu(&menu, NULL, NULL, false))
|
||||
{
|
||||
|
@ -2421,7 +2423,10 @@ static int bubbles(struct game_context* bb) {
|
|||
case 3: /* High scores */
|
||||
bubbles_displayscores(bb);
|
||||
break;
|
||||
case 4: /* quit */
|
||||
case 4: /* Playback Control */
|
||||
playback_control(NULL);
|
||||
break;
|
||||
case 5: /* quit */
|
||||
return BB_QUIT;
|
||||
case MENU_ATTACHED_USB:
|
||||
bubbles_callback(bb);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
||||
#include "lib/playback_control.h"
|
||||
#include "gnuchess.h"
|
||||
#include "opening.h"
|
||||
#include "chessbox_pgn.h"
|
||||
|
@ -587,7 +588,8 @@ static int cb_menu(void)
|
|||
bool menu_quit = false;
|
||||
|
||||
MENUITEM_STRINGLIST(menu,"Chessbox Menu",NULL,"New Game","Resume Game",
|
||||
"Save Game", "Restore Game", "Quit");
|
||||
"Save Game", "Restore Game", "Playback Control",
|
||||
"Quit");
|
||||
|
||||
while(!menu_quit)
|
||||
{
|
||||
|
@ -610,6 +612,9 @@ static int cb_menu(void)
|
|||
menu_quit = true;
|
||||
break;
|
||||
case 4:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
case 5:
|
||||
result = COMMAND_QUIT;
|
||||
menu_quit = true;
|
||||
break;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "lib/xlcd.h"
|
||||
#include "lib/configfile.h"
|
||||
#include "lib/helper.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -704,7 +705,7 @@ static int chopMenu(int menunum)
|
|||
};
|
||||
|
||||
MENUITEM_STRINGLIST(menu,"Chopper Menu",NULL,"Start New Game","Resume Game",
|
||||
"Level","Quit");
|
||||
"Level","Playback Control","Quit");
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
rb->lcd_set_foreground(LCD_WHITE);
|
||||
|
@ -736,6 +737,9 @@ static int chopMenu(int menunum)
|
|||
rb->set_option("Level", &iLevelMode, INT, levels, 2, NULL);
|
||||
break;
|
||||
case 3:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
case 4:
|
||||
menu_quit=true;
|
||||
res = PLUGIN_OK;
|
||||
break;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "clock.h"
|
||||
#include "clock_bitmaps.h"
|
||||
#include "clock_settings.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
/* Option structs (possible selections per each option) */
|
||||
static const struct opt_items noyes_text[] = {
|
||||
|
@ -210,7 +211,8 @@ bool main_menu(void){
|
|||
bool exit_clock=false;
|
||||
|
||||
MENUITEM_STRINGLIST(menu,"Clock Menu",NULL,"View Clock","Mode Selector",
|
||||
"Mode Settings","General Settings","Quit");
|
||||
"Mode Settings","General Settings","Playback Control",
|
||||
"Quit");
|
||||
|
||||
while(!done){
|
||||
switch(rb->do_menu(&menu, &selection, NULL, false)){
|
||||
|
@ -235,6 +237,10 @@ bool main_menu(void){
|
|||
break;
|
||||
|
||||
case 4:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
exit_clock = true;
|
||||
done = true;
|
||||
break;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "plugin.h"
|
||||
#include "lib/oldmenuapi.h"
|
||||
#include "lib/helper.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -289,6 +290,7 @@ static const struct menu_item items[] = {
|
|||
{ "Gravity", NULL },
|
||||
{ "Show Rockets", NULL },
|
||||
{ "FPS (Speed)", NULL },
|
||||
{ "Playback Control", NULL },
|
||||
{ "Quit", NULL }
|
||||
};
|
||||
|
||||
|
@ -403,6 +405,10 @@ void fireworks_menu(void)
|
|||
break;
|
||||
|
||||
case 7:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
quit_plugin = true;
|
||||
menu_quit = true;
|
||||
break;
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
/* what the minesweeper() function can return */
|
||||
|
@ -548,7 +550,7 @@ enum minesweeper_status menu( void )
|
|||
|
||||
MENUITEM_STRINGLIST( menu, "Minesweeper Menu", NULL, "Play Minesweeper",
|
||||
"Mine Percentage", "Number of Rows",
|
||||
"Number of Columns", "Quit" );
|
||||
"Number of Columns", "Playback Control", "Quit" );
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
rb->lcd_set_foreground( rb->global_settings->fg_color );
|
||||
|
@ -579,6 +581,10 @@ enum minesweeper_status menu( void )
|
|||
1, 1, MAX_WIDTH, NULL );
|
||||
break;
|
||||
|
||||
case 4:
|
||||
playback_control( NULL );
|
||||
break;
|
||||
|
||||
default:
|
||||
result = MINESWEEPER_QUIT; /* quit program */
|
||||
menu_quit = true;
|
||||
|
|
|
@ -48,6 +48,7 @@ further options:
|
|||
#include "reversi-gui.h"
|
||||
|
||||
#include "lib/oldmenuapi.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -383,6 +384,7 @@ static bool reversi_gui_menu(void) {
|
|||
{ MENU_TEXT_STRAT_BLACK, NULL },
|
||||
{ MENU_TEXT_STRAT_WHITE, NULL },
|
||||
{ MENU_TEXT_WRAP_MODE, NULL },
|
||||
{ "Playback Control", NULL },
|
||||
{ "Quit", NULL },
|
||||
};
|
||||
|
||||
|
@ -422,7 +424,11 @@ static bool reversi_gui_menu(void) {
|
|||
cursor_wrap_mode = cursor_wrap_mode_values[index];
|
||||
break;
|
||||
|
||||
case 5: /* Quit */
|
||||
case 5:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
|
||||
case 6: /* Quit */
|
||||
quit_plugin = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
#include "plugin.h"
|
||||
#include "lib/playback_control.h"
|
||||
PLUGIN_HEADER
|
||||
|
||||
extern const fb_data superdom_boarditems[];
|
||||
|
@ -714,7 +715,7 @@ int ingame_menu(void) {
|
|||
int selection = 0;
|
||||
|
||||
MENUITEM_STRINGLIST(ingame_menu,"Super Domination Menu",NULL,
|
||||
"Return to game","Save Game", "Quit");
|
||||
"Return to game","Save Game","Playback Control", "Quit");
|
||||
|
||||
selection=rb->do_menu(&ingame_menu,&selection, NULL, false);
|
||||
switch(selection) {
|
||||
|
@ -728,6 +729,9 @@ int ingame_menu(void) {
|
|||
rb->splash(HZ, "Error in save");
|
||||
break;
|
||||
case 2:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
case 3:
|
||||
return SUPERDOM_QUIT;
|
||||
break;
|
||||
case MENU_ATTACHED_USB:
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**************************************************************************/
|
||||
#include "plugin.h"
|
||||
#include "lib/fixedpoint.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -471,7 +472,8 @@ static bool vu_meter_menu(void)
|
|||
bool exit = false;
|
||||
|
||||
MENUITEM_STRINGLIST(menu,"VU Meter Menu",NULL,"Meter Type","Scale",
|
||||
"Minimeters","Decay Speed","Quit");
|
||||
"Minimeters","Decay Speed","Playback Control",
|
||||
"Quit");
|
||||
|
||||
static const struct opt_items meter_type_option[2] = {
|
||||
{ "Analog", -1 },
|
||||
|
@ -536,6 +538,10 @@ static bool vu_meter_menu(void)
|
|||
break;
|
||||
|
||||
case 4:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
exit = true;
|
||||
/* fall through to exit the menu */
|
||||
default:
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "plugin.h"
|
||||
#include "lib/configfile.h"
|
||||
#include "lib/helper.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -2671,7 +2672,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
"Number of Worms", "Number of Players", "Control Style",
|
||||
"Worm Growth Per Food","Worm Speed","Arghs Per Food",
|
||||
"Argh Size","Food Size","Revert to Default Settings",
|
||||
"Quit");
|
||||
"Playback Control", "Quit");
|
||||
|
||||
rb->button_clear_queue();
|
||||
|
||||
|
@ -2768,6 +2769,9 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
if (new_setting == 1)
|
||||
default_settings();
|
||||
break;
|
||||
case 10:
|
||||
playback_control(NULL);
|
||||
break;
|
||||
default:
|
||||
menu_quit=1;
|
||||
break;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "plugin.h"
|
||||
#include "lib/helper.h"
|
||||
#include "lib/playback_control.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -901,7 +902,7 @@ static inline void move_board (void)
|
|||
static int game_menu (void)
|
||||
{
|
||||
MENUITEM_STRINGLIST(menu, "XOBOX Menu", NULL, "Start New Game",
|
||||
"Speed","Difficulty","Quit");
|
||||
"Speed","Difficulty","Playback Control","Quit");
|
||||
int selection = 0;
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
rb->lcd_set_foreground (rb->global_settings->fg_color);
|
||||
|
@ -917,6 +918,8 @@ static int game_menu (void)
|
|||
else if (selection==2)
|
||||
rb->set_int ("Difficulty", "", UNIT_INT, &difficulty, NULL,
|
||||
5, 50, 95, NULL);
|
||||
else if (selection==3)
|
||||
playback_control (NULL);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue