Remove select() from UIScrollList, just mouse events
[SugarCubes.git] / _UIFramework.pde
index 7ed25850346f1a9ce7b67c33e8b9eec17cb5c194..ba5a8c8e2b8ac1cd1a10b6887fb5b24fdd2befd6 100644 (file)
@@ -655,8 +655,11 @@ public class UIScrollList extends UIObject {
         itemColor = pendingColor;
       } else {
         labelColor = #000000;
-        itemColor = even ? #666666 : #777777;
+        itemColor = #707070;
       }
+      float factor = even ? .92 : 1.08;
+      itemColor = color(hue(itemColor), saturation(itemColor), min(100, factor*brightness(itemColor)));
+      
       pg.noStroke();
       pg.fill(itemColor);
       pg.rect(0, yp, w, itemHeight);
@@ -693,7 +696,6 @@ public class UIScrollList extends UIObject {
       if (scrollOffset + index < items.size()) {
         pressedItem = items.get(scrollOffset + index);
         pressedItem.onMousePressed();
-        pressedItem.select();
         redraw();
       }
     }
@@ -751,7 +753,6 @@ public interface ScrollItem {
   public boolean isSelected();
   public boolean isPending();
   public String getLabel();
-  public void select();
   public void onMousePressed();
   public void onMouseReleased();  
 }