-
Notifications
You must be signed in to change notification settings - Fork 0
/
sudokusolver.kv
54 lines (50 loc) · 1.12 KB
/
sudokusolver.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
<MainLayout>:
orientation: 'vertical'
cell_grid: cell_grid
FloatLayout:
id: f_layout
CellGrid:
id: cell_grid
size_hint: None, None
height: min(f_layout.height, f_layout.width)
width: self.height
pos_hint: {"center_x": .5, "center_y": .5}
BoxLayout:
size_hint_y: None
height: root.height * .1
orientation: 'horizontal'
Button:
text: 'Solve'
on_press: root.cell_grid.on_solve_click()
Button:
text: 'Clear'
on_press: root.cell_grid.on_reset_click()
<CellGrid>:
rows: 9
cols: 9
<CellBoxText>:
font_size: self.height * .60
halign: 'center'
input_filter: 'int'
multiline: False
write_tab: False
<ErrorPopup>:
title: "Error"
size_hint: .5, .3
BoxLayout:
orientation: "vertical"
Label:
text: "There are no solutions to this puzzle"
text_size: self.size
font_size: self.height * .25
halign: "center"
valign: "center"
Button:
text: "Okay"
text_size: self.size
font_size: self.width * .25
halign: "center"
valign: "center"
size_hint: .3, .5
pos_hint: {"center_x": .5}
on_press: root.dismiss()