Skip to content

Commit 70ebc35

Browse files
committed
fix things
close #1 close #2 close #3
1 parent 5c0db12 commit 70ebc35

File tree

2 files changed

+64
-2
lines changed

2 files changed

+64
-2
lines changed

ScoreWindow/RefPWindow.pde

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,29 @@ class refPWindow extends PApplet {
5757
String[] stringsToSave={strToSave};
5858
saveStrings(filename, stringsToSave);
5959
}
60+
if (blueSide==Left) {
61+
if (keyPressed&&key=='5') {
62+
blueRP++;
63+
}
64+
if (keyPressed&&key=='6') {
65+
blueRP++;
66+
redRP++;
67+
}
68+
if (keyPressed&&key=='7') {
69+
redRP++;
70+
}
71+
} else {
72+
if (keyPressed&&key=='7') {
73+
blueRP++;
74+
}
75+
if (keyPressed&&key=='6') {
76+
blueRP++;
77+
redRP++;
78+
}
79+
if (keyPressed&&key=='5') {
80+
redRP++;
81+
}
82+
}
6083
}
6184
if (state>2) {
6285
state=-1;
@@ -73,7 +96,7 @@ class refPWindow extends PApplet {
7396
text("(b) "+ms[state+1], width*.6, height*.8, width*.1, height*.2);
7497
popStyle();
7598

76-
if (state==0||state==1) {
99+
if (state==0||state==1) {//match or review
77100
rectMode(CENTER);
78101
textSize(20);
79102
if (blueSide==Right) {
@@ -101,6 +124,9 @@ class refPWindow extends PApplet {
101124
text("(d) Tech Foul", width*.3, height*.5, width*.09, height*.2);
102125
text("(g) Climb", width*.4, height*.3, width*.09, height*.15);
103126
rectMode(CORNER);
127+
fill(0);
128+
text("ANTI Tech=e Foul=r", width*.3, height*.16);
129+
text("ANTI Foul=u Tech=i", width*.6, height*.16);
104130
}
105131
if (plateOverride) {
106132
rectMode(CENTER);
@@ -337,7 +363,36 @@ class refPWindow extends PApplet {
337363
blueTechFoulMillis=millis();
338364
}
339365
}
340-
366+
///////////////////////////////////////////////////////////
367+
if (key=='u') {
368+
if (blueSide==Left) {
369+
redPenaltyScore+=foulValue;
370+
} else {
371+
bluePenaltyScore+=foulValue;
372+
}
373+
}
374+
if (key=='i') {
375+
if (blueSide==Left) {
376+
redPenaltyScore+=techFoulValue;
377+
} else {
378+
bluePenaltyScore+=techFoulValue;
379+
}
380+
}
381+
if (key=='r') {
382+
if (blueSide==Right) {
383+
redPenaltyScore+=foulValue;
384+
} else {
385+
bluePenaltyScore+=foulValue;
386+
}
387+
}
388+
if (key=='e') {
389+
if (blueSide==Right) {
390+
redPenaltyScore+=techFoulValue;
391+
} else {
392+
bluePenaltyScore+=techFoulValue;
393+
}
394+
}
395+
/////////////////////////////////////////////
341396
if (key=='g') {
342397
if (blueSide==Right) {
343398
redClimbs++;

ScoreWindow/ScoreWindow.pde

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ void draw() {
153153
textSize(20);
154154
fill(0);
155155
text("pre match", width/2, height/2);
156+
if (blueSide==Right) {
157+
drawSwitchScaleIcon(width*.2, height*.9, color(255, 0, 0), color(150), redSwitch(), redScale());
158+
drawSwitchScaleIcon(width*.8, height*.9, color(0, 0, 255), color(150), blueSwitch(), blueScale());
159+
} else {
160+
drawSwitchScaleIcon(width*.2, height*.9, color(0, 0, 255), color(150), blueSwitch(), blueScale());
161+
drawSwitchScaleIcon(width*.8, height*.9, color(255, 0, 0), color(150), redSwitch(), redScale());
162+
}
156163
}
157164

158165
if (state==2) {

0 commit comments

Comments
 (0)