From faa8def0925acc6f80b058697be85f092d68ff8a Mon Sep 17 00:00:00 2001 From: Oleksiy Date: Tue, 11 Mar 2025 21:04:15 +0200 Subject: [PATCH] Sequencer UI is now aligned vertically, no matter how many steps --- Software/Gravity/UI.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Software/Gravity/UI.ino b/Software/Gravity/UI.ino index cfde9f9..e1493a6 100644 --- a/Software/Gravity/UI.ino +++ b/Software/Gravity/UI.ino @@ -322,10 +322,10 @@ void updateScreen() { u8g2.drawHLine(0, 8, 128); for (byte i = 0; i <= sequences[patternToEdit].length; i++) { - u8g2.drawUTF8(19 + (i % 8)*12, 18 + ((i / 8) * 11), (bitRead(sequences[patternToEdit].sequence, i) ? "q" : "p")); + u8g2.drawUTF8(19 + (i % 8)*12, 33 - ((sequences[patternToEdit].length / 8) * 5) + ((i / 8) * 11), (bitRead(sequences[patternToEdit].sequence, i) ? "q" : "p")); } if (!isRecording && stepNumSelected >= 0) { - u8g2.drawFrame(16 + (stepNumSelected % 8)*12, 10 + ((stepNumSelected / 8) * 11), 11, 11); //cursor + u8g2.drawFrame(16 + (stepNumSelected % 8)*12, 25 - ((sequences[patternToEdit].length / 8) * 5) + ((stepNumSelected / 8) * 11), 11, 11); //cursor } if (isRecording) {