Search in sources :

Example 26 with ViewManager

use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.

the class NoteViewSelectMode method updateFirstRow.

/**
 * {@inheritDoc}
 */
@Override
public void updateFirstRow() {
    final ColorManager colorManager = this.model.getColorManager();
    final ViewManager viewManager = this.surface.getViewManager();
    for (int i = 0; i < 8; i++) this.surface.updateButton(20 + i, colorManager.getColor(VIEWS[i] == null ? AbstractMode.BUTTON_COLOR_OFF : viewManager.isActiveView(VIEWS[i]) ? AbstractMode.BUTTON_COLOR_HI : AbstractMode.BUTTON_COLOR_ON));
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Example 27 with ViewManager

use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.

the class NoteViewSelectMode method updateSecondRow.

/**
 * {@inheritDoc}
 */
@Override
public void updateSecondRow() {
    final ColorManager colorManager = this.model.getColorManager();
    final ViewManager viewManager = this.surface.getViewManager();
    for (int i = 0; i < 8; i++) this.surface.updateButton(102 + i, colorManager.getColor(VIEWS_TOP[i] == null ? AbstractMode.BUTTON_COLOR_OFF : viewManager.isActiveView(VIEWS_TOP[i]) ? AbstractMode.BUTTON_COLOR_HI : AbstractMode.BUTTON_COLOR_ON));
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Example 28 with ViewManager

use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.

the class NoteViewSelectMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay();
    final ViewManager viewManager = this.surface.getViewManager();
    d.clear().setBlock(1, 0, "Note view:");
    for (int i = 0; i < VIEWS.length; i++) {
        if (VIEWS[i] != null) {
            final View view = viewManager.getView(VIEWS[i]);
            d.setCell(3, i, view == null ? "" : (viewManager.isActiveView(VIEWS[i]) ? PushDisplay.RIGHT_ARROW : "") + view.getName());
        }
        if (VIEWS_TOP[i] != null)
            d.setCell(0, i, (viewManager.isActiveView(VIEWS_TOP[i]) ? PushDisplay.RIGHT_ARROW : "") + viewManager.getView(VIEWS_TOP[i]).getName());
    }
    d.allDone();
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) View(de.mossgrabers.framework.view.View) Display(de.mossgrabers.framework.controller.display.Display) PushDisplay(de.mossgrabers.push.controller.PushDisplay)

Example 29 with ViewManager

use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.

the class SessionViewSelectMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2() {
    final ViewManager viewManager = this.surface.getViewManager();
    final PushDisplay display = (PushDisplay) this.surface.getDisplay();
    final DisplayMessage message = display.createMessage();
    for (int i = 0; i < VIEWS.length; i++) {
        final boolean isMenuBottomSelected = VIEWS[i] != null && this.isSelected(viewManager, i);
        message.addOptionElement("", "", false, i == 0 ? "Session view" : "", VIEW_NAMES[i], isMenuBottomSelected, false);
    }
    display.send(message);
}
Also used : PushDisplay(de.mossgrabers.push.controller.PushDisplay) ViewManager(de.mossgrabers.framework.view.ViewManager) DisplayMessage(de.mossgrabers.push.controller.DisplayMessage)

Example 30 with ViewManager

use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.

the class SessionViewSelectMode method activateView.

private void activateView(final Integer viewID) {
    if (viewID == null)
        return;
    final ViewManager viewManager = this.surface.getViewManager();
    viewManager.setActiveView(viewID);
    this.surface.getModeManager().restoreMode();
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)64 ITrack (de.mossgrabers.framework.daw.data.ITrack)16 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)10 View (de.mossgrabers.framework.view.View)9 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)8 ModeManager (de.mossgrabers.framework.mode.ModeManager)7 DrumView (de.mossgrabers.launchpad.view.DrumView)7 PlayView (de.mossgrabers.launchpad.view.PlayView)7 RaindropsView (de.mossgrabers.launchpad.view.RaindropsView)7 SequencerView (de.mossgrabers.launchpad.view.SequencerView)7 AbstractSequencerView (de.mossgrabers.framework.view.AbstractSequencerView)6 ColorView (de.mossgrabers.push.view.ColorView)6 APCControlSurface (de.mossgrabers.apc.controller.APCControlSurface)5 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)5 IBrowser (de.mossgrabers.framework.daw.IBrowser)4 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)4 MCUControlSurface (de.mossgrabers.mcu.controller.MCUControlSurface)4 ColorManager (de.mossgrabers.framework.controller.color.ColorManager)3 Scales (de.mossgrabers.framework.scale.Scales)3 SceneView (de.mossgrabers.framework.view.SceneView)3