set tempo by typing number

Closes #206, thanks @georgkrause for the PR
This commit is contained in:
Georg Krause 2018-03-26 20:28:11 +02:00 committed by Harry van Haaren
parent 3fd73ac58c
commit 2c43704b8f

View file

@ -169,8 +169,17 @@ static void gmastertrack_button_callback(Fl_Widget *w, void *data)
} else if ( strcmp( w->label(), "Tap" ) == 0 ) {
EventTimeTempoTap e;
writeToDspRingbuffer( &e );
if ( Fl::event_button() == FL_RIGHT_MOUSE ) {
const char* answer = fl_input("Enter BPM value: ");
if(answer) {
int bpm = atoi(answer);
EventTimeBPM e = EventTimeBPM( bpm );
writeToDspRingbuffer( &e );
}
} else {
EventTimeTempoTap e;
writeToDspRingbuffer( &e );
}
} else {
LUPPP_WARN("Error: unknown command string");
}