Skip to content

Commit

Permalink
Fix popup values displayed on 7SEG (#766)
Browse files Browse the repository at this point in the history
* Fix values displayed on 7SEG

- Fixed mod encoder value popups to align values to the right of the 7Seg display

- Fixed automation instrument clip view value popups which were not displaying the correct amounts since the change to 0-50.

* Dbt Format
  • Loading branch information
seangoodvibes authored Nov 27, 2023
1 parent aa471d8 commit 853f85c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions src/deluge/gui/views/automation_instrument_clip_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,12 @@ void AutomationInstrumentClipView::renderDisplay(int32_t knobPosLeft, int32_t kn

//if you're not in a MIDI instrument clip, convert the knobPos to the same range as the menu (0-50)
if (instrument->type != InstrumentType::MIDI_OUT) {
knobPosLeft = view.calculateKnobPosForDisplay(instrument->type, clip->lastSelectedParamID, knobPosLeft);
knobPosRight = view.calculateKnobPosForDisplay(instrument->type, clip->lastSelectedParamID, knobPosRight);
if (knobPosLeft != kNoSelection) {
knobPosLeft = view.calculateKnobPosForDisplay(instrument->type, clip->lastSelectedParamID, knobPosLeft);
}
if (knobPosRight != kNoSelection) {
knobPosRight = view.calculateKnobPosForDisplay(instrument->type, clip->lastSelectedParamID, knobPosRight);
}
}

//OLED Display
Expand Down Expand Up @@ -945,7 +949,8 @@ void AutomationInstrumentClipView::renderDisplay7SEG(InstrumentClip* clip, Instr
lastPadSelectedKnobPos = knobPosLeft;
}
else if (lastPadSelectedKnobPos != kNoSelection) {
knobPosLeft = lastPadSelectedKnobPos;
knobPosLeft = view.calculateKnobPosForDisplay(instrument->type, clip->lastSelectedParamID,
lastPadSelectedKnobPos);
}
}

Expand All @@ -956,10 +961,10 @@ void AutomationInstrumentClipView::renderDisplay7SEG(InstrumentClip* clip, Instr
intToString(knobPosLeft, buffer);

if (isUIModeActive(UI_MODE_NOTES_PRESSED)) {
display->setText(buffer, false, 255, false);
display->setText(buffer, true, 255, false);
}
else if (modEncoderAction || padSelectionOn) {
display->displayPopup(buffer);
display->displayPopup(buffer, 3, true);
}
}
//display parameter name
Expand Down
2 changes: 1 addition & 1 deletion src/deluge/gui/views/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ void View::displayModEncoderValuePopup(InstrumentType instrumentType, int32_t pa
valueForDisplay = calculateKnobPosForDisplay(instrumentType, paramID, newKnobPos + kKnobPosOffset);
}
intToString(valueForDisplay, buffer);
display->displayPopup(buffer);
display->displayPopup(buffer, 3, true);
}

//if turning stutter mod encoder and stutter quantize is enabled
Expand Down

0 comments on commit 853f85c

Please sign in to comment.