summaryrefslogtreecommitdiff
path: root/vfg/src/Tag.h
diff options
context:
space:
mode:
Diffstat (limited to 'vfg/src/Tag.h')
-rwxr-xr-xvfg/src/Tag.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/vfg/src/Tag.h b/vfg/src/Tag.h
new file mode 100755
index 0000000..a75e442
--- /dev/null
+++ b/vfg/src/Tag.h
@@ -0,0 +1,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