use of de.mossgrabers.sl.command.trigger.ButtonRowSelectCommand in project DrivenByMoss by git-moss.
the class ControlView method onButtonP1.
/**
* {@inheritDoc}
*/
@Override
public void onButtonP1(final boolean isUp, final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
final ModeManager modeManager = this.surface.getModeManager();
final Integer activeModeId = modeManager.getActiveModeId();
if (activeModeId == Modes.MODE_FUNCTIONS || activeModeId == Modes.MODE_FIXED)
this.onButtonRow1Select();
else if (activeModeId == Modes.MODE_VOLUME)
new P2ButtonCommand(isUp, this.model, this.surface).execute(event);
else if (activeModeId == Modes.MODE_TRACK || activeModeId == Modes.MODE_MASTER)
new ButtonRowSelectCommand<>(3, this.model, this.surface).execute(event);
else if (activeModeId == Modes.MODE_TRACK_TOGGLES || activeModeId == Modes.MODE_FRAME)
this.onButtonRow2Select();
else {
if (isUp)
((DeviceParamsMode) modeManager.getMode(Modes.MODE_PARAMS)).nextPage();
else
((DeviceParamsMode) modeManager.getMode(Modes.MODE_PARAMS)).previousPage();
}
}
Aggregations