Mercurial > hg > tweakathon2ios
comparison 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 |
comparison
equal
deleted
inserted
replaced
11:91c3fba6e5b9 | 12:af71bf84660f |
---|---|
6 // | 6 // |
7 // | 7 // |
8 | 8 |
9 #ifndef __riftathon__PresetView__ | 9 #ifndef __riftathon__PresetView__ |
10 #define __riftathon__PresetView__ | 10 #define __riftathon__PresetView__ |
11 #include "ofMain.h" | |
12 #include <iostream> | |
13 #include "UIProperties.h" | |
14 #include "UIElement.h" | |
15 #include "ofxiPhoneExtras.h" | |
16 class PresetIconView{ | |
17 | |
18 public: | |
19 PresetIconView(string aName, string aImageFileName){ | |
20 imageFileName = aImageFileName; | |
21 if (imageFileName != ""){ | |
22 // these are NOT put in images/ directory for some reason... | |
23 string fname = ofFilePath::getAbsolutePath(ofToDataPath(imageFileName)); | |
11 | 24 |
12 #include <iostream> | 25 ofFile f = ofFile(fname); |
26 | |
27 | |
28 cout << fname << endl; | |
29 cout << f.exists() << endl; | |
30 | |
31 image.loadImage(fname); | |
32 } | |
33 | |
13 | 34 |
14 #include "presetManager.h" | 35 name = aName; |
15 #include "UIElement.h" | |
16 | 36 |
17 class PresetIconView : public UIElement { | 37 |
38 | |
39 }; | |
40 | |
41 bool handleMyTouch(int x, int y, touchType ttype, int touchID){ | |
42 return false; | |
43 } | |
44 ofImage* getImage(){ | |
45 return ℑ | |
46 } | |
47 private: | |
18 string imageFileName; | 48 string imageFileName; |
19 | 49 |
20 ofImage image; | 50 ofImage image; |
21 string name; | 51 string name; |
22 | |
23 | |
24 | |
25 void draw(); | |
26 | |
27 | |
28 }; | 52 }; |
29 | 53 |
30 #endif /* defined(__riftathon__PresetView__) */ | 54 #endif /* defined(__riftathon__PresetView__) */ |