-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.js
55 lines (51 loc) · 2.19 KB
/
menu.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
class Menu{
resume
restart
change_user
div_background
game
constructor() {
this.resume = document.createElement('div')
document.body.appendChild(this.resume)
this.resume.style.position = "absolute"
this.resume.style.width = `${scale*6}px`
this.resume.style.height = `${scale}px`
this.resume.style.backgroundColor = "white"
this.resume.style.opacity = "0"
this.resume.style.top = `${scale*7}px`
this.resume.style.left = `${scale*2}px`
this.resume.style.fontSize = `${scale}px`
this.resume.innerHTML = "Resume"
this.restart = document.createElement('div')
document.body.appendChild(this.restart)
this.restart.style.position = "absolute"
this.restart.style.width = `${scale*6}px`
this.restart.style.height = `${scale}px`
this.restart.style.backgroundColor = "white"
this.restart.style.opacity = "0"
this.restart.style.top = `${scale*9}px`
this.restart.style.left = `${scale*2}px`
this.restart.style.fontSize = `${scale}px`
this.restart.innerHTML = "Restart"
this.change_user = document.createElement('div')
document.body.appendChild(this.change_user)
this.change_user.style.position = "absolute"
this.change_user.style.width = `${scale*6}px`
this.change_user.style.height = `${scale}px`
this.change_user.style.backgroundColor = "white"
this.change_user.style.opacity = "0"
this.change_user.style.top = `${scale*11}px`
this.change_user.style.left = `${scale*2}px`
this.change_user.style.fontSize = `${scale}px`
this.change_user.innerHTML = "Change user"
this.div_background = document.createElement('div')
document.body.appendChild(this.div_background)
this.div_background.style.position = "absolute"
this.div_background.style.width = `${scale*16+2}px`
this.div_background.style.height = `${scale*20+2}px`
this.div_background.style.backgroundColor = "lightgrey"
this.div_background.style.opacity = "0"
this.div_background.style.top = "0px"
this.div_background.style.left = "0px"
}
}