From 647a91c4b8f64d38fda8c00d3e97a81f4caa70ae Mon Sep 17 00:00:00 2001 From: Jens Mohrmann Date: Sat, 27 Dec 2025 13:39:29 +0100 Subject: [PATCH] Improve virtual guitar UX --- src/App.css | 10 ++++++++++ src/App.tsx | 32 +++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/App.css b/src/App.css index 9259f2c..36441f9 100644 --- a/src/App.css +++ b/src/App.css @@ -336,6 +336,16 @@ button { transform: translateY(-2px); } +.hint-button.active { + background-color: var(--color-primary); + color: white; + box-shadow: 0 4px 12px rgba(var(--hue-primary), 0.3); +} + +.hint-button.active:hover { + background-color: var(--color-primary-dark); +} + .zen-button { background-color: transparent; border: 2px solid var(--color-text-muted); diff --git a/src/App.tsx b/src/App.tsx index 00af3c3..065027d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -57,6 +57,7 @@ function App() { const [matchStartTime, setMatchStartTime] = useState(null); const [feedbackMessage, setFeedbackMessage] = useState(""); const [revealed, setRevealed] = useState(false); + const [virtualNote, setVirtualNote] = useState(null); const currentTuning = TUNINGS[settings.tuningId]; const currentInstrumentDef = INSTRUMENT_DEFINITIONS[settings.instrument]; @@ -233,6 +234,12 @@ function App() { // Virtual Guitar Handler const handleVirtualGuitarPlay = useCallback((playedMidi: number) => { playNote(playedMidi, 0.5); // Feedback sound + setVirtualNote(playedMidi); + + // Clear the note visualization after a short delay + setTimeout(() => { + setVirtualNote(null); + }, 500); if (playedMidi === targetMidi) { // Instant match @@ -378,11 +385,11 @@ function App() { )}
-
+
)}
@@ -429,6 +437,17 @@ function App() { {!settings.zenMode && (
+ {currentInstrumentDef.showTuning && ( + + )} + - -