-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtransmut.kv
More file actions
161 lines (152 loc) · 2.99 KB
/
Copy pathtransmut.kv
File metadata and controls
161 lines (152 loc) · 2.99 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
#root
FloatLayout:
Label:
text: 'loading...'
<Splash>:
background: background
AnchorLayout:
on_touch_down: app.showMenu()
Scatter:
id: background
do_rotation: False
do_translation: False
do_scale: False
Image:
source: 'Data/729665main_A-BlackHoleArt-pia16695_full.jpeg'
width: root.width
height: root.height
allow_stretch: True
keep_ratio: False
Label:
text: 'Transmutation'
font_size: 128
<Menu>:
background: background
AnchorLayout:
Scatter:
id: background
do_rotation: False
do_translation: False
do_scale: False
Image:
source: 'Data/space.jpg'
width: root.width
height: root.height
allow_stretch: True
keep_ratio: False
GridLayout:
cols: 1
rows: 2
Label:
text: 'Transmutation'
font_size: 128
size_hint_y: 0.7
GridLayout:
size_hint_y: 0.3
cols: 2
rows: 1
padding: 40
spacing: 20
Button:
on_press: app.showHelp()
text: 'New game'
font_size: 28
width: 300
height: 200
Button:
on_press: app.restore_game()
text: 'Continue'
font_size: 28
width: 300
height: 200
<Help>:
background: background
AnchorLayout:
Scatter:
id: background
do_rotation: False
do_translation: False
do_scale: False
Image:
source: 'Data/space.jpg'
width: root.width
height: root.height
allow_stretch: True
keep_ratio: False
BoxLayout:
orientation: 'vertical'
Label:
text: 'How to play ?'
font_size: 72
Label:
text: 'Select elements from the list.'
font_size: 32
Label:
text: 'Drag & drop elements and combine them to form new ones.'
font_size: 32
Label:
text: 'Drop elements near the screen border to delete them.'
font_size: 32
AnchorLayout:
anchor_y: 'center'
anchor_x: 'right'
padding: 100
Button:
size_hint_x: 0.2
on_press: app.newGame()
text: 'Start game'
font_size: 28
<Game>:
elementlist: elementlist
AnchorLayout:
Image:
source: 'Data/space.jpg'
width: root.width
height: root.height
allow_stretch: True
keep_ratio: False
GridLayout:
cols: 2
rows: 1
ScrollView:
#size_hint: (.25, 1)
height: root.height
do_scroll_x: False
size_hint_y: None
GridLayout:
id: elementlist
size_hint: (1,None)
cols: 1
height: (root.score+1)*50
Label:
text: "%d / %d" % (root.score, len(app.ether)+4)
size_hint: (None,None)
height: 50
<ElementButton>:
size_hint: (None, None)
height: 50
width: 200
text: root.text
on_press: app.add_element_to_universe(root.text)
<Element>:
size: label.size
size_hint: None,None
do_rotation: False
do_scale: False
auto_bring_to_front: True
Label:
id: label
text: root.text
font_size: 26
color: root.color
<ElementPop>:
size: label.size
size_hint: None,None
do_rotation: False
do_scale: False
auto_bring_to_front: True
Label:
id: label
text: root.text
font_size: 96
color: root.color