Interactive Button
Interactive Button input properties for Script Engine. Adds a clickable button as a video layer in a scene. The button shows a chosen background graphic (one of four built-in size variants) with custom text on top, and — when Composer is running in Interactive Mode — fires a Script Engine function each time the operator clicks it. Useful for building simple operator panels, on-screen control surfaces, or quick triggers for scripted actions.
| Property | Type | Access | Description |
|---|---|---|---|
ButtonVariant |
InteractiveButtonVariant |
get/set |
Pre-built button graphic to use. [default=Size200By42]. Picks one of four built-in button background images, each at a fixed size: Size100By22 (100×22), Size200By22 (200×22), Size126By42 (126×42), or Size200By42 (200×42). Switching variant also resets the font size to a value that suits the chosen button graphic. |
Text |
string |
get/set |
The text shown on the button. [default="My Button"]. Set from a script to change the label at runtime — for example, switching between "Start" and "Stop" depending on the state of another component. |
TextAlign |
SKTextAlign |
get/set |
Horizontal alignment of the text within the button. [default=Center]. Left, Center, or Right. |
FontSize |
int |
get/set |
Size of the text in pixels. [min=6, max=256, default=22]. Reset automatically when ButtonVariant is changed, so that the text suits the new button background. Override afterwards if you want a different size. |
FontFamily |
Font |
get/set |
Which font to use for the button text. Picks the typeface from the fonts installed on the system. When sharing a project, make sure the chosen font is also available on the destination machine. |
FontWeight |
SKFontStyleWeight |
get/set |
How thick the strokes of the letters are. [default=Normal]. Ranges from Thin and Light through Normal and Medium up to Bold, ExtraBold, and Black. Only takes effect when the chosen font ships with the requested weight — otherwise the closest available weight is used. |
FontSlantStyle |
SKFontStyleSlant |
get/set |
Whether the text is upright or italic. [default=Upright]. Upright is regular, non-slanted text. Italic slants the letters in the font's designed italic style. Oblique is a synthetic slant the renderer applies when the font has no dedicated italic. |
FontWidth |
SKFontStyleWidth |
get/set |
How wide or narrow the letters are drawn. [default=Normal]. Ranges from UltraCondensed and Condensed through Normal to Expanded and UltraExpanded. Only takes effect when the chosen font ships with the requested width — otherwise the closest available width is used. |
Red |
int |
get/set |
Text color red. [min=0, max=255, default=255]. |
Green |
int |
get/set |
Text color green. [min=0, max=255, default=170]. |
Blue |
int |
get/set |
Text color blue. [min=0, max=255, default=45]. |
Alpha |
int |
get/set |
Text alpha. [min=0, max=255, default=255]. |
IsInteractive |
bool |
get/set |
Whether the button responds to clicks. [default=false]. When true, and Composer is running in Interactive Mode, clicking the button fires the Script Engine function named in OnClickFunction. Disable for a non-clickable graphic, or to temporarily lock the button. |
HideInEditMode |
bool |
get/set |
Whether the button is hidden while the project is being edited. [default=false]. When true, the button only appears when the project is running, so it doesn't clutter the editor view. When false, the button is visible in both edit and run modes. |
OnClickFunction |
string |
get/set |
Name of the Script Engine function to call when the button is clicked. Only used when IsInteractive is true. Set this to the exact name of a function defined in your Script Engine project. Leave blank to skip the callback. |
ScriptParameter |
string |
get/set |
Optional value passed to the click-handler function as an argument. Only used when IsInteractive is true and OnClickFunction is set. Useful for reusing the same handler across several buttons and telling them apart by parameter. |
MiniLog |
FormattedMessage |
get |
Most recent status, info, or error message from the input (read-only). |
Inherits from: AbstractInput, AbstractAudioProcessing, AbstractAudioMetering.
See also: Interactive Button in Inputs — user-facing introduction, screenshots, and section summaries.