-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfeedbacks.js
31 lines (30 loc) · 911 Bytes
/
feedbacks.js
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
const Options = require('./options')
const Styles = require('./styles')
module.exports = async function(self) {
self.setFeedbackDefinitions({
ack_cue_feedback: {
type: 'advanced',
name: 'Acknowledge Cue',
description: 'Indicates Cue being received by CueEther (Last Feedback step)',
options: [Options.CueType],
// Triggered for every button with this feedback
callback: async(feedback) => {
var _type = self.lastCuePress;
// This button isn't of the lastCuePress
if (_type == undefined || feedback.options.cueType != _type) {
return Styles.Default;
}
if (_type == 'next') {
self.lastCuePress = undefined;
return Styles.NextAck;
} else if (_type == 'back') {
self.lastCuePress = undefined;
return Styles.BackAck;
} else if (_type == 'black') {
self.lastCuePress = undefined;
return Styles.BlackoutAck;
}
}
},
});
}