27 using ArpNonSoundInteger::ArpNonSoundInteger;
29 this->setValue(computeCurrentValueForUnsignedMenuItem(soundEditor.currentArpSettings->sequenceLength));
31 void writeCurrentValue()
override {
32 int32_t value = computeFinalValueForUnsignedMenuItem(this->getValue());
33 soundEditor.currentArpSettings->sequenceLength = value;
36 [[nodiscard]] RenderingStyle getRenderingStyle()
const override {
return NUMBER; }
38 void renderInHorizontalMenu(
const SlotPosition& slot)
override {
39 if (getValue() == 0) {
40 const auto off_string = l10n::get(l10n::String::STRING_FOR_OFF);
41 return OLED::main.drawStringCentered(off_string, slot.start_x, slot.start_y + kHorizontalMenuSlotYOffset,
42 kTextSpacingX, kTextSpacingY, slot.width);
44 ArpNonSoundInteger::renderInHorizontalMenu(slot);
48 if (
const auto value = getValue(); value == 0) {
49 valueBuf.append(l10n::get(l10n::String::STRING_FOR_OFF));
52 valueBuf.appendInt(value);