use of de.mossgrabers.framework.controller.color.ColorManager in project DrivenByMoss by git-moss.
the class SessionView method getButtonColor.
/**
* {@inheritDoc}
*/
@Override
public int getButtonColor(final ButtonID buttonID) {
final ISceneBank sceneBank = this.model.getSceneBank();
final ColorManager colorManager = this.model.getColorManager();
if (buttonID == ButtonID.ARROW_UP || buttonID == ButtonID.ARROW_DOWN) {
final boolean isOn = buttonID == ButtonID.ARROW_UP ? sceneBank.canScrollPageBackwards() : sceneBank.canScrollPageForwards();
return isOn ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREEN : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREY_LO;
}
if (!ButtonID.isSceneButton(buttonID))
return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
if (buttonID == ButtonID.SCENE1)
return colorManager.getColorIndex(getSceneColor(sceneBank.getItem(0)));
if (this.padMode == null)
return colorManager.getColorIndex(getSceneColor(sceneBank.getItem(1)));
switch(this.padMode) {
case REC_ARM:
return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_RED_HI;
case TRACK_SELECT:
return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_WHITE;
case MUTE:
return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_AMBER_HI;
case SOLO:
return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_HI;
case STOP_CLIP:
return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_ROSE;
default:
return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
}
}
Aggregations