summaryrefslogtreecommitdiff
path: root/apps/plugins/solitaire.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/solitaire.c')
-rw-r--r--apps/plugins/solitaire.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 30405a582f..efecaa854b 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -101,6 +101,22 @@ static struct plugin_api* rb;
101#define SOL_MENU_RUN2 BUTTON_RIGHT 101#define SOL_MENU_RUN2 BUTTON_RIGHT
102#define SOL_MENU_INFO BUTTON_MODE 102#define SOL_MENU_INFO BUTTON_MODE
103#define SOL_MENU_INFO2 BUTTON_REC 103#define SOL_MENU_INFO2 BUTTON_REC
104
105#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
106
107#define SOL_QUIT (BUTTON_SELECT | BUTTON_MENU)
108#define SOL_UP BUTTON_MENU
109#define SOL_DOWN BUTTON_PLAY
110#define SOL_LEFT BUTTON_LEFT
111#define SOL_RIGHT BUTTON_RIGHT
112#define SOL_MOVE BUTTON_SELECT
113#define SOL_DRAW (BUTTON_SELECT | BUTTON_PLAY)
114#define SOL_REM2CUR (BUTTON_SELECT | BUTTON_LEFT)
115#define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_RIGHT)
116#define SOL_REM2STACK (BUTTON_LEFT | BUTTON_RIGHT)
117#define SOL_MENU_RUN BUTTON_SELECT
118#define SOL_MENU_INFO (BUTTON_PLAY | BUTTON_MENU)
119
104#endif 120#endif
105 121
106/* common help definitions */ 122/* common help definitions */
@@ -132,6 +148,13 @@ static struct plugin_api* rb;
132#define HELP_SOL_CUR2STACK "SELECT..: Put the card under the cursor on one of the 4 final stacks." 148#define HELP_SOL_CUR2STACK "SELECT..: Put the card under the cursor on one of the 4 final stacks."
133#define HELP_SOL_REM2STACK "PLAY+RIGHT: Put the card on top of the remains' stack on one of the 4 final stacks." 149#define HELP_SOL_REM2STACK "PLAY+RIGHT: Put the card on top of the remains' stack on one of the 4 final stacks."
134 150
151#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
152#define HELP_SOL_MOVE "SELECT: Select cards, Move cards, reveal hidden cards ..."
153#define HELP_SOL_DRAW "SELECT+PLAY: Un-select a card if it was selected. Else, draw 3 new cards out of the remains' stack."
154#define HELP_SOL_REM2CUR "SELECT+LEFT: Put the card on top of the remains' stack on top of the cursor."
155#define HELP_SOL_CUR2STACK "SELECT+RIGHT..: Put the card under the cursor on one of the 4 final stacks."
156#define HELP_SOL_REM2STACK "LEFT+RIGHT: Put the card on top of the remains' stack on one of the 4 final stacks."
157
135#endif 158#endif
136 159
137#if LCD_DEPTH>1 160#if LCD_DEPTH>1
@@ -540,11 +563,11 @@ int solitaire_menu(unsigned char when)
540 563
541 button = rb->button_get(true); 564 button = rb->button_get(true);
542 switch(button){ 565 switch(button){
543 case BUTTON_UP: 566 case SOL_UP:
544 cursor = (cursor + MENU_LENGTH - 1)%MENU_LENGTH; 567 cursor = (cursor + MENU_LENGTH - 1)%MENU_LENGTH;
545 break; 568 break;
546 569
547 case BUTTON_DOWN: 570 case SOL_DOWN:
548 cursor = (cursor + 1)%MENU_LENGTH; 571 cursor = (cursor + 1)%MENU_LENGTH;
549 break; 572 break;
550 573
@@ -576,7 +599,7 @@ int solitaire_menu(unsigned char when)
576 rb->splash(HZ, true, "Solitaire for Rockbox by dionoea"); 599 rb->splash(HZ, true, "Solitaire for Rockbox by dionoea");
577 break; 600 break;
578 601
579 case BUTTON_OFF: 602 case SOL_QUIT:
580 return MENU_QUIT; 603 return MENU_QUIT;
581 604
582 default: 605 default: