29 using Integer::Integer;
31 [[nodiscard]] int32_t getMaxValue()
const override {
return 128; }
33 void drawInteger(int32_t textWidth, int32_t textHeight, int32_t yPixel)
override {
37 if (this->getValue() == 128) {
38 text = l10n::get(l10n::String::STRING_FOR_NONE);
41 intToString(this->getValue() + 1, buffer, 1);
44 canvas.
drawStringCentred(text, yPixel + OLED_MAIN_TOPMOST_PIXEL, textWidth, textHeight);
47 void drawValue()
override {
48 if (this->getValue() == 128) {
49 display->setText(l10n::get(l10n::String::STRING_FOR_NONE));
52 display->setTextAsNumber(this->getValue() + 1);
57 return getCurrentOutputType() == OutputType::MIDI_OUT;
61 this->setValue(this->getValue() + offset);
62 if (this->getValue() >= 129) {
63 this->setValue(this->getValue() - 129);
65 else if (this->getValue() < 0) {
66 this->setValue(this->getValue() + 129);
void drawStringCentred(char const *string, int32_t pixelY, int32_t textWidth, int32_t textHeight, int32_t centrePos=OLED_MAIN_WIDTH_PIXELS/2)
Definition canvas.cpp:189