use of de.mossgrabers.controller.ni.maschine.mk3.command.trigger.MaschineCursorCommand in project DrivenByMoss by git-moss.
the class MaschineControllerSetup method registerCursorKeys.
private void registerCursorKeys(final MaschineControlSurface surface) {
if (!this.maschine.hasCursorKeys())
return;
this.addButton(ButtonID.ARROW_LEFT, "LEFT", new MaschineCursorCommand(Direction.LEFT, this.model, surface), MaschineControlSurface.CURSOR_LEFT, () -> this.getEncoderColor(ButtonID.ARROW_LEFT));
this.addButton(ButtonID.ARROW_RIGHT, "RIGHT", new MaschineCursorCommand(Direction.RIGHT, this.model, surface), MaschineControlSurface.CURSOR_RIGHT, () -> this.getEncoderColor(ButtonID.ARROW_RIGHT));
this.addButton(ButtonID.ARROW_UP, "UP", new ModeCursorCommand<>(Direction.UP, this.model, surface, false), MaschineControlSurface.CURSOR_UP, () -> this.getEncoderColor(ButtonID.ARROW_UP));
this.addButton(ButtonID.ARROW_DOWN, "DOWN", new ModeCursorCommand<>(Direction.DOWN, this.model, surface, false), MaschineControlSurface.CURSOR_DOWN, () -> this.getEncoderColor(ButtonID.ARROW_DOWN));
this.addButton(ButtonID.PAGE_LEFT, "PAGE LEFT", new PageCommand(Direction.LEFT, this.model, surface), MaschineControlSurface.PAGE_LEFT);
this.addButton(ButtonID.PAGE_RIGHT, "PAGE RIGHT", new PageCommand(Direction.RIGHT, this.model, surface), MaschineControlSurface.PAGE_RIGHT);
this.addButton(ButtonID.LAYOUT_ARRANGE, this.maschine == Maschine.STUDIO ? "ARRANGE" : "ARRANGER", new LayoutCommand<>(this.model, surface), MaschineControlSurface.ARRANGER);
this.addButton(ButtonID.MIXER, this.maschine == Maschine.STUDIO ? "MIX" : "MIXER", new PaneCommand<>(Panels.MIXER, this.model, surface), MaschineControlSurface.MIXER);
this.addButton(ButtonID.DRUM, this.maschine == Maschine.MK2 ? "CONTROL" : "CHANNEL", new AddTrackCommand<>(this.model, surface, null, ButtonID.STOP), MaschineControlSurface.CHANNEL);
}
Aggregations