diff PresetView.h @ 12:af71bf84660f

icon stuff. not working/tested.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 20 Oct 2014 14:12:23 +0100
parents 92850a2b099c
children ab3e0e980c82
line wrap: on
line diff
--- a/PresetView.h	Mon Oct 20 11:23:55 2014 +0100
+++ b/PresetView.h	Mon Oct 20 14:12:23 2014 +0100
@@ -8,23 +8,47 @@
 
 #ifndef __riftathon__PresetView__
 #define __riftathon__PresetView__
+#include "ofMain.h"
+#include <iostream>
+#include "UIProperties.h"
+#include "UIElement.h"
+#include "ofxiPhoneExtras.h"
+class PresetIconView{
+    
+public:
+    PresetIconView(string aName, string aImageFileName){
+        imageFileName = aImageFileName;
+        if (imageFileName != ""){
+            // these are NOT put in images/ directory for some reason...
+            string fname = ofFilePath::getAbsolutePath(ofToDataPath(imageFileName));
 
-#include <iostream>
+            ofFile f = ofFile(fname);
+            
+            
+            cout << fname << endl;
+            cout << f.exists() <<  endl;
+            
+            image.loadImage(fname);
+        }
+        
 
-#include "presetManager.h"
-#include "UIElement.h"
+        name = aName;
 
-class PresetIconView : public UIElement {
+        
+        
+    };
+
+    bool handleMyTouch(int x, int y, touchType ttype, int touchID){
+        return false;
+    }
+    ofImage* getImage(){
+        return &image;
+    }
+private:
     string imageFileName;
     
     ofImage image;
     string name;
-    
-    
-    
-    void draw();
-    
-    
 };
 
 #endif /* defined(__riftathon__PresetView__) */