Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
load_song_ui.h
1/*
2 * Copyright © 2014-2023 Synthstrom Audible Limited
3 *
4 * This file is part of The Synthstrom Audible Deluge Firmware.
5 *
6 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software Foundation,
8 * either version 3 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program.
15 * If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include "gui/ui/load/load_ui.h"
21#include "hid/button.h"
22
23class LoadSongUI final : public LoadUI {
24public:
25 LoadSongUI();
26 ActionResult buttonAction(deluge::hid::Button b, bool on, bool inCardRoutine) override;
27 ActionResult timerCallback() override;
28 ActionResult verticalEncoderAction(int32_t offset, bool inCardRoutine) override;
29 void graphicsRoutine() override {}
30 void scrollFinished() override;
31 ActionResult padAction(int32_t x, int32_t y, int32_t velocity) override;
32 bool opened() override;
33 void selectEncoderAction(int8_t offset) override;
34 void queueLoadNextSongIfAvailable(int8_t offset);
35 void performLoad();
36 void displayLoopsRemainingPopup();
37 bool isLoadingSong();
38
39 bool deletedPartsOfOldSong;
40
41 // ui
42 UIType getUIType() override { return UIType::LOAD_SONG; }
43
44protected:
45 void displayText(bool blinkImmediately = false) override;
46 void enterKeyPress() override;
47 void folderContentsReady(int32_t entryDirection) override;
48 void currentFileChanged(int32_t movementDirection) override;
49 void exitAction() override;
50
51private:
52 void drawSongPreview(bool toStore = true);
53 void displayArmedPopup();
54
55 bool performingLoad;
56 bool scrollingIntoSlot;
57 bool qwertyCurrentlyDrawnOnscreen;
58 void doQueueLoadNextSongIfAvailable(int8_t offset);
59 // int32_t findNextFile(int32_t offset);
60 void exitThisUI();
61 void exitActionWithError();
62 void performLoadFixedSM();
63};
64extern LoadSongUI loadSongUI;
65
66extern char loopsRemainingText[];
Definition load_song_ui.h:23