diff UI code/sliderPanel.h @ 2:851833072cf1

panel has 8 sliders if needed. sliders should get set by midi input.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 10 Oct 2014 18:13:24 +0100
parents a223551fdc1f
children f83635861187
line wrap: on
line diff
--- a/UI code/sliderPanel.h	Fri Oct 10 13:20:55 2014 +0100
+++ b/UI code/sliderPanel.h	Fri Oct 10 18:13:24 2014 +0100
@@ -71,7 +71,14 @@
     //------------------------
     vector<UIElement*> generateControls(vector<controllerType> elemList, controlPanelType panelType);
     //------------------------
-    
+    UIElement* getSlider(int index){
+        if (index < subElements.size()){
+            return subElements[index];
+        }else{
+            cout << "ERROR: index too big for sldiers" << endl;
+            return NULL;
+        }
+    };
     // TODO override touch thing to make revisitable
 private:
     bool flashing;