diff --git a/src/feedbacks.js b/src/feedbacks.js index 1b0c1da..5eca2a8 100644 --- a/src/feedbacks.js +++ b/src/feedbacks.js @@ -1,5 +1,6 @@ import { presentation_states, video_states, livevideo_states, comparators } from './choices.js' import { get_images } from './images.js' +import { combineRgb } from '@companion-module/base' export function getFeedbackDefinitions(self, osc) { const feedbacks = { @@ -63,6 +64,12 @@ export function getFeedbackDefinitions(self, osc) { type: 'boolean', // Feedbacks can either a simple boolean, or can be an 'advanced' style change (until recently, all feedbacks were 'advanced') name: 'Presentation State', description: 'custom feedback based on presentation state', + defaultStyle: { + // The default style change for a boolean feedback + // The user will be able to customise these values as well as the fields that will be changed + bgcolor: combineRgb(255, 0, 0), + color: combineRgb(255, 255, 255), + }, // options is how the user can choose the condition the feedback activates for options: [ { diff --git a/src/presets.js b/src/presets.js index d567656..117d51f 100644 --- a/src/presets.js +++ b/src/presets.js @@ -390,7 +390,18 @@ export function getPresetDefinitions() { up: [], }, ], - feedbacks: [], + feedbacks: [ + { + feedbackId: 'presentation_state', + options: { + presentation_state: '0', + }, + style: { + bgcolor: combineRgb(255, 0, 0), + color: combineRgb(255, 255, 255), + }, + }, + ], } const state_background = { @@ -420,7 +431,18 @@ export function getPresetDefinitions() { up: [], }, ], - feedbacks: [], + feedbacks: [ + { + feedbackId: 'presentation_state', + options: { + presentation_state: '1', + }, + style: { + bgcolor: combineRgb(255, 0, 0), + color: combineRgb(255, 255, 255), + }, + }, + ], } const state_page = { @@ -450,7 +472,18 @@ export function getPresetDefinitions() { up: [], }, ], - feedbacks: [], + feedbacks: [ + { + feedbackId: 'presentation_state', + options: { + presentation_state: '2', + }, + style: { + bgcolor: combineRgb(255, 0, 0), + color: combineRgb(255, 255, 255), + }, + }, + ], } const state_logo = { @@ -480,7 +513,18 @@ export function getPresetDefinitions() { up: [], }, ], - feedbacks: [], + feedbacks: [ + { + feedbackId: 'presentation_state', + options: { + presentation_state: '3', + }, + style: { + bgcolor: combineRgb(255, 0, 0), + color: combineRgb(255, 255, 255), + }, + }, + ], } result['state_current'] = state_current result['state_black'] = state_black