-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathStartScreen.js
More file actions
36 lines (30 loc) · 984 Bytes
/
StartScreen.js
File metadata and controls
36 lines (30 loc) · 984 Bytes
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
function StartScreen() {
this.setup = function () {
new Canvas();
let gold = color(242, 185, 11);
let darkblue = color(31, 75, 126);
let button = createButton("Press to Begin");
button.position((width / 2) - 187, (height / 2) - 25);
button.size(375, 75);
button.style('font-size', '50px');
button.style('background-color', gold);
button.style('color', darkblue);
button.style('font-family', "Pixelify Sans");
button.style('border-color', darkblue);
button.mousePressed(() => {
button.hide();
this.sceneManager.showScene(Lobby);
});
}
this.draw = function () {
image(campus_bg, 0, 0, width, height);
fill(255, 255, 255, 191);
rect((width / 2) - 210, (height / 2) - 75, 420, 175)
fill(31, 75, 126);
text("Emmanuel College", width / 2, height / 2 - 50);
text("Prop Hunt", width / 2, height / 2 + 75);
textSize(50);
textFont("Pixelify Sans");
textAlign(CENTER, CENTER);
}
}