-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameoflife-common.kv
34 lines (31 loc) · 953 Bytes
/
gameoflife-common.kv
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
#:kivy 1.8.1
#:import GOLGrid kivy_p2life.widgets
#:import PlayerUI kivy_p2life.widgets
<GOLGrid>:
num_grids: 2
size: self.cols * self.cell_size, self.rows * self.cell_size
<GridCell>:
canvas:
Color:
rgba: self.colour
Rectangle:
pos: self.pos
size: self.size
Color:
rgba: self.border_colour
Line:
# FIXME the drag line looks a bit ugly
points: [self.x, self.y, self.x + self.width, self.y, self.x + self.width, self.y + self.height, self.x, self.y + self.height, self.x, self.y]
<PlayerUI>:
color: [1, 0, 0, 1]
canvas.before:
Color:
rgba: [0.4, 0.4, 0.4, 1]
Rectangle:
pos: self.pos
size: self.size
Color:
rgba: self.colour
Rectangle:
pos: self.x + 1, self.y + 1
size: (self.width - 1) * self.completeness, self.height - 2