+class UISpeed extends UIWindow {
+ UISpeed(float x, float y, float w, float h) {
+ super("SPEED", x, y, w, h);
+ new UIParameterSlider(4, titleHeight, w-10, 20)
+ .setParameter(new BasicParameter("SPEED", 0.5).addListener(new LXParameter.Listener() {
+ public void onParameterChanged(LXParameter parameter) {
+ lx.setSpeed(parameter.getValuef() * 2);
+ }
+ })).addToContainer(this);
+ }
+}
+
+class UIMidi extends UIWindow {
+
+ private final UIToggleSet deckMode;
+ private final UIButton logMode;
+
+ 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, 100).setItems(scrollItems).addToContainer(this);
+ (deckMode = new UIToggleSet(4, 130, 90, 20)).setOptions(new String[] { "A", "B" }).addToContainer(this);
+ (logMode = new UIButton(98, 130, w-103, 20)).setLabel("LOG").addToContainer(this);
+ }
+
+ public boolean logMidi() {
+ return logMode.isActive();
+ }
+
+ public Engine.Deck getFocusedDeck() {
+ return lx.engine.getDeck(deckMode.getValue() == "A" ? 0 : 1);
+ }
+}
+