@@ -56,12 +56,14 @@ export function GetPresets(_instance: InstanceBaseExt<WingConfig>): CompanionPre
5656
5757function getMutePreset ( base : string , val : number ) : CompanionButtonPresetDefinition {
5858 const path = `/${ base } /${ val } `
59+ const name = `${ base . toUpperCase ( ) } ${ val } `
5960 return {
6061 name : 'Mute Button' ,
6162 category : 'Mute' ,
6263 type : 'button' ,
6364 style : {
64- text : `Mute\\n$(wing:${ base } ${ val } _name)` ,
65+ text : `let name = 'Mute'const realName = $(wing:${ base } ${ val } _name)let hasNoName = realName === '' || isreturn hasNoName ? 'Mute ${ name } ' : \`Mute \${realName}\`` ,
66+ textExpression : true ,
6567 size : 'auto' ,
6668 color : combineRgb ( 255 , 255 , 255 ) ,
6769 bgcolor : combineRgb ( 0 , 0 , 0 ) ,
@@ -74,7 +76,7 @@ function getMutePreset(base: string, val: number): CompanionButtonPresetDefiniti
7476 down : [
7577 {
7678 actionId : CommonActions . SetMute ,
77- options : { sel : path , mute : 2 } ,
79+ options : { sel : path , mute : - 1 } ,
7880 } ,
7981 ] ,
8082 up : [ ] ,
@@ -95,12 +97,14 @@ function getMutePreset(base: string, val: number): CompanionButtonPresetDefiniti
9597
9698function getSoloPreset ( base : string , val : number ) : CompanionButtonPresetDefinition {
9799 const path = `/${ base } /${ val } `
100+ const name = `${ base . toUpperCase ( ) } ${ val } `
98101 return {
99102 name : `SoloButton` ,
100103 category : 'Solo' ,
101104 type : 'button' ,
102105 style : {
103- text : `Solo\\n$(wing:${ base } ${ val } _name)` ,
106+ text : `let name = 'Solo'const realName = $(wing:${ base } ${ val } _name)let hasNoName = realName === '' || isreturn hasNoName ? 'Solo ${ name } ' : \`Solo \${realName}\`` ,
107+ textExpression : true ,
104108 size : 'auto' ,
105109 color : combineRgb ( 255 , 255 , 255 ) ,
106110 bgcolor : combineRgb ( 0 , 0 , 0 ) ,
@@ -137,12 +141,14 @@ function getSoloPreset(base: string, val: number): CompanionButtonPresetDefiniti
137141
138142function getBoostAndCenterPreset ( base : string , val : number ) : CompanionButtonPresetDefinition {
139143 const path = `/${ base } /${ val } `
144+ const name = `${ base . toUpperCase ( ) } ${ val } `
140145 return {
141146 name : 'Boost and Center Button' ,
142147 category : 'Boost' ,
143148 type : 'button' ,
144149 style : {
145- text : `Boost & Center\\n$(wing:${ base } ${ val } _name)` ,
150+ text : `let name = 'Boost & Center'const realName = $(wing:${ base } ${ val } _name)let hasNoName = realName === '' || isreturn hasNoName ? 'Boost & Center ${ name } ' : \`Boost & Center \${realName}\`` ,
151+ textExpression : true ,
146152 size : 'auto' ,
147153 color : combineRgb ( 255 , 255 , 255 ) ,
148154 bgcolor : combineRgb ( 0 , 0 , 0 ) ,
0 commit comments