30 using Selection::Selection;
31 void readCurrentValue()
override { this->setValue<::FilterRoute>(soundEditor.currentModControllable->filterRoute); }
34 void writeCurrentValue()
override {
35 auto current_value = this->getValue<::FilterRoute>();
38 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
40 Kit* kit = getCurrentKit();
42 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
43 if (thisDrum->type == DrumType::SOUND) {
44 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
46 if (soundDrum->lpfMode != FilterMode::OFF && soundDrum->hpfMode != FilterMode::OFF) {
47 soundDrum->filterRoute = current_value;
54 soundEditor.currentModControllable->filterRoute = current_value;
58 deluge::vector<std::string_view> getOptions(OptType optType)
override {
60 return {
"HPF2LPF",
"LPF2HPF", l10n::getView(l10n::String::STRING_FOR_PARALLEL)};
67 void renderInHorizontalMenu(int32_t startX, int32_t width, int32_t startY, int32_t height)
override {
70 DEF_STACK_STRING_BUF(shortOpt, kShortStringBufferSize);
73 image.drawStringCentered(shortOpt, startX, startY + 8, kTextSpacingX, kTextSpacingY, width);