-
Notifications
You must be signed in to change notification settings - Fork 0
/
automatas.kv
98 lines (94 loc) · 2.95 KB
/
automatas.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
#:kivy 1.9.1
<GridUI>:
cols: 8
padding: 10
spacing: 5
<Node>:
background_normal: ''
background_color: .99, .89, .65, 1
<CustomPopup>:
title: 'Palabra generada'
size_hint: None, None
size: app.root.width/2, app.root.height/2
auto_dismiss:False
BoxLayout:
orientation: 'vertical'
Label:
text: app.root.show_word()
font_size: 25
Button:
size_hint_y: .3
text: 'Aceptar'
on_press: root.dismiss()
<Principal>:
orientation: 'vertical'
padding: 20
canvas:
Color:
rgba: .95,.95,.95,1
Rectangle:
size: self.size
pos: self.pos
FloatLayout:
size_hint: 1, .15
ToggleButton:
id: btn_inicio
background_normal: ''
background_color: .18, .8, .4, 1
background_down: 'atlas://data/images/defaulttheme/textinput_disabled'
text: 'Inicio'
size_hint: .2, .7
pos_hint: {'center_x':.2, 'center_y':.5}
state: 'down'
group: 'options'
on_press: root.current_option(1)
ToggleButton:
id: btn_final
background_normal: ''
background_color: .96, .28, .28, 1
background_down: 'atlas://data/images/defaulttheme/textinput_disabled'
text: 'Final'
size_hint: .2, .7
pos_hint: {'center_x':.5, 'center_y':.5}
group: 'options'
on_release: root.current_option(2)
ToggleButton:
id: btn_obstaculos
background_normal: ''
background_color: .2, .6, .86, 1
background_down: 'atlas://data/images/defaulttheme/textinput_disabled'
text: 'Obstaculos'
size_hint: .2, .7
pos_hint: {'center_x':.8, 'center_y':.5}
group: 'options'
on_release: root.current_option(3)
GridUI:
id: grid
BoxLayout:
cols: 2
size_hint: 1, .1
spacing: 10
Button:
text: 'Calcular ruta mas corta'
background_normal:''
background_color: .2, .28, .37, 1
on_release: grid.drawPath(); enviar_arduino.disabled = False; mostrar_palabra.disabled = False
Button:
id: mostrar_palabra
text: 'Mostrar palabra'
disabled: True
background_normal:''
background_color: .2, .28, .37, 1
on_release: root.showPopup(*args)
Button:
id: enviar_arduino
text: 'Enviar a Arduino'
disabled: True
background_normal:''
background_color: .2, .28, .37, 1
on_release: grid.send_arduino()
Button:
text: 'Reset'
background_normal:''
background_color: .2, .28, .37, 1
on_release: grid.reset(); enviar_arduino.disabled = True; mostrar_palabra.disabled = True