Class methods


Adds a audio waveform display.

Content.addAudioWaveform(String audioWaveformName, int x, int y)


Adds a toggle button to the Content and returns the component index.

Content.addButton(String buttonName, int x, int y)


Adds a comboBox to the Content and returns the component index.

Content.addComboBox(String boxName, int x, int y)


Adds a floating layout component.

Content.addFloatingTile(String floatingTileName, int x, int y)


Adds a image to the script interface.

Content.addImage(String imageName, int x, int y)


Adds a knob to the Content and returns the component index.

Content.addKnob(String knobName, int x, int y)


Adds a text input label.

Content.addLabel(String label, int x, int y)


Adds a panel (rectangle with border and gradient).

Content.addPanel(String panelName, int x, int y)


Adds a slider pack.

Content.addSliderPack(String sliderPackName, int x, int y)


Adds a table editor to the Content and returns the component index.

Content.addTable(String tableName, int x, int y)


Adds a viewport.

Content.addViewport(String viewportName, int x, int y)


Creates either a line or rectangle with the given colour.

Content.addVisualGuide(var guideData, var colour)

This function creates visual guide lines or rectangles that appear on the interface (not in the compiled plugin). They are useful for debugging or layout alignments.

It expects two arguments, the first must be an array with either two or four elements and the second must be a colour (it's recommended to use the Colours constants for this).

If the array has two elements, it will add a horizontal or vertical line, depending on which element is non-zero. If the array has four elements it will be a rectangle (with the same format that you pass into eg. Graphics.fillRect() ).

Anything else will cause the visual guides to be cleared, so if you want to delete all lines, just pass in 0 .

Content.addVisualGuide([0, 200], Colours.white);       // adds a horizontal line at 200px
Content.addVisualGuide([100, 0],;         // adds a vertical line at 100px
Content.addVisualGuide([10, 10, 100, 50], 0xFF00FF00); // adds a rectangle

Content.addVisualGuide(0, 0);                          // clears all visual guides

The lines will always be rendered on top of all UI elements so that they are always visible.


Creates a look and feel that you can attach manually to certain components.



Creates a Path that can be drawn to a ScriptPanel.



Creates a screenshot of the area relative to the content's origin.

Content.createScreenshot(var area, var directory, String name)

This function can be used to create an image from a section of your interface and save it as PNG file. Just pass an array with 4 elements ([x, y, w, h] ), a File object that points to a directory and a relative filename (without the file extension) and it will render the specified area into a PNG image.

// Save the image to C:\Users\UserName\Documents\myimage.png;
Content.createScreenShot([0, 0, 1024 768], 

Be aware that this takes the current zoom factor into account, so if you have a UI Zoom Factor of 200%, the resulting image will be twice the size of the "default" interface dimensions. It will also hide any visual guides that you might have added so they don't clutter your exported image.

Also be aware that if you use OpenGL shaders, they will not be rendered to the image (because they are rendered directly to the screen). However there is a helper function available to enable shaders to be rendered to a screenshot.


Creates an OpenGL framgent shader.

Content.createShader( String fileName)

If you want to create a ScriptShader , use this method and supply the filename as parameter (see ScriptShader.setFragmentShader() for more information about including shaders).


Returns an array of all components that match the given regex.

Content.getAllComponents(String regex)


Returns the reference to the given component.

Content.getComponent(var name)


Returns the current tooltip.


This can be used to create a custom tooltip implementation if the TooltipPanel does not suit your needs.

This will return the "raw" tooltip (as in the tooltip from the UI element where the mouse is hovering over). For most applications you might want to introduce a custom delay, so that if you move the mouse away from the element, it will "stick" a little bit longer.

This example will display the current tooltip on a label with a delay of a second.

const var t = Engine.createTimerObject();
const var Label1 = Content.getComponent("Label1");
reg isPending = false;

	var tooltip = Content.getCurrentTooltip();
	if(tooltip == "")
		// Now the mouse is over a component without a tooltip
		if(Label1.get("text") != "" && !isPending)
			// The tooltip label was not empty so we set the isPending flag
			// and reset the internal counter of the timer object
			isPending = true;
			this.resetCounter(); // [1]
		else if (this.getMilliSecondsSinceCounterReset() > 1000)
			// Now a second has passed since [1] without a new tooltip being
			// set, so we clear the label and reset the isPending flag
			isPending = false;
			Label1.set("text", "");
		// We update the label with the new tooltip and
		// clear the isPending flag
		isPending = false;
		Label1.set("text", tooltip);

// We don't need it to be super fast, so 100ms should be fine


Sets this script as main interface with the given size.

Content.makeFrontInterface(int width, int height)


Sets this script as main interface with the given device resolution (only works with mobile devices).



Restores all controls from a previously saved XML data file.

Content.restoreAllControlsFromPreset( String fileName)


Sets the colour for the panel.

Content.setColour(int red, int green, int blue)


sets the Tooltip that will be shown if the mouse hovers over the script's tab button.

Content.setContentTooltip( String tooltipToShow)


Sets the height of the content.

Content.setHeight(int newHeight)


Sets the name that will be displayed in big fat Impact.

Content.setName( String newName)


Restore the Component from a JSON object.

Content.setPropertiesFromJSON( String name,  var jsonData)


Sets the main toolbar properties from a JSON object.

Content.setToolbarProperties( var toolbarProperties)


Set this to true to render all script panels with double resolution for retina or rescaling.

Content.setUseHighResolutionForPanels(bool shouldUseDoubleResolution)


sets the data for the value popups.

Content.setValuePopupData(var jsonData)


    "itemColour":   Colours.forestgreen,    // BG colour TOP
    "itemColour2":  Colours.firebrick, // BG colour BOTTOM
    "bgColour":     Colours.gainsboro,      // In fact the Border colour...
    "borderSize":   6.66,
    "textColour":   Colours.navajowhite,
    "fontSize":     66.6,
    "fontName":     "Comic Sans MS"
    "fontName":"Comic Sans MS",
    "fontSize": 14,
    "borderSize": 1,
    "borderRadius": 1,
    "bgColour": 0xFF636363,
    "itemColour": 0xFF000000,
    "itemColour2": 0xFF000000,
     "textColour": 0xFF636363 


Sets the height of the content.

Content.setWidth(int newWidth)


Saves all controls that should be saved into a XML data file.

Content.storeAllControlsAsPreset( String fileName,  ValueTree automationData)