|
@@ -22,9 +22,6 @@ void ConfigurationScreen::keyPressed(unsigned char x, unsigned char y)
|
|
|
break;
|
|
|
}
|
|
|
} else {
|
|
|
- Player::Bpm minBpm = 1;
|
|
|
- Player::Bpm maxBpm = (1 << (configWidth * 2)) - 1;
|
|
|
- BeatIndex maxBeatsCount = (1 << configWidth) - 1;
|
|
|
switch(y) {
|
|
|
case 0: { // number of beats
|
|
|
unsigned int bit = (1 << (configWidth - x - 1));
|
|
@@ -92,9 +89,14 @@ void ConfigurationScreen::refresh(unsigned char x, unsigned char y)
|
|
|
setColor(x, y, colors::inactiveBeatsCount);
|
|
|
}
|
|
|
} break;
|
|
|
- case 1: // sequence expansion
|
|
|
- setColor(x, y, colors::sequenceExpansionButton);
|
|
|
- break;
|
|
|
+ case 1: { // sequence expansion
|
|
|
+ unsigned int factor = x + 2;
|
|
|
+ if(sequencer.beats.size() * factor <= maxBeatsCount) {
|
|
|
+ setColor(x, y, colors::sequenceExpansionButton);
|
|
|
+ } else {
|
|
|
+ setColor(x, y, colors::dark);
|
|
|
+ }
|
|
|
+ } break;
|
|
|
case 2: // reduce erasing conflicts
|
|
|
setColor(x, y, colors::sequenceReductionErasingConflictsButton);
|
|
|
break;
|