Commit 51ab1342 authored by thallia's avatar thallia 💬

everything *still* works

parent 66174848
......@@ -113,6 +113,13 @@ int xpDisplay;
int cursor_x = 185;
int cursor_y = 120;
boolean completedChore_1 = false;
boolean completedChore_2 = false;
boolean completedChore_3 = false;
boolean completedChore_4 = false;
boolean completedChore_5 = false;
boolean completedChore_6 = false;
// ************************
// Setup Code
// ************************
......@@ -656,7 +663,15 @@ void displayDayChores(){
//displayTextChores(i, 205, 90);
//}
//}
if (completedChore_1){
tft.fillRect(620, 130, 40, 40, RA8875_GREEN);
}
if (completedChore_2){
tft.fillRect(620, 188, 40, 40, RA8875_GREEN);
}
hasDisplayed = true;
......@@ -667,15 +682,22 @@ void displayDayChores(){
tx = 0;
ty = 0;
checkTouch();
Serial.println(xp);
if(((tx <= 790) && (tx >= 775)) && ((ty <= 390) && (ty >= 350))){
tft.fillRect(620, 130, 40, 40, RA8875_GREEN);
xp = xp + 20;
if(((tx <= 790) && (tx >= 775)) && ((ty <= 370) && (ty >= 350))){
tft.fillRect(620, 130, 40, 40, RA8875_GREEN);
xp = xp + 20;
completedChore_1 = true;
} else if ((tx <= 790) && (tx >= 775) && (ty <= 470) && (ty >= 450)){
tft.fillRect(620, 188, 40, 40, RA8875_GREEN);
xp = xp + 20;
tft.fillRect(620, 188, 40, 40, RA8875_GREEN);
xp = xp + 20;
completedChore_2 = true;
}
Serial.println(xp);
if ((tx >= 20) && (tx <= 165) && (ty >= 700)) {
// we chose the back button here!
currentState = CHORES;
......@@ -688,6 +710,7 @@ void displayDayChores(){
breakDisplayed = false;
tx = 0;
ty = 0;
//completedChore = false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment