-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathKeyboardSetScreen.kv
More file actions
240 lines (201 loc) · 6.85 KB
/
KeyboardSetScreen.kv
File metadata and controls
240 lines (201 loc) · 6.85 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
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
#:kivy 1.10.1
#:include RVKeyboard.kv
<FileListCell>:
filepath: './'
volume: 1
slider: slider
# Draw a background to indicate selection
#size: root.width*0.9, root.height*0.9
BoxLayout:
padding: 4,4
orientation: 'vertical'
canvas.before:
Color:
rgba: (.0,191/255, 1, .8)
Line:
width: 2
rectangle: self.x, self.y, self.width, self.height
Color:
rgba: (.0, 0.9, 1, .2) if root.selected else (0, 0, 0, 1)
Rectangle:
pos: self.pos
size: self.size
Label:
text: root.getBaseName(root.filepath)
BoxLayout:
#pos_x: root.x
#pos_y: root.y
pos: [root.x, root.y + 50]
size: [250,50]
size_hint: None, None
opacity: 50 if root.selected else 0
disabled: False if root.selected else True
Button:
text: '-'
on_release: root.deleteClicked()
Button:
text: 'play'
on_release: root.menubar_on_release('play')
Button:
text: '3'
Button:
text: '4'
Button:
text: '5'
Slider:
id: slider
height: 50
size_hint: 1, None
value: root.volume
range: (0,1)
step: 0.05
value_track:True
value_track_color:[1, 1, 1, 1]
on_touch_up: root.sliderOnTouchUp()
<FileList>:
viewclass: 'FileListCell'
SelectableRecycleBoxLayout:
default_size: None, dp(56)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
multiselect: False
touch_multiselect: False
<KeyboardSetScreen>:
rvk:rvk
ic:ic
fl:fl
kLabel: kLabel
soundPackDetail: soundPackDetail
filechooser: filechooser
filechooserRoot: './'
name_input: name_input
BoxLayout:
orientation: 'vertical'
on_touch_down:
root.touchDownEvent([*args[1].pos])
on_touch_up:
root.touchUpEvent([*args[1].pos])
BoxLayout:
canvas.before:
Color:
rgba: 0.5, 0.5, 0.5, 1
Rectangle:
size: self.size
pos: self.pos
size_hint_y: None
height: 30
Button:
text: 'Back'
on_release:
root.switchToStageShow()
Button:
text: 'load'
on_release:
root.show_load()
Button:
text: '3'
Button:
text: '4'
Button:
text: '5'
# changed to auto save all the edits, therefore no need for a button to save
#text: 'save'
#on_release:
# root.rvk.saveByPath()
#GridLayout:
# rows: 2
# cols: 1
BoxLayout:
orientation: 'vertical'
size_hint_y: 1
#padding: dp(8)
#spacing: dp(16)
BoxLayout:
orientation: 'horizontal'
RVKeyboard:
rootPath: root.filechooserRoot
id:rvk
delegate: root
size_hint: 0.7,1
BoxLayout:
id: soundPackDetail
#disabled: True
canvas.before:
Color:
rgba: (.0,191/255, 1, .8)
Line:
width: 2
rectangle: self.x, self.y, self.width, self.height
Color:
rgba: 0, 0, 0, 1
Rectangle:
size: self.size
pos: self.pos
orientation: 'vertical'
size_hint: 0.3,1
BoxLayout:
orientation: 'horizontal'
height: 100
size_hint: 1, None
BoxLayout:
padding: [10]
width: 100
size_hint: None, 1
KeyLabel:
id: kLabel
text: ''
delegate: root
color: (.0, 0.9, 1, 1)
halign: 'center'
valign: 'center'
size_hint: 1,1
canvas.before:
Color:
rgba: (.0,191/255, 1, .8)
Line:
width: 2
rectangle: self.x, self.y, self.width, self.height
Color:
rgba: (.0, 0.9, 1, .2) if self.selected else (0, 0, 0, 1)
Rectangle:
pos: self.pos
size: self.size
BoxLayout:
size_hint: 1,1
padding: [10]
SPDName:
id: name_input
text: 'No selection'
halign: 'center'
valign: 'center'
multiline: False
delegate: root
size_hint: 1,1
FileList:
id: fl
data: []
delegate: root
CustomFileChooser:
id: filechooser
rootpath: root.filechooserRoot
path: root.filechooserRoot
pattern: ['*.wav', '*.ogg']
canvas.before:
Color:
rgba:(0, 0, 0, 1)
Rectangle:
size: self.size
pos: self.pos
on_selection:
root.saveFileToRVK(self.selection)
FloatLayout:
#size: 30, 30
Button:
id: ic
opacity: 1 if root.fileSelected else 0
text: 'music'
size: 100,100
size_hint: None, None
center: 20,20