Deluge Firmware
1.3.0
Build date: 2026.08.23
Toggle main menu visibility
Loading...
Searching...
No Matches
colour.h
1
/*
2
* Copyright © 2020-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
#include "gui/menu_item/selection.h"
20
21
namespace
deluge::gui::menu_item {
22
23
constexpr
int32_t kNumPadColours = 9;
24
class
Colour
final :
public
Selection
{
25
public
:
26
enum
Option : uint8_t {
27
RED,
28
GREEN,
29
BLUE,
30
YELLOW,
31
CYAN,
32
MAGENTA,
33
AMBER,
34
WHITE,
35
PINK,
36
};
37
38
using
Selection::Selection;
39
void
readCurrentValue
()
override
{ this->setValue(value); }
40
void
writeCurrentValue()
override
{
41
value =
static_cast<
Option
>
(this->getValue());
42
renderingNeededRegardlessOfUI();
43
};
44
deluge::vector<std::string_view> getOptions(OptType optType)
override
{
45
return
{
46
l10n::getView(l10n::String::STRING_FOR_RED), l10n::getView(l10n::String::STRING_FOR_GREEN),
47
l10n::getView(l10n::String::STRING_FOR_BLUE), l10n::getView(l10n::String::STRING_FOR_YELLOW),
48
l10n::getView(l10n::String::STRING_FOR_CYAN), l10n::getView(l10n::String::STRING_FOR_MAGENTA),
49
l10n::getView(l10n::String::STRING_FOR_AMBER), l10n::getView(l10n::String::STRING_FOR_WHITE),
50
l10n::getView(l10n::String::STRING_FOR_PINK),
51
};
52
}
53
[[nodiscard]]
RGB
getRGB()
const
;
54
Option value;
55
};
56
57
extern
Colour
activeColourMenu;
58
extern
Colour
stoppedColourMenu;
59
extern
Colour
mutedColourMenu;
60
extern
Colour
soloColourMenu;
61
extern
Colour
fillColourMenu;
62
extern
Colour
onceColourMenu;
63
}
// namespace deluge::gui::menu_item
RGB
This class represents the colour format most used by the Deluge globally.
Definition
rgb.h:14
deluge::gui::menu_item::Colour
Definition
colour.h:24
deluge::gui::menu_item::Colour::readCurrentValue
void readCurrentValue() override
Like readValueAgain, but does not redraw.
Definition
colour.h:39
deluge::gui::menu_item::Selection
Definition
selection.h:26