-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpathvis.kv
More file actions
58 lines (55 loc) · 1.45 KB
/
Copy pathpathvis.kv
File metadata and controls
58 lines (55 loc) · 1.45 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
<PathVisUi>:
orientation: 'vertical'
Grid:
id: grid_
ControlPanel:
size_hint: 1, .3
grid: grid_
<Grid>:
spacing: .5, .5
<ControlPanel>:
orientation: "vertical"
canvas:
Color:
rgba: 105/255, 105/255, 105/255, 1
Rectangle:
pos: self.pos
size: self.size
BoxLayout:
orientation: "horizontal"
Button:
background_color: 102/255, 245/255, 66/255, 1
background_normal: ''
text: "Start"
on_press: root.mark_start()
Button:
background_color: 0, 0, 0, 1
background_normal: ''
text: "Wall"
on_press: root.mark_wall()
Button:
background_normal: ''
background_color: 222/255, 43/255, 11/255, 1
text: "End"
on_press: root.mark_end()
Button:
text: "Clear grid"
on_press: root.clear_grid()
BoxLayout:
orientation: "horizontal"
Label:
text: "Algorithm : "
Spinner:
text: root.algorithm
values: "A*", "Breadth-first", "Depth-first", "Greedy best-first"
on_text: root.algorithm = self.text
Button:
text: "Visualize!"
on_press: root.run_search()
<Cell>:
canvas:
Color:
rgba: self.color_
Rectangle:
size: self.size
pos: self.pos