-
Notifications
You must be signed in to change notification settings - Fork 0
/
MuRecrod.pde
50 lines (40 loc) · 1.01 KB
/
MuRecrod.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
class MuRecord extends MuObject {
MuRecord(TuioObject tobj) {
super(tobj);
init();
}
void init() {
action();
}
void action() {
mainBus.sendMessage(176, 0, 114, 127); //back to start
mainBus.sendMessage(176, 0, 114, 0);
mainBus.sendMessage(176, 0, 117, 127);
mainBus.sendMessage(176, 0, 117, 0);
}
MuObjectType getType() {
return MuObjectType.RECORD;
}
void update() {
}
void display() {
stroke(0);
fill(220, 220, 255);
//noFill();
strokeWeight(1);
pushMatrix();
translate(tobj.getScreenX(width), tobj.getScreenY(height));
rotate(tobj.getAngle());
rect(-obj_size/2, -obj_size/2, obj_size, obj_size);
popMatrix();
fill(0);
text(""+tobj.getSymbolID(), tobj.getScreenX(width), tobj.getScreenY(height));
}
//TODO
void dismiss() {
mainBus.sendMessage(176, 0, 117, 127);
mainBus.sendMessage(176, 0, 117, 0);
mainBus.sendMessage(176, 0, 114, 127); //back to start
mainBus.sendMessage(176, 0, 114, 0);
}
}