...
|
...
|
@@ -66,23 +66,21 @@ var knobsClass = {
|
66
|
66
|
MenuSettings : func (d) {
|
67
|
67
|
var (id, selected) = split('-', me.device.windows.selected);
|
68
|
68
|
var state = me.device.windows.state[id];
|
69
|
|
- if (find('choices', state.lines[selected].type) > -1) {
|
70
|
|
- var val = me.device.windows.window[me.device.windows.selected]
|
71
|
|
- .get('text');
|
72
|
|
- forindex (var i; state.lines[selected].choices)
|
73
|
|
- if (state.lines[selected].choices[i] == val) {
|
74
|
|
- if (i == size(state.lines[selected].choices) - 1)
|
75
|
|
- me.device.windows.window[me.device.windows.selected]
|
76
|
|
- .setText(state.lines[selected].choices[0]);
|
77
|
|
- else
|
78
|
|
- me.device.windows.window[me.device.windows.selected]
|
79
|
|
- .setText(state.lines[selected].choices[i + 1]);
|
80
|
|
- break;
|
|
69
|
+ var object = state.objects[selected + state.scroll.offset];
|
|
70
|
+ var val = object.text;
|
|
71
|
+ if (contains(object, 'choices')) {
|
|
72
|
+ forindex (var c; object.choices)
|
|
73
|
+ if (object.choices[c] == val) {
|
|
74
|
+ if (c == size(object.choices) - 1) val = object.choices[0];
|
|
75
|
+ else val = object.choices[c + 1];
|
|
76
|
+
|
|
77
|
+ me.device.windows.window[me.device.windows.selected]
|
|
78
|
+ .setText(val);
|
|
79
|
+ object.text = val;
|
|
80
|
+ break;
|
81
|
81
|
}
|
82
|
82
|
}
|
83
|
|
- elsif (find('time', state.lines[selected].type) > -1) {
|
84
|
|
- var val = me.device.windows.window[me.device.windows.selected]
|
85
|
|
- .get('text');
|
|
83
|
+ elsif (find('time', object.type) > -1) {
|
86
|
84
|
var (hh, mm, ss) = split(':', val);
|
87
|
85
|
var time = hh * 3600 + mm * 60 + ss;
|
88
|
86
|
if (time >= 600) # 10 min
|