28 using Selection::Selection;
29 void readCurrentValue()
override { this->setValue(soundEditor.currentArpSettings->randomizerLock); }
32 void writeCurrentValue()
override {
33 bool current_value = this->getValue() != 0;
36 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
38 Kit* kit = getCurrentKit();
40 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
41 thisDrum->arpSettings.randomizerLock = current_value;
46 soundEditor.currentArpSettings->randomizerLock = current_value;
50 deluge::vector<std::string_view> getOptions(OptType optType)
override {
52 using enum l10n::String;
54 l10n::getView(STRING_FOR_OFF),
55 l10n::getView(STRING_FOR_ON),
59 void getColumnLabel(StringBuf& label)
override {
60 label.append(deluge::l10n::get(deluge::l10n::built_in::seven_segment, this->
name));
64 bool isToggle()
override {
return true; }
69 void renderInHorizontalMenu(int32_t startX, int32_t width, int32_t startY, int32_t height)
override {
70 using namespace deluge::hid::display;
71 const Icon& icon = getValue() ? OLED::switcherIconOn : OLED::switcherIconOff;
72 OLED::main.drawIconCentered(icon, startX, width, startY);