-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkoalas.kv
70 lines (65 loc) · 2.17 KB
/
koalas.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
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
#:kivy 1.7.0
<KoalasMainWidget>:
canvas.before:
Color:
rgba: 1, 1, 1, self.alpha
Rectangle:
pos: self.pos
size: self.size
source: 'img/koalas/Background_02.png'
Color:
rgba: 0.2, 0.2, 0.4, 0.5 * self.alpha
Rectangle:
pos: self.x, self.height - self.border_height
size: self.width, self.border_height
Label:
pos: self.parent.right - 80, self.parent.top - self.parent.height / 10#1.8 * self.parent.border_height
text: str(self.parent.points)
font_name: 'fonts/Billy.ttf'
font_size: self.parent.height / 10
color: 1, 1, 1, self.parent.alpha
<Leaf>:
Label:
center: self.parent.center
text: self.parent.expression
font_name: 'fonts/Billy.ttf'
font_size: self.parent.height // 1.5
bold: True
<CustomButton@Button>:
font_name: 'fonts/Billy.ttf'
font_size: self.parent.height // 20
size: self.parent.width // 3, self.parent.height // 10
background_normal: 'img/buttons/button_01.png'
background_down: 'img/buttons/button_02.png'
border: (0, 0, 0, 0)
halign: 'center'
<StartMenu>:
canvas:
Color:
rgba: 0.1, 0.1, 0.1, 0.5
Rectangle:
pos: self.pos
size: self.size
Label:
center: self.parent.center[0], 6 * self.parent.height / 8
text: self.parent.text
halign: 'center'
valign: 'middle'
font_name: 'fonts/Billy.ttf'
font_size: self.parent.height // 20
CustomButton:
center: self.parent.center[0], 4 * self.parent.height / 8
text: 'Normal'
on_release: self.parent.select_difficulty(1)
CustomButton:
center: self.parent.center[0], 3 * self.parent.height / 8
text: 'Harder'
on_release: self.parent.select_difficulty(2)
CustomButton:
center: self.parent.center[0], 2 * self.parent.height / 8
text: 'Really\nHard'
on_release: self.parent.select_difficulty(3)
CustomButton:
center: self.parent.center[0], 1 * self.parent.height / 8
text: 'Menu'
on_release: self.parent.exit()