+class UIMidi extends UIWindow {
+
+ final private UIToggleSet deckMode;
+
+ UIMidi(List<MidiListener> midiListeners, float x, float y, float w, float h) {
+ super("MIDI", x, y, w, h);
+ // Processing compiler doesn't seem to get that list of class objects also conform to interface
+ List<ScrollItem> scrollItems = new ArrayList<ScrollItem>();
+ for (MidiListener ml : midiListeners) {
+ scrollItems.add(ml);
+ }
+ new UIScrollList(1, titleHeight, w-2, 80).setItems(scrollItems).addToContainer(this);
+ (deckMode = new UIToggleSet(4, 110, w-9, 20)).setOptions(new String[] { "A", "B" }).addToContainer(this);
+ }
+
+ public Engine.Deck getFocusedDeck() {
+ return lx.engine.getDeck(deckMode.getValue() == "A" ? 0 : 1);
+ }
+}
+