mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
* minesweeper.c: Cosmetics.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13546 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ffcc94ea92
commit
7428b79de3
1 changed files with 18 additions and 17 deletions
|
@ -399,18 +399,19 @@ enum minesweeper_status menu( void )
|
||||||
{
|
{
|
||||||
int selection, result = MINESWEEPER_QUIT;
|
int selection, result = MINESWEEPER_QUIT;
|
||||||
bool menu_quit = false;
|
bool menu_quit = false;
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(menu, "Minesweeper Menu",NULL,"Play Minesweeper",
|
MENUITEM_STRINGLIST( menu, "Minesweeper Menu", NULL, "Play Minesweeper",
|
||||||
"Mine Percentage", "Number of Rows", "Number of Columns",
|
"Mine Percentage", "Number of Rows",
|
||||||
"Quit");
|
"Number of Columns", "Quit" );
|
||||||
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
rb->lcd_set_foreground(rb->global_settings->fg_color);
|
rb->lcd_set_foreground( rb->global_settings->fg_color );
|
||||||
rb->lcd_set_background(rb->global_settings->bg_color);
|
rb->lcd_set_background( rb->global_settings->bg_color );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (!menu_quit) {
|
while( !menu_quit )
|
||||||
switch(rb->do_menu(&menu, &selection))
|
{
|
||||||
|
switch( rb->do_menu( &menu, &selection ) )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
result = MINESWEEPER_WIN; /* start playing */
|
result = MINESWEEPER_WIN; /* start playing */
|
||||||
|
@ -418,20 +419,20 @@ enum minesweeper_status menu( void )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
rb->set_int("Mine Percentage", "%", UNIT_INT, &p, NULL, 1, 2,
|
rb->set_int( "Mine Percentage", "%", UNIT_INT, &p, NULL,
|
||||||
98, NULL );
|
1, 2, 98, NULL );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
rb->set_int("Number of Rows", "", UNIT_INT, &height, NULL, 1, 1,
|
rb->set_int( "Number of Rows", "", UNIT_INT, &height, NULL,
|
||||||
MAX_HEIGHT, NULL );
|
1, 1, MAX_HEIGHT, NULL );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
rb->set_int("Number of Columns", "", UNIT_INT, &width, NULL, 1, 1,
|
rb->set_int( "Number of Columns", "", UNIT_INT, &width, NULL,
|
||||||
MAX_WIDTH, NULL );
|
1, 1, MAX_WIDTH, NULL );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
result = MINESWEEPER_QUIT; /* quit program */
|
result = MINESWEEPER_QUIT; /* quit program */
|
||||||
menu_quit = true;
|
menu_quit = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue