annotate 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
rev   line source
rt300@6 1 //
rt300@6 2 // PresetView.h
rt300@6 3 // riftathon
rt300@6 4 //
rt300@6 5 // Created by Robert Tubb on 17/10/2014.
rt300@6 6 //
rt300@6 7 //
rt300@6 8
rt300@6 9 #ifndef __riftathon__PresetView__
rt300@6 10 #define __riftathon__PresetView__
rt300@12 11 #include "ofMain.h"
rt300@12 12 #include <iostream>
rt300@12 13 #include "UIProperties.h"
rt300@12 14 #include "UIElement.h"
rt300@12 15 #include "ofxiPhoneExtras.h"
rt300@12 16 class PresetIconView{
rt300@12 17
rt300@12 18 public:
rt300@12 19 PresetIconView(string aName, string aImageFileName){
rt300@12 20 imageFileName = aImageFileName;
rt300@12 21 if (imageFileName != ""){
rt300@12 22 // these are NOT put in images/ directory for some reason...
rt300@12 23 string fname = ofFilePath::getAbsolutePath(ofToDataPath(imageFileName));
rt300@6 24
rt300@12 25 ofFile f = ofFile(fname);
rt300@12 26
rt300@12 27
rt300@12 28 cout << fname << endl;
rt300@12 29 cout << f.exists() << endl;
rt300@12 30
rt300@12 31 image.loadImage(fname);
rt300@12 32 }
rt300@12 33
rt300@6 34
rt300@12 35 name = aName;
rt300@6 36
rt300@12 37
rt300@12 38
rt300@12 39 };
rt300@12 40
rt300@12 41 bool handleMyTouch(int x, int y, touchType ttype, int touchID){
rt300@12 42 return false;
rt300@12 43 }
rt300@12 44 ofImage* getImage(){
rt300@12 45 return &image;
rt300@12 46 }
rt300@12 47 private:
rt300@6 48 string imageFileName;
rt300@6 49
rt300@6 50 ofImage image;
rt300@6 51 string name;
rt300@6 52 };
rt300@6 53
rt300@6 54 #endif /* defined(__riftathon__PresetView__) */