-
Notifications
You must be signed in to change notification settings - Fork 28
/
main.kv
132 lines (105 loc) · 3.09 KB
/
main.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
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
#:kivy 1.0
<FishLifeGame>:
horison: 1.388
game_screen: game_screen
game_area: game_area
waves: waves
calories_bar: calories_bar
Widget:
id: game_screen
size: root.size
Widget:
id: game_area
size: root.size
canvas:
Color:
rgb: (1,1,1)
Rectangle:
source: "images/bg.png"
size: root.size
Widget:
id: waves
size: (root.width, 28)
canvas:
Color:
rgb: (1, 1, 1)
Rectangle:
source: "images/waves.png"
size: self.size
pos: self.pos
center: (game_screen.width/2, game_screen.top / 1.388)
GridLayout:
cols: 3
row_force_default: True
row_default_height: 100
width: root.width
height: 70
pos: (0,0)
Widget:
width: 30
ProgressBar:
id: calories_bar
max: 1000
value: 1000
Widget:
width: 30
Label:
text: "Starvation Meter"
color: [1,1,1,1]
width: 100
center: calories_bar.center
<FishLifeScore>:
restart_btn: restart_btn
box_layout: box_layout
score_table: score_table
calories_score: calories_score
junk_score: junk_score
total_score: total_score
title: "DEATH... and Victory!"
auto_dismiss: False
size_hint: (None, None)
size: (400,400)
pos: self.pos
id: score_w
BoxLayout:
id: box_layout
orientation: 'vertical'
GridLayout:
id: score_table
cols: 2
size_hint: (1.0, None)
height:100
pos: (root.x, root.top - self.height - 50)
Label:
text: "Total Calories Consumed"
Label:
text: "Tons of Junk swallowed"
Label:
id: calories_score
bold: True
font_size: 20
text: "0"
Label:
id: junk_score
font_size: 20
text: "0"
Label:
id: total_score
pos: (root.x + 5, root.y - 70)
height: 150
font_size: 13
text_size: (self.width - 20, None)
text: "In total fishy made 0 people happy during life. :("
Label:
size_hint: (1, 1)
center: (total_score.center_x, total_score.y + 265)
text: "The story so far..."
Button:
id: restart_btn
text: "AGAIN!"
pos: box_layout.pos
size_hint: (None, None)
size: (box_layout.width, 30)
<FoodScoreFeedback>:
font_size: 20
font_name: "DejaVuSansMono-Bold.ttf"