29class Type final :
public Shape {
31 Type(deluge::l10n::String name, deluge::l10n::String type, uint8_t lfoId) :
Shape(name, type), lfoId_(lfoId) {}
32 void readCurrentValue()
override { this->setValue(soundEditor.currentSound->lfoConfig[lfoId_].waveType); }
34 void writeCurrentValue()
override {
35 auto current_value = this->getValue<LFOType>();
37 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
39 Kit* kit = getCurrentKit();
41 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
42 if (thisDrum->type == DrumType::SOUND) {
43 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
44 soundDrum->lfoConfig[lfoId_].waveType = current_value;
48 soundDrum->resyncGlobalLFOs();
54 soundEditor.currentSound->lfoConfig[lfoId_].waveType = current_value;
58 soundEditor.currentSound->resyncGlobalLFOs();
61 void renderInHorizontalMenu(int32_t startX, int32_t width, int32_t startY, int32_t height)
override;