Got rid of continue's blinking
This commit is contained in:
parent
ce31db3712
commit
cb57ef237d
@ -307,17 +307,14 @@ static void display_title(wordle_state_t *state) {
|
|||||||
watch_display_string("WO WordLE", 0);
|
watch_display_string("WO WordLE", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void display_continue_result(bool continuing, uint8_t subsecond) {
|
static void display_continue_result(bool continuing) {
|
||||||
char buf[2];
|
watch_display_string(continuing ? "y" : "n", 9);
|
||||||
char result = subsecond % 2 ? ' ' : (continuing ? 'y' : 'n');
|
|
||||||
sprintf(buf,"%c", result);
|
|
||||||
watch_display_string(buf, 9);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void display_continue(wordle_state_t *state) {
|
static void display_continue(wordle_state_t *state) {
|
||||||
state->curr_screen = SCREEN_CONTINUE;
|
state->curr_screen = SCREEN_CONTINUE;
|
||||||
watch_display_string("Cont ", 4);
|
watch_display_string("Cont ", 4);
|
||||||
display_continue_result(state->continuing, 0);
|
display_continue_result(state->continuing);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void display_streak(wordle_state_t *state) {
|
static void display_streak(wordle_state_t *state) {
|
||||||
@ -452,7 +449,7 @@ static bool act_on_btn(wordle_state_t *state, const uint8_t pin) {
|
|||||||
break;
|
break;
|
||||||
case BTN_LIGHT:
|
case BTN_LIGHT:
|
||||||
state->continuing = !state->continuing;
|
state->continuing = !state->continuing;
|
||||||
display_continue_result(state->continuing, 0);
|
display_continue_result(state->continuing);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -577,9 +574,6 @@ bool wordle_face_loop(movement_event_t event, movement_settings_t *settings, voi
|
|||||||
case SCREEN_WIN:
|
case SCREEN_WIN:
|
||||||
display_win(state, event.subsecond);
|
display_win(state, event.subsecond);
|
||||||
break;
|
break;
|
||||||
case SCREEN_CONTINUE:
|
|
||||||
display_continue_result(state->continuing, event.subsecond);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user