Dropdown
The Dropdown is a GUI 2D Object that allows the user to create a dropdown menu. The options in the menu, together with the colors and size, can be customized in the Attributes.

Attributes
The Object's Attributes can be used to fully customize the Object. Explained below, they are:
Transformation

The Transformation Attributes deal with placement, rotation, and size in XY space. More information can be found here.
Dropdown

The Dropdown Attributes provide crucial data for a Dropdown Object. The Options have two types: Static Text and Translation. This can be switched using the text or translation icons to the right, in that order.

- Active indexdetermines which- Optionis shown at the front of the Dropdown. Remember that the first element has the index of 0.
- Optionsprovides the elements which will populate the Dropdown. Here there are three elements called- one,- two, and- phrase. The first two are of type- Static Text, where the user simply types the desired text. The third is of type- Translation, which lets the user choose the key of the current language (which is established in the Project Settings). In the image above, the selected key is- phrase.
In the above image, because the Active index is set to 0, 'one' would be element shown at the front of the Dropdown.
Text

The Text Attributes customize the textual elements of a Dropdown.
- Colordecides the color of the Dropdown's text.
- Transformcan easily change certain text aesthetics without requiring the user to change the- OptionsAttributes themselves.- Capitalizemakes the first letter capital,- uppercasemakes all letters capital, and- lowercasemakes all letters lowercase.
- Line height (%)determines the placement of the text within the Dropdown.
Font

The Font Attributes focus on the details of the Drowpdown's text. Please note that while Dropdowns are capable of handling variable fonts, only the default style will be used, as the configurable Attributes are not available for this Object.
- Familyoffers two different font types:- Manropeand- Source Code Pro. More fonts can be added by the user in Project Settings.
- Sizedetermines the size of the font in pixels.
Style

The Style Attributes allow for more customizability. This can override any stylesheet provided in the Project Settings or a Scene2D.
To address these in the Logic, please refer to the Object 2D Nodes.
- Background Colordecides the color of the Dropdown's background.
- CSS Classescontain the CSS class names of the Object.
- Stylesheetcontains the CSS stylesheet of the Object.
Tag

This Attribute manages the tags for the Dropdown. See more on tags here.
Example
The following is a simple example of a Dropdown with three options:

The Options Attribute defines the options in the Dropdown:

Finally, this Dropdown looks like this when the Project is run:

Last updated
Was this helpful?