Clear selection on incorrect answers
This commit is contained in:
1 parent
4439f929a1
commit
bf7a8a30b4
1 file changed
+6
-2
+6
-2
@@ -362,8 +362,7 @@ static void set_alarm_highlighter_frame() {
|
||||
}
|
||||
}
|
||||
|
||||
static void update_for_new_triangle() {
|
||||
// clear selections
|
||||
static void clear_selections() {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
s_selected_indices[i] = 9;
|
||||
}
|
||||
@@ -372,6 +371,10 @@ static void update_for_new_triangle() {
|
||||
text_layer_set_text(s_drop_txt_function_layer, "");
|
||||
text_layer_set_text(s_drop_txt_over_layer, "");
|
||||
text_layer_set_text(s_drop_txt_under_layer, "");
|
||||
}
|
||||
|
||||
static void update_for_new_triangle() {
|
||||
clear_selections();
|
||||
|
||||
// pick & display 2 side lengths to the user
|
||||
static char side_a_buffer[8], side_b_buffer[8], side_c_buffer[8];
|
||||
@@ -601,6 +604,7 @@ static void accel_tap_handler(AccelAxisType axis, int32_t direction) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (s_selected_indices[i] != s_solution_indices[i]) {
|
||||
animation_schedule(animation_clone(s_x_anim_master));
|
||||
clear_selections();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user