diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2009-07-14 13:03:17 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2009-07-14 13:03:17 +0000 |
commit | c72b23ad2e1b3a507a36b6223c0a35be9b746f0a (patch) | |
tree | 2cf43da7cca0ff2caf8544a1f3c48ac5d961701c /apps/plugins/clix.c | |
parent | e37f9f16915a1a05059aee931723c127a53a68e0 (diff) | |
download | rockbox-c72b23ad2e1b3a507a36b6223c0a35be9b746f0a.tar.gz rockbox-c72b23ad2e1b3a507a36b6223c0a35be9b746f0a.zip |
use lib display text to display help messages (FS#10099).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21861 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/clix.c')
-rw-r--r-- | apps/plugins/clix.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c index a6a3bdd626..78bfdb8fdf 100644 --- a/apps/plugins/clix.c +++ b/apps/plugins/clix.c | |||
@@ -592,34 +592,34 @@ static int clix_clear_selected(struct clix_game_state_t* state) | |||
592 | return state->status; | 592 | return state->status; |
593 | } | 593 | } |
594 | 594 | ||
595 | static int clix_help(void) | 595 | static bool clix_help(void) |
596 | { | 596 | { |
597 | rb->lcd_setfont(FONT_UI); | ||
598 | rb->lcd_set_foreground(LCD_WHITE); | ||
599 | #define WORDS (sizeof help_text / sizeof (char*)) | 597 | #define WORDS (sizeof help_text / sizeof (char*)) |
600 | static char *help_text[] = { | 598 | static char *help_text[] = { |
601 | "Clix", "", "Aim", "", "Remove", "all", "blocks", "from", "the", | 599 | "Clix", "", "Aim", "", |
602 | "board", "to", "achieve", "the", "next", "level.", "You", "can", | 600 | "Remove", "all", "blocks", "from", "the", "board", "to", "achieve", |
603 | "only", "remove", "blocks,", "if", "at", "least", "two", "blocks", | 601 | "the", "next", "level.", "You", "can", "only", "remove", "blocks,", |
604 | "with", "the", "same", "color", "have", "a", "direct", "connection.", | 602 | "if", "at", "least", "two", "blocks", "with", "the", "same", "color", |
605 | "The", "more", "blocks", "you", "remove", "per", "turn,", "the", | 603 | "have", "a", "direct", "connection.", "The", "more", "blocks", "you", |
606 | "more", "points", "you", "get." | 604 | "remove", "per", "turn,", "the", "more", "points", "you", "get." |
607 | }; | 605 | }; |
608 | static struct style_text formation[]={ | 606 | static struct style_text formation[]={ |
609 | { 0, TEXT_CENTER|TEXT_UNDERLINE }, | 607 | { 0, TEXT_CENTER|TEXT_UNDERLINE }, |
610 | { 2, C_RED } | 608 | { 2, C_RED }, |
609 | { -1, 0 } | ||
611 | }; | 610 | }; |
612 | |||
613 | if (display_text(WORDS, help_text, formation, NULL)==PLUGIN_USB_CONNECTED) | ||
614 | return PLUGIN_USB_CONNECTED; | ||
615 | int button; | 611 | int button; |
612 | |||
613 | rb->lcd_setfont(FONT_UI); | ||
614 | rb->lcd_set_foreground(LCD_WHITE); | ||
615 | if (display_text(WORDS, help_text, formation, NULL)) | ||
616 | return true; | ||
616 | do { | 617 | do { |
617 | button = rb->button_get(true); | 618 | button = rb->button_get(true); |
618 | if (button == SYS_USB_CONNECTED) { | 619 | if ( rb->default_event_handler( button ) == SYS_USB_CONNECTED ) |
619 | return PLUGIN_USB_CONNECTED; | 620 | return true; |
620 | } | ||
621 | } while( ( button == BUTTON_NONE ) | 621 | } while( ( button == BUTTON_NONE ) |
622 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); | 622 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); |
623 | rb->lcd_setfont(FONT_SYSFIXED); | 623 | rb->lcd_setfont(FONT_SYSFIXED); |
624 | return 0; | 624 | return 0; |
625 | } | 625 | } |
@@ -656,7 +656,7 @@ static int clix_menu(struct clix_game_state_t* state, bool ingame) | |||
656 | clix_init(state); | 656 | clix_init(state); |
657 | return 0; | 657 | return 0; |
658 | case 2: | 658 | case 2: |
659 | if (clix_help()==PLUGIN_USB_CONNECTED) | 659 | if (clix_help()) |
660 | return 1; | 660 | return 1; |
661 | break; | 661 | break; |
662 | case 3: | 662 | case 3: |