-
Notifications
You must be signed in to change notification settings - Fork 0
/
speakerbuttons.pde
86 lines (83 loc) · 3.56 KB
/
speakerbuttons.pde
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
public void startclick(GButton source, GEvent event) { //_CODE_:speakerlist:275163:
println("button3 - GButton >> GEvent." + event + " @ " + millis());
if(modetype == "modcaucus"){
spokentimertimer.start();
timespoken.start();
positionarray.get(numspeak).setSpeeches(positionarray.get(numspeak).getSpeeches() + 1);
totalspeeches++;
}
modcaucustime.start();
caucustimertimer.start();
} //_CODE_:speakerlist:275163:
public void nextclick(GButton source, GEvent event) { //_CODE_:speakerlist:275163:
println("button3 - GButton >> GEvent." + event + " @ " + millis());
background(backgroundcolour);
spokentimertimerincrementor = 0;
modcaucustime.stop();
timespoken.stop();
spokentimertimer.stop();
caucustimertimer.stop();
spokentimer = 0;
spokentimerbarlabel.setText("");
if(numspeak < positionarray.size() - 1){
numspeak++;
}
else{
numspeak = 0;
}
positionspeaking.setText(this.positionarray.get(numspeak).getPosition());
positionspeakingimage = loadImage("images/" + positionarray.get(numspeak).getImageurl());
image(positionspeakingimage, (width / 2 - positionspeakingimage.width / 2/10) - width/6, ((height / 2) - positionspeakingimage.height/2/10) - height/5, positionspeakingimage.width/8, positionspeakingimage.height/8);
loadingbar = loadImage("images/loadingbar.png");
image(loadingbar, width / 4, 2 * height / 3, width / 2, loadingbar.height);
loadingbar2 = loadImage("images/loadingbar.png");
image(loadingbar2, width / 4, 2 * height / 3 + loadingbar.height, width / 2, loadingbar.height);
image(loadingbarcaucus, width / 4, 2 * height / 3 + loadingbar.height);
}
public void resetclick(GButton source, GEvent event){
if(modetype == "modcaucus"){
caucustimer = 0;
spokentimer = 0;
modcaucustime.stop();
timespoken.stop();
caucustimertimer.stop();
spokentimertimer.stop();
caucustimertimerincrementor = 0;
spokentimertimerincrementor = 0;
numspeak = 0;
background(backgroundcolour);
positionspeakingimage = loadImage("images/" + positionarray.get(numspeak).getImageurl());
image(positionspeakingimage, (width / 2 - positionspeakingimage.width / 2/10) - width/6, ((height / 2) - positionspeakingimage.height/2/10) - height/5, positionspeakingimage.width/8, positionspeakingimage.height/8);
positionspeaking.setTextAlign(GAlign.CENTER, GAlign.MIDDLE);
positionspeaking.setText(this.positionarray.get(numspeak).getPosition());
positionspeaking.setOpaque(false);
caucustimerbarlabel.setText("");
spokentimerbarlabel.setText("");
loadingbar = loadImage("images/loadingbar.png");
image(loadingbar, width / 4, 2 * height / 3, width / 2, loadingbar.height);
loadingbar2 = loadImage("images/loadingbar.png");
image(loadingbar2, width / 4, 2 * height / 3 + loadingbar.height, width / 2, loadingbar.height);
}
else if(modetype == "unmodcaucus"){
caucustimer = 0;
spokentimer = 0;
modcaucustime.stop();
timespoken.stop();
caucustimertimer.stop();
spokentimertimer.stop();
caucustimertimerincrementor = 0;
spokentimertimerincrementor = 0;
numspeak = 0;
background(backgroundcolour);
caucustimerbarlabel.setText("");
spokentimerbarlabel.setText("");
loadingbar2 = loadImage("images/loadingbar.png");
image(loadingbar2, width / 4, 2 * height / 3 + loadingbar.height, width / 2, loadingbar.height);
}
}
int bob = 0;
public void pauseclick(GButton source, GEvent event){
modcaucustime.stop();
timespoken.stop();
spokentimertimer.stop();
}