feat(display): draw hint animation at touch position instead of center

This commit is contained in:
2026-02-17 03:49:34 -08:00
parent 23712a152b
commit 0ace263324
9 changed files with 78 additions and 31 deletions

View File

@@ -108,6 +108,7 @@ HoldState DisplayDriverGFX::updateHold(unsigned long holdMs) {
if(!_isHolding) {
_isHolding = true;
state.started = true;
}
state.active = true;
@@ -234,7 +235,7 @@ void DisplayDriverGFX::drawDashboard(const ScreenState& state) {
}
}
void DisplayDriverGFX::updateHint() {
void DisplayDriverGFX::updateHint(int x, int y) {
if(!_gfx)
return;
@@ -249,5 +250,6 @@ void DisplayDriverGFX::updateHint() {
uint8_t v = static_cast<uint8_t>(30.0f + 30.0f * sinf(t * 2 * 3.14159f));
uint16_t col = ((v >> 3) << 11) | ((v >> 2) << 5) | (v >> 3);
_gfx->drawCircle(DISP_W / 2, DISP_H / 2, 50, col);
// Draw at touch position instead of center
_gfx->drawCircle(x, y, 50, col);
}