view 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 source
//
//  PresetView.h
//  riftathon
//
//  Created by Robert Tubb on 17/10/2014.
//
//

#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));

            ofFile f = ofFile(fname);
            
            
            cout << fname << endl;
            cout << f.exists() <<  endl;
            
            image.loadImage(fname);
        }
        

        name = aName;

        
        
    };

    bool handleMyTouch(int x, int y, touchType ttype, int touchID){
        return false;
    }
    ofImage* getImage(){
        return &image;
    }
private:
    string imageFileName;
    
    ofImage image;
    string name;
};

#endif /* defined(__riftathon__PresetView__) */