From c68f548fe3547e2d251bb994d051b9a26c590722 Mon Sep 17 00:00:00 2001 From: Correl Date: Tue, 10 Oct 2023 17:17:48 -0400 Subject: [PATCH] Hold to reset, tap to redraw --- src/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0e69bde..8c2e5a6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -464,8 +464,7 @@ public: case Playing: case CommanderDamage: if (sidebarRect.contains(t.x, t.y)) { - showConfirm(); - mode = ConfirmReset; + for (int i = 0; i < 4; i++) drawPlayer(i); } else { for (int i = 0; i < 4; i++) clickPlayer(i, t.x, t.y); } @@ -494,7 +493,12 @@ public: switch (mode) { case Playing: case CommanderDamage: - for (int i = 0; i < 4; i++) holdPlayer(i, t.x, t.y); + if (sidebarRect.contains(t.x, t.y)) { + showConfirm(); + mode = ConfirmReset; + } else { + for (int i = 0; i < 4; i++) holdPlayer(i, t.x, t.y); + } break; } } @@ -715,7 +719,7 @@ protected: canvas.setTextColor(TFT_WHITE); canvas.setFont(&fonts::Orbitron_Light_32); canvas.setTextSize(1); - canvas.drawCenterString("TAP TO", canvas.width() / 2, (canvas.height() / 2) - canvas.fontHeight()); + canvas.drawCenterString("HOLD TO", canvas.width() / 2, (canvas.height() / 2) - canvas.fontHeight()); canvas.drawCenterString("RESET", canvas.width() / 2, (canvas.height() / 2)); canvas.pushSprite(sidebarRect.x, sidebarRect.y); }