I need to select a part of a displayed waveform, by dragging horizontally a “Start” and “End” ImageButton, but I guess I would have same issue with any type of Button.
I naively tried the following (showing only code for “Start” button), but it only moves the button a little bit and then no more on further dragging.
void MutineerAudioProcessorEditor::mouseDrag (const MouseEvent& event)
{
if (event.eventComponent ==
&wavetableImportComponent.sampleStartSectionPositionButton)
{
int xPos = event.getMouseDownX ();
wavetableImportComponent.sampleStartSectionPositionButton.setTopLeftPosition
(xPos, wavetableImportComponent.waveformPlotYPos);
}
}
Any suggestions on getting this to work is much appreciated.