From 87c535995a59391b50a242a9a71bc0c420da399c Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 13 Jun 2017 23:34:14 +0100 Subject: looking good --- menuApp/src/dirscanner.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'menuApp/src/dirscanner.h') diff --git a/menuApp/src/dirscanner.h b/menuApp/src/dirscanner.h index 1e70ed8..4512842 100644 --- a/menuApp/src/dirscanner.h +++ b/menuApp/src/dirscanner.h @@ -16,15 +16,22 @@ class timeSlot { class playItem { public: + playItem(){ + loaded=0; + isFinished=false; + } playItem(std::string _n){ filename=_n; + playItem(); } string filename; ofImage image; ofVideoPlayer video; + int loaded; //0- none, 1- image, 2- mov + bool load(string filename); void play(); void draw(); - bool isFinished(); + bool isFinished; float startTime; }; @@ -34,7 +41,7 @@ class dirScanner { dirScanner(std::string _d=""){ rootdir=_d; } - int getSlotForTime(int time); + int getSlotForTime(); string rootdir; void scan(); vector slots; @@ -42,11 +49,18 @@ class dirScanner { class dirPlayer { public: - dirPlayer(std::string _d){ - playdir=_d; + dirPlayer(){ + currentslot=-1; + } + dirPlayer(dirScanner *_s){ + scanner=_s; + dirPlayer(); } vector items; string playdir; - void load(); - void draw(); + int currentslot; + dirScanner *scanner; + void load(std::string path); + bool draw(); + int currentItem; }; \ No newline at end of file -- cgit v1.2.3