@@ -46,7 +46,6 @@ String getMonth(int id) { | |||
} | |||
ArrayList<Notebook> notebooks = new ArrayList<Notebook>(); | |||
void createNotebooks() { | |||
File datafolder = new File(dataPath("") + "/Notizhefte"); |
@@ -9,12 +9,9 @@ PImage Slide(int notebookID, int pageNumber) { | |||
result.image(leftPage, 0, 0, result.width/2, result.height); | |||
result.image(rightPage, result.width/2, 0, result.width/2, result.height); | |||
result.endDraw(); | |||
PImage res = createImage(width, height, ARGB); | |||
res = result.get(); | |||
return res; | |||
return result.get(); | |||
} | |||
boolean transition; | |||
void nextSlide() { | |||
transition = true; | |||
@@ -25,10 +22,11 @@ void nextSlide() { | |||
if (currentSlideNo > notebooks.get(currentNotebookNo).imagepaths.length-1) { | |||
currentSlideNo = 0; | |||
currentNotebookNo++; | |||
if(currentNotebookNo == notebooks.size()) currentNotebookNo = 0; | |||
} | |||
} else if (mode == RANDOM) { | |||
currentNotebookNo = (int)random(notebooks.size()); | |||
currentSlideNo = (int)random(notebooks.get(currentNotebookNo).imagepaths.length); | |||
currentSlideNo = (int)random(notebooks.get(currentNotebookNo).imagepaths.length-1); | |||
if (currentSlideNo %2 != 0) { | |||
currentSlideNo -= 1; | |||
} |
@@ -1,2 +1,2 @@ | |||
168 | |||
0 | |||
8 |
@@ -2,17 +2,20 @@ import java.util.*; | |||
//////// Config | |||
int mode = NORMAL; //NORMAL or RANDOM order | |||
float timerTime = 5000; //in milliseconds how long slide is shown | |||
float transitionTime = 3000; //how long it takes to fade the next slide in. must not be greater than "timerTime" | |||
int mode = RANDOM; //NORMAL or RANDOM order | |||
float timerTime = 250; //in milliseconds how long slide is shown | |||
float transitionTime = 100; //how long it takes to fade the next slide in. must not be greater than "timerTime" | |||
boolean displayText = true; //if the "date" should be written on screen | |||
boolean displayTimeline = true; //if the timeline should be drawn on screen | |||
// | |||
Timer timer; | |||
ArrayList<Notebook> notebooks = new ArrayList<Notebook>(); | |||
PImage currentSlide, nextSlide; | |||
int currentNotebookNo, currentSlideNo; | |||
int startTransitionTime; | |||
boolean transition; | |||
float transitionProgress; | |||
final static int NORMAL = 0; | |||
final static int RANDOM = 1; |