updated BPM tab
This commit is contained in:
@ -15,6 +15,7 @@ void updateScreen() {
|
||||
u8g2.setFont(velvetscreen);
|
||||
|
||||
//Menu items
|
||||
lastMenuItem = 4;
|
||||
width = 32;
|
||||
leftOffset = 62;
|
||||
if (masterClockMode == 0 && bpmModulationRange == 0) {
|
||||
@ -22,51 +23,61 @@ void updateScreen() {
|
||||
} else if (masterClockMode == 0 && bpmModulationRange != 0) {
|
||||
lastMenuItem = 3;
|
||||
} else if (masterClockMode == 1) {
|
||||
lastMenuItem = 0;
|
||||
}
|
||||
if ((menuItem == 1 && insideTab) || (insideTab && masterClockMode == 1 && menuItem == 0)) {
|
||||
u8g2.drawButtonUTF8(leftOffset, 6, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 2, "MODE:" );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(leftOffset, 6, U8G2_BTN_BW0, width, 2, 2, "MODE:" );
|
||||
}
|
||||
if (masterClockMode == 0) {
|
||||
if (menuItem == 2) {
|
||||
u8g2.drawButtonUTF8(leftOffset, 16, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 2, "MOD:" );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(leftOffset, 16, U8G2_BTN_BW0, width, 2, 2, "MOD:" );
|
||||
}
|
||||
if (bpmModulationRange != 0) {
|
||||
if (menuItem == 3) {
|
||||
u8g2.drawButtonUTF8(leftOffset, 26, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 2, "RANGE:" );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(leftOffset, 26, U8G2_BTN_BW0, width, 2, 2, "RANGE:" );
|
||||
}
|
||||
}
|
||||
}
|
||||
//Values
|
||||
width = 28;
|
||||
if (menuItem == 1 && insideTab && masterClockMode == 0) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 6, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 2, "INT" );
|
||||
} else if ((menuItem != 1 || !insideTab) && masterClockMode == 0) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 6, U8G2_BTN_BW0, width, 2, 2, "INT" );
|
||||
}
|
||||
if (menuItem == 1 && insideTab && masterClockMode == 1) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 6, U8G2_BTN_BW0|U8G2_BTN_INV, 30, 2, 2, "EXT" );
|
||||
} else if ((menuItem != 1 || !insideTab) && masterClockMode == 1) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 6, U8G2_BTN_BW0, width, 2, 2, "EXT" );
|
||||
lastMenuItem = 1;
|
||||
}
|
||||
|
||||
for (byte i = 1; i <= lastMenuItem; i++) {
|
||||
if (i == 1) {
|
||||
valueStr = "MODE:";
|
||||
} else if (i == 2 && masterClockMode == 0) {
|
||||
valueStr = "MOD:";
|
||||
} else if (i == 3 && masterClockMode == 0) {
|
||||
valueStr = "RANGE:";
|
||||
}
|
||||
valueStr.toCharArray(valueChar, 16);
|
||||
if (menuItem == i && insideTab) {
|
||||
u8g2.drawButtonUTF8(leftOffset, 8 + (i-1) *11, U8G2_BTN_BW1|U8G2_BTN_INV, width, 1, 2, valueChar );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(leftOffset, 8 + (i-1) *11, U8G2_BTN_BW0, width, 1, 2, valueChar);
|
||||
}
|
||||
}
|
||||
if (masterClockMode != 0 && menuItem == 0) { //to make main param non selectable for external clock
|
||||
menuItem = 1;
|
||||
}
|
||||
|
||||
//Values
|
||||
for (byte i = 1; i <= lastMenuItem; i++) {
|
||||
if (i == 1 && masterClockMode == 0) { //Channel mode
|
||||
valueStr = "INT";
|
||||
} else if (i == 1 && masterClockMode == 1) {
|
||||
valueStr = "EXT";
|
||||
} else if (i == 2 && masterClockMode == 0 && bpmModulationRange != 0 && bpmModulationChannel == 0) {
|
||||
valueStr = "CV1";
|
||||
} else if (i == 2 && masterClockMode == 0 && bpmModulationRange != 0 && bpmModulationChannel == 1) {
|
||||
valueStr = "CV2";
|
||||
} else if (i == 2 && masterClockMode == 0 && bpmModulationRange == 0) {
|
||||
valueStr = "OFF";
|
||||
} else if (i == 3 && bpmModulationRange != 0) {
|
||||
valueStr = String(bpmModulationRange * 10);
|
||||
}
|
||||
|
||||
valueStr.toCharArray(valueChar, 16);
|
||||
|
||||
if (menuItem == i && insideTab && (menuItemSelected || shiftBtnPushed)) {
|
||||
u8g2.drawButtonUTF8(leftOffset + 37, 8 + (i-1) *11, U8G2_BTN_BW1, 26, 2, 2, valueChar );
|
||||
} else if (menuItem == i && insideTab && (!menuItemSelected || !shiftBtnPushed)) {
|
||||
u8g2.drawButtonUTF8(leftOffset + 37, 8 + (i-1) *11, U8G2_BTN_BW1|U8G2_BTN_INV, 26, 2, 2, valueChar );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(leftOffset + 37, 8 + (i-1) *11, U8G2_BTN_BW0, 26, 2, 2, valueChar );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
if (masterClockMode == 0) {
|
||||
if (menuItem == 2 && bpmModulationRange != 0 && bpmModulationChannel == 0) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 16, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 2, "CV1" );
|
||||
} else if (menuItem != 2 && bpmModulationRange != 0 && bpmModulationChannel == 0) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 16, U8G2_BTN_BW0, width, 3, 2, "CV1" );
|
||||
}
|
||||
if (menuItem == 2 && bpmModulationRange != 0 && bpmModulationChannel == 1) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 16, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 2, "CV2" );
|
||||
} else if (menuItem != 2 && bpmModulationRange != 0 && bpmModulationChannel == 1){
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 16, U8G2_BTN_BW0, width, 2, 2, "CV2" );
|
||||
}
|
||||
|
||||
if (menuItem == 2 && bpmModulationRange == 0) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 16, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 2, "OFF" );
|
||||
} else if (menuItem != 2 && bpmModulationRange == 0) {
|
||||
@ -80,7 +91,7 @@ void updateScreen() {
|
||||
} else if (menuItem != 3 && bpmModulationRange != 0) {
|
||||
u8g2.drawButtonUTF8(leftOffset + width + 4, 26, U8G2_BTN_BW0, width, 4, 2, bpmModChar );
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
String bpmStr;
|
||||
if (masterClockMode == 0) {
|
||||
@ -135,9 +146,9 @@ void updateScreen() {
|
||||
} else if (i == 2 && channels[displayTab - 1].mode == 2) {
|
||||
valueStr = "EDIT PATTERN";
|
||||
} else if (i == 3) {
|
||||
valueStr = "CV1";
|
||||
valueStr = "CV1:";
|
||||
} else if (i == 4) {
|
||||
valueStr = "CV2";
|
||||
valueStr = "CV2:";
|
||||
}
|
||||
valueStr.toCharArray(valueChar, 16);
|
||||
if (menuItem == i && insideTab) {
|
||||
@ -146,7 +157,6 @@ void updateScreen() {
|
||||
u8g2.drawButtonUTF8(leftOffset, 8 + (i-1) *11, U8G2_BTN_BW0, width, 1, 2, valueChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Values
|
||||
for (byte i = 1; i <= lastMenuItem; i++) {
|
||||
@ -184,7 +194,7 @@ void updateScreen() {
|
||||
valueStr.toCharArray(valueChar, 16);
|
||||
if (i == 2 && channels[displayTab - 1].mode == 2) { //EDIT PATTERN thing
|
||||
if (menuItem == i && insideTab) {
|
||||
u8g2.drawBox(leftOffset + 55, ((i-1) * 11)-1, 10, 11);
|
||||
u8g2.drawBox(leftOffset + 54, ((i-1) * 11), 11, 11);
|
||||
}
|
||||
} else {
|
||||
if (menuItem == i && insideTab && (menuItemSelected || shiftBtnPushed)) {
|
||||
|
||||
Reference in New Issue
Block a user