Skip to content

Commit 550a652

Browse files
committed
creating presets, fixing types for feedbacks and variables
1 parent 783e8e3 commit 550a652

4 files changed

Lines changed: 46 additions & 13 deletions

File tree

‎src/core/commands.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const COMMANDS: VistaCommands[] = [
155155
},
156156
{
157157
id: 'stealth',
158-
name: 'Programmer: Toggle Stealth',
158+
name: 'Toggle Stealth',
159159
osc: '/V3/global/stealth',
160160
args: ['true'],
161161
},

‎src/feedbacks.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { CompanionFeedbackDefinitions } from '@companion-module/base'
22
import type ModuleInstance from './main.js'
33

4-
// export type FeedbacksSchema = null
4+
export type FeedbacksSchema = any
55

66
export function UpdateFeedbacks(self: ModuleInstance): void {
77
const feedbacks: CompanionFeedbackDefinitions = {}

‎src/presets.ts‎

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,65 @@ import type { CompanionPresetDefinitions, CompanionPresetSection } from '@compan
55
export function UpdatePresets(self: ModuleInstance): void {
66
const structure: CompanionPresetSection[] = [
77
{
8-
id: 'section1',
9-
name: 'Section One',
8+
id: 'console',
9+
name: 'Console',
1010
definitions: [
1111
{
12-
id: 'group1',
13-
name: 'Group One',
14-
description: 'A starting point for preset definitions!',
12+
id: 'pbKeys',
13+
name: 'Playback Keys',
14+
description: 'Control default cuelist playback',
1515
type: 'simple',
16-
presets: ['mylabel'],
16+
presets: ['spbPlay', 'spbPause'],
1717
},
1818
],
1919
},
2020
]
2121

2222
const presets: CompanionPresetDefinitions<ModuleSchema> = {}
23-
presets['mylabel'] = {
23+
presets['spbPlay'] = {
2424
type: 'simple',
25-
name: 'Name',
25+
name: 'Play',
2626
style: {
27-
text: 'My first Preset button',
27+
text: 'Play',
2828
size: 'auto',
2929
color: 0xffffff,
3030
bgcolor: 0x000000,
3131
show_topbar: false,
3232
},
33-
steps: [],
33+
steps: [
34+
{
35+
down: [
36+
{
37+
actionId: 'spbPlay',
38+
options: {},
39+
},
40+
],
41+
up: [],
42+
},
43+
],
44+
feedbacks: [],
45+
}
46+
presets['spbPause'] = {
47+
type: 'simple',
48+
name: 'Pause/Back',
49+
style: {
50+
text: 'Pause/Back',
51+
size: 'auto',
52+
color: 0xffffff,
53+
bgcolor: 0x000000,
54+
show_topbar: false,
55+
},
56+
steps: [
57+
{
58+
down: [
59+
{
60+
actionId: 'spbPauseBack',
61+
options: {},
62+
},
63+
],
64+
up: [],
65+
},
66+
],
3467
feedbacks: [],
3568
}
3669

‎src/variables.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { CompanionVariableDefinitions } from '@companion-module/base'
22
import type ModuleInstance from './main.js'
33

4-
// export type VariablesSchema = null
4+
export type VariablesSchema = any
55

66
export function UpdateVariableDefinitions(self: ModuleInstance): void {
77
const variables: CompanionVariableDefinitions = {}

0 commit comments

Comments
 (0)