forked from ynoproject/forest-orb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gamecanvas.css
122 lines (101 loc) · 2.12 KB
/
gamecanvas.css
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
:root {
--color-gray: hsl(0, 0%, 55%);
--controls-size: 10vh;
}
@media (orientation: landscape) {
:root {
--controls-size: 20vh;
}
}
html {
touch-action: none;
}
#status {
font-size: 1.5rem;
color: var(--color-gray);
text-align: center;
}
#gameContainer {
width: 100%;
height: 100%;
}
#dpad, #apad {
position: fixed;
bottom: 1rem;
z-index: 3;
}
#dpad {
left: 1rem;
}
@media (orientation: landscape) {
#layout.overflow #dpad {
left: 72px;
}
#content.noSideBorders #layout.overflow #dpad {
left: 48px;
}
#layout:fullscreen.overflow #dpad {
left: 48px;
}
}
#apad {
right: 1rem;
}
#dpad svg {
width: calc(2 * var(--controls-size));
height: calc(2 * var(--controls-size));
fill: var(--color-gray);
}
#dpad svg rect {
opacity: 0.4;
}
#apad > * {
width: var(--controls-size);
height: var(--controls-size);
}
#apad .apadBtn {
width: var(--controls-size);
height: var(--controls-size);
background-color: var(--color-gray);
border-radius: 50%;
}
#apad > :nth-child(2) {
position: relative;
right: var(--controls-size);
}
#apad .apadRectBtn {
position: relative;
border-radius: 10%;
margin-top: calc(var(--controls-size) * -0.4);
bottom: calc(var(--controls-size) * 0.05);
left: calc(var(--controls-size) * 0.2);
width: calc(var(--controls-size) * 0.6);
height: calc(var(--controls-size) * 0.4);
}
#apad .apadSqBtn {
border-radius: 10%;
width: calc(var(--controls-size) * 0.3);
height: calc(var(--controls-size) * 0.3);
}
#apad .apadBtnContainer {
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
align-items: center;
margin-bottom: calc(var(--controls-size) * -0.8);
top: calc(var(--controls-size) * -0.9);
left: calc(var(--controls-size) * 0.1);
width: calc(var(--controls-size) * 0.8);
height: calc(var(--controls-size) * 0.8);
}
#apad .apadRectBtn + .apadBtnContainer {
top: calc(var(--controls-size) * -1.9);
left: calc(var(--controls-size) * -0.9);
}
#dpad path:not(.active), #apad .apadBtn:not(.active) {
opacity: 0.4;
}
#layout:fullscreen #dpad, #layout:fullscreen #apad {
bottom: 6rem;
}