Skip to main content

Custom Dropdown

Intro​

Create custom dropdowns which can be used to set properties including color, alignment and text from a fixed selection of custom, defined options. This Layer is primarily intended for use alongside the Control Centre.

UI​

Selection - The dropdown UI. The contents of the dropdown can be populated by adding new Rows to the list below.

Button iconAdd - Use this button to add more rows to the dropdown's UI.

0: Row - The first index in the array.

  • Enabled - When checked, this index will be included in the dropdown.
  • Name - Enter the label for the option in the dropdown.
  • Value - Connect an Attribute or Layer
Quick Start
  1. Create a Shape.
  2. Create 3 Color Shaders.
  3. Set each of the Color Shader's Color Attributes to red, blue and green.
  4. Create a Custom Dropdown.
  5. Create 2 new rows by clicking the Button iconAdd twice.
  6. Set the Name for each row to Red, Blue, Green.
  7. For each Color Shader, connect colorShader.color→customDropdown.rows.value (for each corresponding row).
  8. Connect customDropdown.id→shape.fillColor.

Use the dropdown that's been created on the Custom Dropdown's Selection row to change the color for the Shape.

Arrays​

The dropdown attribute (called Selection by default) outputs integer values so can be used to drive the Index of an Array.

Example
  1. Create a Shape.
  2. Create a Color Array.
  3. Click the Button iconAdd button to add a second index to the Array and set a colour.
  4. Connect colorArray.id→shape.fillColor.
  5. Create a Custom Dropdown.
  6. Create a new row by clicking the Button iconAdd.
  7. Set the Name for each dropdown entry to match the corresponding colour from the Array.
  8. Connect customDropdown.index→colorArray.arrayIndex (index is labelled Selection by default).

Use the dropdown that's been created on the Custom Dropdown's Selection row to change the color for the Shape.