From: Mark Slee Date: Thu, 19 Sep 2013 20:07:46 +0000 (-0700) Subject: Remove select() from UIScrollList, just mouse events X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8f7f055d9fa923583e4f00a77959fda8ca7c89ed;p=SugarCubes.git Remove select() from UIScrollList, just mouse events --- diff --git a/_UIFramework.pde b/_UIFramework.pde index c2ac505..ba5a8c8 100644 --- a/_UIFramework.pde +++ b/_UIFramework.pde @@ -696,7 +696,6 @@ public class UIScrollList extends UIObject { if (scrollOffset + index < items.size()) { pressedItem = items.get(scrollOffset + index); pressedItem.onMousePressed(); - pressedItem.select(); redraw(); } } @@ -754,7 +753,6 @@ public interface ScrollItem { public boolean isSelected(); public boolean isPending(); public String getLabel(); - public void select(); public void onMousePressed(); public void onMouseReleased(); } diff --git a/_UIImplementation.pde b/_UIImplementation.pde index 03379ce..c2d073c 100644 --- a/_UIImplementation.pde +++ b/_UIImplementation.pde @@ -80,7 +80,7 @@ class UIPatternDeck extends UIWindow { return deck.getNextPattern() == pattern; } - public void select() { + public void onMousePressed() { deck.goPattern(pattern); } } @@ -126,7 +126,7 @@ class TransitionScrollItem extends AbstractScrollItem { return false; } - public void select() { + public void onMousePressed() { lx.engine.getDeck(1).setBlendTransition(transition); } } @@ -192,10 +192,6 @@ class UIEffects extends UIWindow { return effect.isEnabled(); } - public void select() { - glucose.setSelectedEffect(effect); - } - public void onMousePressed() { if (glucose.getSelectedEffect() == effect) { if (effect.isMomentary()) { @@ -203,6 +199,8 @@ class UIEffects extends UIWindow { } else { effect.toggle(); } + } else { + glucose.setSelectedEffect(effect); } } @@ -249,7 +247,7 @@ class UIOutput extends UIWindow { return panda.isEnabled(); } - public void select() { + public void onMousePressed() { panda.toggle(); } }