-
Notifications
You must be signed in to change notification settings - Fork 0
/
SNESOverlayMinimalv2.css
331 lines (313 loc) · 8.51 KB
/
SNESOverlayMinimalv2.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
/*
https://gamepadviewer.com/?p=1&css=https://ajsnyder.github.io/SNES-Controller-Minimal/SNESOverlayMinimal.css&map={"mapping":[{"targetType":"buttons","target":"0","disabled":false,"choiceType":"buttons","choice":"1"},{"targetType":"buttons","target":"1","disabled":false,"choiceType":"buttons","choice":"0"},{"targetType":"buttons","target":"2","disabled":false,"choiceType":"buttons","choice":"3"},{"targetType":"buttons","target":"3","disabled":false,"choiceType":"buttons","choice":"2"},{"targetType":"buttons","target":"4","disabled":false,"choiceType":"buttons","choice":"4"},{"targetType":"buttons","target":"5","disabled":false,"choiceType":"buttons","choice":"5"},{"targetType":"buttons","target":"6","disabled":false,"choiceType":"buttons","choice":"9"},{"targetType":"buttons","target":"7","disabled":false,"choiceType":"buttons","choice":"8"},{"targetType":"buttons","target":"10","disabled":false,"choiceType":"buttons","choice":"10"},{"targetType":"buttons","target":"11","disabled":false,"choiceType":"buttons","choice":"11"},{"targetType":"axes","target":"0","disabled":false,"choiceType":"","positive":{"choiceType":"buttons","choice":"15"},"negative":{"choiceType":"buttons","choice":"14"}},{"targetType":"axes","target":"1","disabled":false,"choiceType":"","positive":{"choiceType":"buttons","choice":"13"},"negative":{"choiceType":"buttons","choice":"12"}},{"targetType":"axes","target":"2","disabled":false,"choiceType":"","positive":{"choiceOperand":"+","choiceType":"axes","choice":"2"},"negative":{"choiceOperand":"-","choiceType":"axes","choice":"2"}},{"targetType":"axes","target":"3","disabled":false,"choiceType":"","positive":{"choiceOperand":"+","choiceType":"axes","choice":"3"},"negative":{"choiceOperand":"-","choiceType":"axes","choice":"3"}}]}
*/
.controller.custom{
background: url(SNESOverlayMinimal.svg);
background-repeat: no-repeat;
background-position: 0px 0px;
width: 460px;
height: 46px;
}
.custom.disconnected {
background: url(SNESOverlayMinimalDisconnected.svg);
background-repeat: no-repeat;
}
.custom.disconnected div {
display: none;
}
/* CLR browser maps SELECT and START to the triggers.
* So the following is for the START and SELECT and not
* for the triggers.*/
.custom .triggers{
position: absolute;
width: 460px;
height: 46px;
top: 0px;
left: 0px;
}
.custom .trigger{
opacity: 0;
}
.custom .trigger.pressed{
opacity: 1;
}
/* Left trigger is bound to the down arrow, so using assets for down arrow accordingly */
.custom .trigger.left{
position: absolute;
top: 0px;
left: 115px;
width: 46px;
height: 46px;
background: url(Assets/SNESOverlayMinimalDown.svg);
background-position: 0px 0px;
}
/* Right trigger is bound to the Y button, so using assets for Y button accordingly */
.custom .trigger.right{
position: absolute;
top: 0px;
left: 253px;
width: 46px;
height: 46px;
background: url(Assets/SNESOverlayMinimalY.svg);
background-position: 0px 0px;
}
.custom .bumpers{
width: 460px;
height: 46px;
position: absolute;
left: 0px;
top: 0px;
}
.custom .bumper{
opacity: 0;
}
.custom .bumper.pressed{
opacity: 1;
}
.custom .bumper.left{
background: url(Assets/SNESOverlayMinimalLeftBumper.svg);
background-position: 0px 0px;
width: 23px;
height: 46px;
position: absolute;
top: 0px;
left: 0px;
}
.custom .bumper.right{
background: url(Assets/SNESOverlayMinimalRightBumper.svg);
background-position: 0px 0px;
width: 23px;
height: 46px;
position: absolute;
top: 0px;
left: 437px;
}
/* This bit of code is for the player indicator, which is represented in
quandrants on the xbox controller. That's note what it's called on the
PS3 controller but it'd be pointless for me to change the HTML for
something as pedantic as a name. */
.custom .quadrant{
position: absolute;
height: 17px;
width: 111px;
top: 140px;
left: 240px;
}
/* Since the player indicator is just a CSS sprite, we change the
position of the background to match the player number.
NOTE: Player orderin starts at 0, so p0 = Player 1 */
.custom .p0{
background-position: 0 -6px;
}
.custom .p1{
background-position: 0 -28px;
}
.custom .p2{
background-position: 0 -49px;
}
.custom .p3{
background-position: 0 -70px;
}
/* This is the div that contains the Start and Select buttons */
.custom .arrows{
position: absolute;
width: 460px;
height: 46px;
top: 0px;
left: 0px;
}
.custom .back{
position: absolute;
width:46px;
height:23px;
top: 0px;
left: 207px;
}
.custom .back.pressed{
background: url(Assets/SNESOverlayMinimalSelect.svg);
background-position: 0px 0px;
opacity: 1;
}
.custom .start{
position: absolute;
width:46px;
height:23px;
top: 23px;
left: 207px;
}
.custom .start.pressed{
background: url(Assets/SNESOverlayMinimalStart.svg);
background-position: 0px 0px;
opacity: 1;
}
/* Positioning and size of the container for the abxy buttons */
.custom .abxy{
position: absolute;
width: 184px;
height: 46px;
top: 0px;
left: 253px;
}
/* base class used to simplify the sprite mapping */
.custom .button{
position: absolute;
width:46px;
height:46px;
}
/*
.custom .button.pressed{
background: url(drawing/drawing.svg);
background-position-x: -1249px;
}
*/
.custom .a{
position: absolute;
top: 0px;
left: 138px;
}
.custom .a.pressed{
position: absolute;
top: 0px;
left: 138px;
background: url(Assets/SNESOverlayMinimalA.svg);
background-position: 0px 0px;
}
.custom .b{
position: absolute;
top: 0px;
left: 92px;
}
.custom .b.pressed{
position: absolute;
top: 0px;
left: 92px;
background: url(Assets/SNESOverlayMinimalB.svg);
background-position: 0px 0px;
}
.custom .x{
position: absolute;
top: 0px;
left: 46px;
}
.custom .x.pressed{
position: absolute;
top: 0px;
left: 46px;
background: url(Assets/SNESOverlayMinimalX.svg);
background-position: 0px 0px;
}
.custom .y{
position: absolute;
top: 0px;
left: 0px;
}
.custom .y.pressed{
position: absolute;
top: 0px;
left: 0px;
background: url(Assets/SNESOverlayMinimalY.svg);
background-position: 0px 0px;
}
/* Positioning and size of the container for the dpad buttons */
.custom .dpad{
position: absolute;
width: 184px;
height: 46px;
top: 0px;
left: 23px;
}
/* base class used to simplify the sprite mapping */
.custom .face{
position: absolute;
width:46px;
height:46px;
}
/* Directional buttons */
.custom .left{
position: absolute;
top: 0px;
left: 0px;
}
.custom .left.pressed{
position: absolute;
top: 0px;
left: 0px;
background: url(Assets/SNESOverlayMinimalLeft.svg);
background-position: 0px 0px;
}
.custom .up{
position: absolute;
top: 0px;
left: 46px;
}
.custom .up.pressed{
position: absolute;
top: 0px;
left: 46px;
background: url(Assets/SNESOverlayMinimalUp.svg);
background-position: 0px 0px;
}
.custom .down{
position: absolute;
top: 0px;
left: 92px;
}
.custom .down.pressed{
position: absolute;
top: 0px;
left: 92px;
background: url(Assets/SNESOverlayMinimalDown.svg);
background-position: 0px 0px;
}
.custom .right{
position: absolute;
top: 0px;
left: 138px;
}
.custom .right.pressed{
position: absolute;
top: 0px;
left: 138px;
background: url(Assets/SNESOverlayMinimalRight.svg);
background-position: 0px 0px;
}
/* Analog sticks follow the same principles as the triggers in terms of positioning
Note that the rotation of the sticks in hard coded with javascript, so it applies
the CSS inline. */
.custom .sticks{
position: absolute;
width: 231px;
height: 231px;
top: 100px;
left: 90.5px;
}
.custom .sticks::after{
content: '';
position: absolute;
width: 231px;
height: 231px;
background: url(drawing/drawing.svg);
background-position-x: -1357px;
}
.custom .stick{
position: absolute;
background-color: white;
width: 82px;
height: 82px;
transform: rotateX(0deg) !important;
transform: rotateY(0deg) !important;
}
.custom .stick.left{
top: 74px;
left: 75px;
}
.custom .stick.right{
display: none;
}
/* NOTE: You NEED to set this to exactly half the height of what is listed
for '.controller.custom' so when your skin is activated via player selection
parameters (e.g. http://mrmcpowned.com/gamepad?p=1) it will be correctly
centered on screen. */
.custom.half{
margin-top: -23px;
}