Collective moment Diversion time in seconds

This commit is contained in:
Ruben van de Ven 2019-07-10 14:11:57 +02:00
parent e66f3dddac
commit 1e76c44862
2 changed files with 7 additions and 7 deletions

View File

@ -912,7 +912,7 @@ class Diversion(object):
# only when changing chapter
return
window_open_second = float(self.params['start_minute']) * 60
window_open_second = float(self.params['start_second'])
window_close_second = window_open_second + float(self.params['window'])
now = story.hugvey.command.timer.getElapsed()

View File

@ -418,7 +418,7 @@ class Graph {
div['params']['regex'] = "can you repeat that\\?";
}
else if(type == 'collective_moment') {
div['params']['start_minute'] = 20; // minute to start
div['params']['start_second'] = 20 * 60; // second to start
div['params']['window'] = 60; // how long to wait, in seconds
}
else {
@ -673,15 +673,15 @@ class Graph {
'click': (e) => this.deleteDiversion(div)
}
}, 'Delete diversion'),
crel('label', 'Start time (minute)',
crel('label', 'Start time (seconds)',
crel('input', {
'type': 'number',
'max': 59,
// 'max': 59,
'min': 0,
'value': div['params']['start_minute'],
'placeholder': 'time (minute)',
'value': div['params']['start_second'],
'placeholder': 'time in loop (seconds)',
'on': {
'change': (e) => div['params']['start_minute'] = e.target.value
'change': (e) => div['params']['start_second'] = e.target.value
}
})
),