-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCubeSolver.kv
244 lines (228 loc) · 7.46 KB
/
CubeSolver.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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
#:import timedelta datetime.timedelta
#from kivy.core.window import Window
#:import write interface.write
# Colors
#:set Gray_light [.95, .95, .95, 1]
#:set Gray_dark [.25, .25, .25, 1]
#:set Orange [.91, .45, 0 , 1]
#Fonts
#:set Primary_font 'Resources\Fonts\GOTHIC.TTF'
#:set Primary_fontBold 'Resources\Fonts\GOTHICB.TTF'
<MainLayout>: # BoxLayout
id: main_layout
manager: screen_manager
orientation: 'vertical'
canvas:
Color:
rgba: Gray_light
Rectangle:
size: self.size
pos: self.pos
ActionBar:
id: ABar
pos_hint: {'top':1}
background_image: 'atlas://resources/images/elements/background_white'
background_color: Orange
ActionView:
use_separator: True
ActionPrevious:
title: 'Action Bar'
on_press: root.manager.current = 'main'
with_previous: False
ActionButton:
text: 'Historial'
on_press: root.manager.current = 'historial'
ActionOverflow:
overflow_image: 'atlas://resources/images/elements/menu'
# allow_stretch: False
# overflow_color: 0,0,0,1
ActionButton:
text: "Clear Times"
on_press: app.clear_database() #FIXME database not in root fix reference "root"
ActionButton:
text: "Help"
ActionButton:
text: "About"
Manager:
id: screen_manager
<Main>:
AndroidTabs:
# Timer
Timer:
on_touch_up: self.start()
on_touch_down: self.stop()
text: "TIMER"
orientation: 'vertical'
padding: 0, 20, 0 , 0
canvas:
Color:
rgba: Gray_light
Rectangle:
size: self.size
pos: self.pos
Faces:
size_hint: .9, .05
pos_hint: {'center_x': .5, 'center_y': 1}
on_parent: self.draw_face()
on_touch_down: self.clear_widgets()
on_touch_up: self.draw_face()
Label:
text: self.parent.scramble
font_name: Primary_font
font_size: 14
color: Gray_dark
text_size: self.size
halign: 'center'
valign: 'middle'
size_hint: self.size_hint_x, .1
Label:
text: self.parent.time_format(self.parent.time)
font_size: 85
font_name: Primary_font
color: Gray_dark
text_size: self.size
halign: 'center'
valign: 'top'
size_hint: self.size_hint_x, .16
Image:
size_hint: .15, .15
size: self.size
pos_hint: {'center_x': .5, 'center_y':.5}
# Para actualizar la imagen por el estado del timer
source: self.parent.timer_button
BoxLayout:
# Grid_Base
size_hint: 1, .3
# canvas.before:
# Color:
# rgba: 0, .4, .85, .1
# Rectangle:
# size: self.size
# pos: self.pos
ColStats:
Image:
size_hint: .85, .85
size: self.size
pos_hint: {'center_x': .5, 'center_y':.5}
source: 'atlas://resources/images/elements/average'
Label:
text: "Media"
font_name: Primary_fontBold
color: Orange
Label:
text: "00:00.00"
font_size: 18
font_name: Primary_fontBold
color: Gray_dark
ColStats:
Label:
text: "Ao3"
font_name: Primary_fontBold
color: Orange
Label:
text: "00:00.00"
font_name: Primary_fontBold
color: Gray_dark
Label:
text: "Ao5"
font_name: Primary_fontBold
color: Orange
Label:
text: "00:00.00"
font_name: Primary_fontBold
color: Gray_dark
Label:
text: "Ao12"
font_name: Primary_fontBold
color: Orange
Label:
text: "00:00.00"
font_name: Primary_fontBold
color: Gray_dark
ColStats:
Image:
size_hint: .85, .85
size: self.size
pos_hint: {'center_x': .5, 'center_y':.5}
source: 'atlas://resources/images/elements/best'
Label:
text: "Ao12"
font_name: Primary_fontBold
color: Orange
Label:
text: "00:00.00"
font_name: Primary_fontBold
color: Gray_dark
ColStats:
Label:
text: "BEST"
font_name: Primary_fontBold
color: Orange
Label:
text: "00:00.00"
font_name: Primary_fontBold
color: Gray_dark
Label:
text: "Ao5"
font_name: Primary_fontBold
color: Orange
Label:
text: "00:00.00"
font_name: Primary_fontBold
color: Gray_dark
Solver:
<Historial>:
TimesList:
viewclass: 'Button'
RecycleBoxLayout:
default_size: None, dp(56)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
<Manager>:
main_screen: main_screen
historial: historial
Main:
id: main_screen
name: 'main'
Historial:
id: historial
name: "historial"
<AndroidTabsBar>:
canvas.before:
Color:
rgba: Orange
Rectangle:
size: self.size
pos: self.pos
Color:
rgba: Gray_light
Rectangle:
pos: self.pos[0], self.pos[1]
size: self.size[0], 1
Rectangle:
pos: self.pos[0], self.pos[1]
size: self.size[0], 1
Rectangle:
pos: self.pos[0], self.pos[1]
size: self.size[0], 1
<Solver>:
text: "SOLVER"
canvas:
Color:
rgba: 0, 0, 0, 1
Rectangle:
size: self.size
pos: self.pos
Label:
text: 'Solver Tab'
<ColStats>:
orientation: 'vertical'
#<TestLayout>:
# canvas:
# Color:
# rgba: .9, .3, .3, 1
# Rectangle:
# size: self.size
# pos: self.pos