@@ -11,7 +11,7 @@ import {
1111 CompanionFeedbackInfo ,
1212} from '@companion-module/base'
1313// import { compareNumber, GetDropdownFeedback, GetNumberComparator, GetPanoramaSliderFeedback } from './choices/common.js'
14- import { GetDropdown , GetMuteDropdown , getTriStateColor , getTriStateTextColor } from './choices/common.js'
14+ import { GetDropdown , GetMuteDropdown } from './choices/common.js'
1515import { getTalkbackOptions } from './choices/config.js'
1616import { ConfigurationCommands } from './commands/config.js'
1717import { getNodeNumber } from './actions/utils.js'
@@ -136,13 +136,37 @@ export function GetFeedbacksList(
136136 getIdLabelPair ( 'B' , 'AES B' ) ,
137137 getIdLabelPair ( 'C' , 'AES C' ) ,
138138 ] ) ,
139+ {
140+ type : 'colorpicker' ,
141+ id : 'okcolor' ,
142+ label : 'Ok' ,
143+ tooltip : 'Color of the button when an AES connection is OK' ,
144+ default : combineRgb ( 0 , 255 , 0 ) ,
145+ } ,
146+ {
147+ type : 'colorpicker' ,
148+ id : 'errcolor' ,
149+ label : 'Error' ,
150+ tooltip : 'Color of the button when an AES connection is not OK' ,
151+ default : combineRgb ( 255 , 0 , 0 ) ,
152+ } ,
153+ {
154+ type : 'colorpicker' ,
155+ id : 'nccolor' ,
156+ label : 'Not Connected' ,
157+ tooltip : 'Color of the button when the status of an AES connection is unknown/not connected.' ,
158+ default : combineRgb ( 0 , 0 , 0 ) ,
159+ } ,
139160 ] ,
140161 callback : ( event : CompanionFeedbackInfo ) : CompanionAdvancedFeedbackResult => {
141162 const cmd = StatusCommands . AesStatus ( event . options . aes as string )
142163 const val = StateUtil . getStringFromState ( cmd , state )
143- return {
144- bgcolor : getTriStateColor ( val ) ,
145- color : getTriStateTextColor ( val ) ,
164+ if ( val == 'OK' ) {
165+ return event . options . okcolor as CompanionAdvancedFeedbackResult
166+ } else if ( val == 'ERR' ) {
167+ return event . options . errcolor as CompanionAdvancedFeedbackResult
168+ } else {
169+ return event . options . nccolor as CompanionAdvancedFeedbackResult
146170 }
147171 } ,
148172 subscribe : ( event ) : void => {
0 commit comments