-
Notifications
You must be signed in to change notification settings - Fork 0
/
pieces.kv
46 lines (35 loc) · 878 Bytes
/
pieces.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
35
36
37
38
39
40
41
42
43
44
45
#:kivy 1.7
<BaseSquareElement>:
size: '20sp', '20sp'
size_hint: (None, None)
canvas.after:
Rectangle:
pos:self.pos
size:self.size
<InvisibleElement>:
canvas:
Color:
rgba: 0, 0, 0, 0
<SourceSubElement>:
canvas:
Color:
rgba: .3, .9, .3, 1
<TargetSubElement>:
canvas:
Color:
rgba: 1, 1, 0, 1
<TargetElement>:
size_hint: (None, None)
# padding: '1sp', '1sp', '1sp', '1sp'
spacing: '1sp'#, '1sp'
<SourceElement>:
size_hint: (None, None)
# padding: '1sp', '1sp', '1sp', '1sp'
spacing: '1sp'#, '1sp'
<PiecesGame>:
canvas:
Rectangle:
pos: self.width*2/3 - sp(5), 0
size: sp(10), self.height
# add Target first(before all other elements)
# that will keep this widget in the back end