use of de.mossgrabers.framework.command.trigger.view.ViewMultiSelectCommand in project DrivenByMoss by git-moss.
the class LaunchkeyMiniMk3ControllerSetup method createViewButton.
private void createViewButton(final ButtonID buttonID, final OutputID outputID, final String label, final Views view, final int viewIndex) {
final LaunchkeyMiniMk3ControlSurface surface = this.getSurface();
final ViewMultiSelectCommand<LaunchkeyMiniMk3ControlSurface, LaunchkeyMiniMk3Configuration> viewSelectCommand = new ViewMultiSelectCommand<>(this.model, surface, true, view);
this.addButton(surface, buttonID, label, (event, velocity) -> {
viewSelectCommand.executeNormal(event);
surface.getPadGrid().setView(view);
}, 15, LaunchkeyMiniMk3ControlSurface.LAUNCHKEY_VIEW_SELECT, viewIndex, false, null);
final IHwLight light = surface.createLight(outputID, () -> surface.getViewManager().isActive(view) ? ColorEx.ORANGE : ColorEx.DARK_ORANGE, color -> {
// Intentionally empty
});
surface.getButton(buttonID).addLight(light);
}
use of de.mossgrabers.framework.command.trigger.view.ViewMultiSelectCommand in project DrivenByMoss by git-moss.
the class LaunchkeyMk3ControllerSetup method createViewButton.
private void createViewButton(final ButtonID buttonID, final OutputID outputID, final String label, final Views view, final int viewIndex) {
final LaunchkeyMk3ControlSurface surface = this.getSurface();
final ViewMultiSelectCommand<LaunchkeyMk3ControlSurface, LaunchkeyMk3Configuration> viewSelectCommand = new ViewMultiSelectCommand<>(this.model, surface, true, view);
this.addButton(surface, buttonID, label, (event, velocity) -> {
viewSelectCommand.executeNormal(event);
if (event == ButtonEvent.DOWN)
surface.getPadGrid().setView(view);
}, 15, LaunchkeyMk3ControlSurface.LAUNCHKEY_VIEW_SELECT, viewIndex, false, null);
final IHwLight light = surface.createLight(outputID, () -> surface.getViewManager().isActive(view) ? ColorEx.ORANGE : ColorEx.DARK_ORANGE, color -> {
// Intentionally empty
});
surface.getButton(buttonID).addLight(light);
}
Aggregations