summaryrefslogtreecommitdiff
path: root/vfg/src/Tag.h
blob: a75e442b52fd0e5691c0937252d6fd632e2039cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef TAG_H
#define TAG_H

#include "ofMain.h"

//class for resolution independent ofImage billbaord & level tag animator

class Billboard
{
	public:
		Billboard(string name,float xPct=0.5f,float yPct=0.5f) {
			img.loadImage(name);
			anchorPoint=ofPoint(img.getWidth()*xPct,img.getHeight()*yPct);
		}
		void draw(float x, float y, float scale=1.0f);
	protected:
		ofImage img;
		ofPoint anchorPoint;
        private:
	    
};

class Tag: public Billboard {
	public:
		Tag(string name,int d,float xPct=0.5f,float yPct=0.5f): Billboard(name,xPct,yPct) {duration =d; };
		void draw(float x, float y, float scale=1.0f);
		void play();
		bool isPlaying;
	protected:		
		int startTime;
		int duration;
};

#endif // TAG_H