use of de.mossgrabers.framework.daw.ICursorDevice in project DrivenByMoss by git-moss.
the class DrumView method handleSelectButton.
/**
* {@inheritDoc}
*/
@Override
public void handleSelectButton(final int playedPad) {
final ICursorDevice primary = this.model.getPrimaryDevice();
if (!primary.hasDrumPads())
return;
// Do not reselect
if (primary.getDrumPad(playedPad).isSelected())
return;
final ICursorDevice cd = this.model.getCursorDevice();
if (cd.isNested())
cd.selectParent();
this.surface.getModeManager().setActiveMode(Modes.MODE_DEVICE_LAYER);
primary.selectDrumPad(playedPad);
this.updateNoteMapping();
}
use of de.mossgrabers.framework.daw.ICursorDevice in project DrivenByMoss by git-moss.
the class DrumView64 method handleSelectButton.
/**
* {@inheritDoc}
*/
@Override
protected void handleSelectButton(final int playedPad) {
final ICursorDevice drumDevice64 = this.model.getDrumDevice64();
if (!drumDevice64.hasDrumPads())
return;
// Do not reselect
if (drumDevice64.getDrumPad(playedPad).isSelected())
return;
final ICursorDevice cd = this.model.getCursorDevice();
if (cd.isNested())
cd.selectParent();
this.surface.getModeManager().setActiveMode(Modes.MODE_DEVICE_LAYER);
drumDevice64.selectDrumPad(playedPad);
}
Aggregations