-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvmidipad.kv
99 lines (65 loc) · 2.11 KB
/
vmidipad.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
#:kivy 1.10.0
#:import utils kivy.utils
#:import Factory kivy.factory.Factory
<ButtonConfigPopup@Popup>:
id: btnpopup
auto_dismiss: False
orientation: "vertical"
BoxLayout:
spacing: '10dp'
orientation: "vertical"
Label:
text:'Set the MIDI message for the button:'
Spinner:
text: 'MIDI message type'
values:'Control Change (CC)', 'Program Change (PC)', 'Note (not supported yet)'
on_text:
print("The spinner {} has text {}".format(self, self.text))
BoxLayout:
Button:
text: 'OK'
on_release: root.dismiss()
Button:
text: 'Cancel'
on_release: root.dismiss()
<EditCheckbox@BoxLayout+ActionItem>: # Inheritance in .kv
ActionLabel:
text: "Edit Mode"
ActionCheck:
<MainWindow>:
id: mainWindow
# manager: screen_manager
orientation: "vertical"
ActionBar:
size_hint_y: 0.1
ActionView:
use_separator: True
ActionPrevious:
# title: "mymy"
with_previous: False
# EditCheckbox:
# on_press: app.edit_mode()
ActionLabel:
text: "Edit Mode"
ActionCheck:
on_press: mainPad.set_edit_mode(self.active)
ActionSeparator:
ActionButton:
text: "Load Layout"
ActionButton:
text: "Save Layout"
# on_release: app.save_layout()
ActionButton:
text: "?"
# on_release: app.about()
ActionLabel:
text: str(mainPad.edit_mode)
MainPad:
id: mainPad
canvas.before:
Color:
rgb :1,1,0 if self.edit_mode else 1,1,1
# rgb: utils.get_color_from_hex('#39B3F2')
Rectangle:
size: self.size
pos: self.pos