-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpi.css
More file actions
629 lines (583 loc) · 15.9 KB
/
pi.css
File metadata and controls
629 lines (583 loc) · 15.9 KB
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
/**
*------
* BGA framework: © Gregory Isabelli <gisabelli@boardgamearena.com> & Emmanuel Colin <ecolin@boardgamearena.com>
* P.I. implementation: © Fabian Neumann <fabian.neumann@posteo.de>
*
* This code has been produced on the BGA studio platform for use on http://boardgamearena.com.
* See http://en.boardgamearena.com/#!doc/Studio for more information.
* -----
*
* pi.css
*
* pi stylesheet
*
*/
/*
This is the CSS stylesheet of your game User Interface.
Styles defined on this file will be applied to the HTML elements you define in your
HTML template (pi_pi.tpl), and to HTML elements you create dynamically
(in pi.js).
Usually, you are using CSS to:
1°) define the overall layout of your game
(ex: place the board on the top left, place player's hand beside, place the deck on the right, ...).
2°) create your CSS-sprites:
All images of your games should be gathered into a small number of image files. Then, using
background-image and background-position CSS properties, you create HTML blocks that can
display these images correctly (see example below).
3°) ... anything else:
It is really easy to add and remove CSS classes dynamically from your Javascript with
dojo.addClass and dojo.removeClass. It is also easy to check if an element has a class
(dojo.hasClass) or to get all elements with a specific class (dojo.query). This is why,
very often, using CSS classes for the logic of your user interface allow you to do complex
thing easily.
Note: on the production platform, this file will be compressed and comments will be removed.
Consequently, don't hesitate to put as many comments as necessary.
*/
@import url(../../../css/csslayer.css); /* Note: you must not use any @import directive other than this one */
/********* You can start writing your CSS below this line: **********/
@import url('https://fonts.googleapis.com/css?family=Oswald:500,600,700');
.whiteblock {
border-radius: 6px;
margin-bottom:6px;
margin-top:6px;
}
.whiteblock h3,
.whiteblock h4,
.whiteblock h5 {
font-family:Oswald, Roboto, Arial, sans-serif;
font-weight: 600;
color:#222;
margin-top:0;
text-transform: uppercase;
text-shadow: 0 1px #fff;
}
.whiteblock h4 {
font-size: .85rem;
}
.whiteblock h5 {
font-size: .75rem;
margin:0;
}
.myicon20 {
display: inline-block;
background-image: url("img/common/icons20.png");
width: 20px;
height: 20px;
position: relative;
top: 4px;
}
.myicon20_help {
background-position:0 0;
}
.player-board .boarditems {
margin-top: 3px;
}
.player-board .boarditem {
display: inline-block;
height:40px;
margin:0 5px 5px 0;
vertical-align: middle;
}
.player-board .boarditem:last-child {
margin-right:0;
}
.player-board .boarditem > div {
vertical-align: middle;
}
.player-board .sp_marker {
background-image: url("img/startplayer.png");
background-size: cover;
height:36px;
width:13px;
visibility:hidden;
margin:3px;
}
.player-board .sp_marker.visible {
visibility: visible;
}
.player-board .investigator {
display: inline-block;
vertical-align: middle;
margin-right: .5em;
}
.player-board .cube_supply {
position: relative;
margin-top:5px;
margin-right:8px;
}
.player-board .cube_supply > .cube20 {
position: relative;
float:left;
margin:0 -8px -14px 0;
}
.player-board .disc_supply {
position: relative;
margin-top:5px;
margin-right:15px;
}
.player-board .disc_supply > .disc30 {
position: relative;
float:left;
margin:0 -15px 0 0;
}
#carddisplay {
width:960px;
margin:0 auto;
}
#boardwrap {
margin:0 auto;
box-shadow: 2px 2px 1px 0 rgba(0, 0, 0, 0.66);
border: solid 2px #333;
border-radius: 3px;
height:720px;
width:960px;
overflow: hidden;
}
#board {
position: relative;
top:-10px;
left:-10px;
background-image: url(img/board_big.jpg);
height: 740px;
width: 980px;
background-size: 1000px;
background-position: -10px -12px;
}
#belowboard {
margin:0 auto;
max-width:960px;
}
#minigamecounter {
position: absolute;
top: 220px;
background: rgba(255, 233, 182, 0.55);
box-shadow: 2px 2px 6px 2px rgba(0, 0, 0, 0.4);
left: 18px;
width: 90px;
text-align: center;
padding:.33em;
}
.disc {
z-index:200;
position: absolute;
height:25px;
width:25px;
background-color: #000;
border: solid 2px rgba(0, 0, 0, 0.5);
border-width: 0 1px 1px 0;
border-radius: 50%;
box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.5);
}
.disc.blue { background-color:hsl(230, 100%, 55%); }
.disc.green { background-color:#0c0; }
.disc.purple { background-color:#e0e; }
.disc.red { background-color:#f30; }
.disc.yellow { background-color:#fe0; }
/* Location containers */
.loccont {
position: absolute;
height:114px;
width:205px;
}
.loccont .agentarea {
position: absolute;
top:0; left:0;
height:46px;
width:100%;
border-radius: 5px;
z-index:50;
text-align: center;
/* background:rgba(0, 0, 0, 0.3);
box-shadow:0 0 5px 5px rgba(0, 0, 0, 0.3);
padding:4px; */
}
.loccont .agentarea.active_slot {
box-shadow: 0 0 2px 2px rgb(255, 255, 255) !important;
border:solid 2px red; /* because it's an instant action */
border-width:2px !important;
cursor: pointer !important;
}
/* Location slots */
.locslot {
position: absolute;
height:64px;
width:64px;
bottom:0;
/* box-shadow: 0 0 0 4px rgba(255, 0, 255, 0.658); */
}
.locslot.location_slot { left:34%; }
.locslot.crime_slot { right:0; }
.locslot .stockitem {
background-size: 448px;
border-radius: 5px;
box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.75);
border: solid 0px #00000066;
}
.locslot .stockitem.fake_tile {
box-shadow:none;
background:none;
}
.locslot .highlight {
box-shadow: 0 0 4px 6px rgb(255, 255, 255) !important;
}
.locslot .active_slot:not(.no_x_tile) {
border-width:1px !important;
box-shadow: 0 0 4px 6px rgb(255, 255, 255) !important;
cursor: pointer !important;
}
.locslot .active_slot.stockitem_selected {
border-width:1px !important;
box-shadow: 0 0 4px 6px rgb(0, 0, 255) !important;
}
.cube {
z-index:300;
position: absolute;
height:15px;
width:15px;
background-color: #000;
border: solid 1px rgba(0, 0, 0, 0.5);
border-width: 0 1px 1px 0;
box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.5);
}
.cube.blue { background-color:hsl(230, 100%, 55%); }
.cube.green { background-color:#0c0; }
.cube.purple { background-color:#e0e; }
.cube.red { background-color:#ff3300; }
.cube.yellow { background-color:#fe0; }
.card,
#evidence .stockitem,
#evidence_discard .stockitem,
#playerdisplays .stockitem,
#myevidence .stockitem,
#myhand .stockitem {
background-size: 810px;
box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.66);
border-radius: 8px;
}
#myhand-wrap {
position: relative;
float:left;
height:166px;
width: 282px;
margin-right:.5em;
}
#myevidence-wrap {
position: relative;
float:left;
height:166px;
width:630px;
}
#casecards_help,
#myevidence_help {
position: absolute;
top:5px;
right:5px;
opacity: .5;
}
.spectatorMode #myhand-wrap,
.spectatorMode #myevidence-wrap {
display: none;
}
#playerdisplays > .whiteblock {
display:inline-block;
min-height:166px;
width:455px;
margin-right: 6px;
}
#playerdisplays > .whiteblock:nth-of-type(2n) {
margin-right: 0;
}
.locslot .cube20,
.locslot .disc30 {
z-index:100;
position: absolute;
}
.locslot .locslot_cubes {
position: absolute;
bottom:-2px;
left:-2px;
height:50px;
width:50px;
}
/* Bottom left */
/*
Cubes and disc on a tile:
Closest to the middle looks best, so we start there.
------------
| d |
| 4 3 ddd |
| 2 1 d |
| 6 5 |
------------
*/
.locslot .cube20:nth-of-type(1) { bottom:13px; left:17px; z-index:201; }
.locslot .cube20:nth-of-type(2) { bottom:13px; left: 0px; z-index:201; }
.locslot .cube20:nth-of-type(3) { bottom:26px; left:17px; z-index:203; }
.locslot .cube20:nth-of-type(4) { bottom:26px; left:0px; z-index:203; }
.locslot .cube20:nth-of-type(5) { bottom:0; left:17px; z-index:200; }
.locslot .cube20:nth-of-type(6) { bottom:0; left: 0px; z-index:200; }
/* Top right, so we can still see the image and the cubes */
.locslot .disc30 {
top:18px;
left:33px;
}
/* Regarding multiple discs on one locslot: Yes, there can only ever be one disc
on a tile. If a user manually moves one there it stays there, unless we find
a full match later. Then we move it back to the agentarea. A full match is a
full match, there is no sense in keeping a wrongly manually placed disc there
then. This might count as a very very minor 'helping the player'; but it's
really too obvious not to tell them. TODO: implement this in the backend. */
.investigator {
z-index:100;
position: relative;
height:36px;
width:36px;
margin:3px;
background-image: url("img/investigators.png");
background-size:182px;
border-radius: 4px;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.75);
}
.investigator_red { background-position: 0px 0px }
.investigator_blue { background-position: -36px 0px }
.investigator_yellow { background-position: -72px 0px }
.investigator_green { background-position: -108px 0px }
.investigator_purple { background-position: -144px 0px }
.agentarea .investigator {
display: inline-block;
margin-right:3px;
}
.agentarea .investigator:last-of-type {
margin-right:0;
}
.investigator .cube20,
.investigator .disc30 {
position: absolute;
}
.investigator .cube20 {
top:-2px;
}
.investigator .disc30 {
bottom:-4px;
}
.investigator > div:nth-of-type(1) { left:-3px; z-index:200; }
.investigator > div:nth-of-type(2) { left:8px;z-index:201; }
.investigator > div:nth-of-type(3) { left:19px; z-index:202; }
.cube20 {
height: 20px;
width: 20px;
background-image: url("img/common/cubes20_hc.png");
}
.cube20_blue { background-position: -20px 0px }
.cube20_red { background-position: -40px 0px }
.cube20_yellow { background-position: -60px 0px }
.cube20_green { background-position: -80px 0px }
.cube20_white { background-position: -100px 0px }
.cube20_black { background-position: -120px 0px }
.cube20_brown { background-position: -140px 0px }
.cube20_purple { background-position: -160px 0px }
.cube20_pink { background-position: -180px 0px }
.cube20_orange { background-position: -200px 0px }
.disc30 {
height: 25px;
width: 25px;
background-image: url("img/common/discs30_hc.png");
background-size: cover;
}
.disc30_blue { background-position: 0px 0px }
.disc30_green { background-position: -25px 0px }
.disc30_beige { background-position: -50px 0px }
.disc30_orange { background-position: -75px 0px }
.disc30_white { background-position: -100px 0px }
.disc30_black { background-position: -125px 0px }
.disc30_red { background-position: -150px 0px }
.disc30_yellow { background-position: -175px 0px }
.disc30_gray { background-position: -200px 0px }
.disc30_purple { background-position: -225px 0px }
/* Correct the rotation of the location containers for the tokens.
The tokens look better when they are not rotated.
*/
#loccont_1 div:not(.token) > .token {
transform:rotate(-0deg);
}
#loccont_2 div:not(.token) > .token {
transform:rotate(-2.5deg);
}
#loccont_3 div:not(.token) > .token {
transform:rotate(-2.0deg);
}
#loccont_4 div:not(.token) > .token {
transform:rotate(-0deg);
}
#loccont_5 div:not(.token) > .token {
transform:rotate(-1.3deg);
}
#loccont_6 div:not(.token) > .token {
transform:rotate(-0deg);
}
#loccont_7 div:not(.token) > .token {
transform:rotate(-1.15deg);
}
#loccont_8 div:not(.token) > .token {
transform:rotate(-0deg);
}
#loccont_9 div:not(.token) > .token {
transform:rotate(-1.7deg);
}
#loccont_10 div:not(.token) > .token {
transform:rotate(1.5deg);
}
#loccont_11 div:not(.token) > .token {
transform:rotate(-0deg);
}
#loccont_12 div:not(.token) > .token {
transform:rotate(-0deg);
}
#loccont_13 div:not(.token) > .token {
transform:rotate(-1.5deg);
}
#loccont_14 div:not(.token) > .token {
transform:rotate(-0deg);
}
.vpbox,
.penaltybox {
position: absolute;
height:80px;
width:64px;
}
.penaltybox {
bottom:25px;
}
.vpbox {
top:58px;
}
#penalty_0 { left: 24px; }
#penalty_2 { left: 92px; }
#penalty_4 { left: 164px; bottom:20px; }
#penalty_6 { left: 758px; bottom:20px; }
#penalty_8 { left: 830px; }
#penalty_10 { left: 898px; }
#vp_7 { top: 58px; left: 24px; }
#vp_5 { top: 50px; left: 95px; }
#vp_3 { top: 45px; left: 165px; }
#vp_1 { top: 50px; left: 796px; }
#vp_0 { top: 46px; left: 868px; }
.token.penalty,
.token.vpmarker {
z-index:100;
position: relative;
height:32px;
width:32px;
background-image: url("img/vptoken.jpg");
background-size:352px;
border-radius: 3px;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.75);
}
.token.penalty_red { background-position: -192px 32px }
.token.penalty_blue { background-position: -224px 32px }
.token.penalty_yellow { background-position: -256px 32px }
.token.penalty_green { background-position: -288px 32px }
.token.penalty_purple { background-position: -320px 32px }
.penaltybox .token.penalty {
position: absolute;
top:0;
left:0;
}
.penaltybox .token:nth-of-type(1) { left: 5px; top: 0px }
.penaltybox .token:nth-of-type(2) { left: 30px; top: 4px }
.penaltybox .token:nth-of-type(3) { left: 0px; top: 26px }
.penaltybox .token:nth-of-type(4) { left: 24px; top: 30px }
.penaltybox .token:nth-of-type(5) { left: 10px; top: 54px }
#vp_red_0 { background-position: 0 0 }
#vp_red_1 { background-position: -32px 0 }
#vp_red_2 { background-position: -64px 0 }
#vp_blue_0 { background-position: -96px 0 }
#vp_blue_1 { background-position: -128px 0 }
#vp_blue_2 { background-position: -160px 0 }
#vp_green_0 { background-position: 0 32px }
#vp_green_1 { background-position: -32px 32px }
#vp_green_2 { background-position: -64px 32px }
#vp_purple_0 { background-position: -96px 32px }
#vp_purple_1 { background-position: -128px 32px }
#vp_purple_2 { background-position: -160px 32px }
#vp_yellow_0 { background-position: -192px 0 }
#vp_yellow_1 { background-position: -224px 0 }
#vp_yellow_2 { background-position: -256px 0 }
/* Just make it look a little random. In 5P games they might be many tokens on one spot. */
.vpbox .vpmarker {
display: inline-block;
margin-right:-12px;
margin-bottom:-12px;
}
.vpbox .vpmarker:nth-of-type(2n) {
margin-bottom:-6px;
margin-top:0;
}
.vpbox .vpmarker:nth-of-type(2n+1),
.vpbox .vpmarker:nth-of-type(4n) {
margin-left:-6px;
margin-top:-6px;
}
.cardname,
.tilename {
position: absolute;
top:0;
background:#f2904b;
background-image: url(img/namebg.png);
background-position: center;
color:#251815;
text-align:center;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-family: 'Oswald', sans-serif;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.cardname {
left:0;
width:91%;
padding:1px 2px;
border: solid 2px #f9eee3;
border-radius: 10px 10px 0 0;
font-size: 13px;
font-weight: 600;
}
.cardname.casecard {
background-image: url(img/casenamebg.png);
color:#f3f1ec;
}
.tilename {
left:4px;
width:81%;
padding:0 2px;
border-bottom:solid 1px #f9eee3;
border-radius: 3px 3px 0 0;
font-size: .7em;
font-weight: 500;
}
.location_slot .tilename {
top:2px;
left:5px;
width:81%;
}
.cardtooltip {
background-image: url(img/namebg.png);
font-family: 'Oswald', sans-serif;
font-size: 1.25em;
font-weight: 700;
color:#251815;
padding:0 10px 1px;
border-radius: 3px;
}
.casecardtooltip {
background-image: url(img/casenamebg.png);
color:#f3f1ec;
}
.help_click {
background-image: url(img/common/help_click.png);
background-repeat: no-repeat;
padding-left:20px;
}