-
Notifications
You must be signed in to change notification settings - Fork 0
/
TypeSelectScene.js
81 lines (65 loc) · 1.37 KB
/
TypeSelectScene.js
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
let highButton, midButton, lowButton;
function TypeSelectScene(){
this.hide = function(){
}
this.show = function(){
}
this.setup = function(){
// HIGH BUTTON
highButton = new Button({
x: width / 2, y: (height / 2) - 150,
width: 200, height: 100,
align_x: 0, align_y: 0,
content: 'Light',
on_release() {
highClicked();
}
});
highButton.style("default", {
text_size: 32, text_font: font});
// MID BUTTON
midButton = new Button({
x: width / 2, y: height / 2,
width: 200, height: 100,
align_x: 0, align_y: 0,
content: 'Medium',
on_release() {
midClicked();
}
});
midButton.style("default", {
text_size: 32, text_font: font});
// HIGH BUTTON
lowButton = new Button({
x: width / 2, y: (height / 2) + 150,
width: 200, height: 100,
align_x: 0, align_y: 0,
content: 'Heavy',
on_release() {
lowClicked();
}
});
lowButton.style("default", {
text_size: 32, text_font: font});
}
this.draw = function(){
background(0);
highButton.draw();
midButton.draw();
lowButton.draw();
}
this.mousePressedDelegate = function(){
}
}
function highClicked(){
fwk_type = 0;
navigateToScene(1);
}
function midClicked(){
fwk_type = 1;
navigateToScene(1);
}
function lowClicked(){
fwk_type = 2;
navigateToScene(1);
}