view PresetView.h @ 30:78b51f924ec1

twiddles
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Tue, 04 Nov 2014 14:37:35 +0000
parents ab3e0e980c82
children
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);
            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__) */