34 using SelectedNoteRow::SelectedNoteRow;
36 [[nodiscard]] int32_t getMaxValue()
const override {
return FillMode::FILL; }
37 [[nodiscard]] int32_t getMinValue()
const override {
return FillMode::OFF; }
45 char modelStackMemory[MODEL_STACK_MAX_SIZE];
49 if (modelStackWithNoteRow->getNoteRowAllowNull() !=
nullptr) {
50 NoteRow* noteRow = modelStackWithNoteRow->getNoteRowAllowNull();
51 this->setValue(noteRow->fillValue);
57 int32_t newValue = instrumentClipView.setNoteRowFillWithOffset(offset);
59 this->setValue(newValue);
61 if (currentSong->isFillModeActive()) {
62 uiNeedsRendering(&instrumentClipView);
68 OLED::main.drawStringCentred(instrumentClipView.getFillString(this->getValue()), 18 + OLED_MAIN_TOPMOST_PIXEL,
69 kTextHugeSpacingX, kTextHugeSizeY);
75 const uint8_t value = getValue();
76 const std::string str = value == OFF ?
"OFF" :
"FILL";
77 image.drawStringCentered(str.data(), slot.start_x, slot.start_y + kHorizontalMenuSlotYOffset, kTextSpacingX,
78 kTextSpacingY, slot.width);
80 if (value == NOT_FILL) {
81 const uint8_t center_y = slot.start_y + kHorizontalMenuSlotYOffset + 4;
82 const uint8_t line_start_x = slot.start_x + 2;
83 const uint8_t line_end_x = slot.start_x + slot.width - 4;
84 for (uint8_t x = line_start_x; x <= line_end_x; x++) {
85 image.clearPixel(x, center_y - 1);
86 image.clearPixel(x, center_y + 1);
88 image.drawHorizontalLine(center_y, line_start_x, line_end_x);
93 valueBuf.append(instrumentClipView.getFillString(this->getValue()));
96 void drawValue()
override { display->setText(instrumentClipView.getFillString(this->getValue())); }
98 void writeCurrentValue()
override { ; }