Display sequencer length

This commit is contained in:
Christian Colglazier 2022-02-07 18:48:37 -05:00
parent f7b2552773
commit 9bb4e8d1e8
2 changed files with 11 additions and 1 deletions

View File

@ -77,7 +77,16 @@ void SequencerDroplet::Draw() {
// Draw info bar
DrawSolidRect(Patch(),GetScreenMin(),56,GetScreenMax(),63, InMenu());
WriteString(Patch(), 2+GetScreenMin(), 56, std::to_string(step+1), !InMenu());
length_text = std::to_string(step+1);
if (sequence_length >= 10) {
length_text.insert(length_text.begin(), 2 - length_text.length(), '0');
}
length_text.append("/"+std::to_string(sequence_length));
WriteString(Patch(),
2+GetScreenMin(),
56,
length_text,
!InMenu());
DrawName("Sequencer");
}

View File

@ -25,6 +25,7 @@ private:
float sequence[MAX_SEQUENCE_LENGTH] = { 0.0f };
Parameter control[4];
float last_control_value[4] = { 0.0f };
std::string length_text = "";
/*
* Set the sequencer to the next step.