Skip to content
Bananenbrot edited this page Aug 10, 2023 · 2 revisions

The Enum Property is a special variable which didn't exist like that in other programming languages. You can add a enum variable to the Properties by writing a new comment over the variable with the syntax:

#STB-Input-{Space}-Enum


Enum Syntax

The Enum is very special.

syntax: [ selected Item ,[ Items ]]

The variable must be of type list or tuple. The first element must be of type string and represents the selected Item.
The second element must be of type list or tuple, it represents the Items of the enumeration, which must be of type string

Example

This Property is only displayed in the Panel.

#STB-Input-Panel-Enum
MyEnum = ["dog",["cat", "bird", "dog", "sheep"]]

This Property is displayed in the Panel and also in the Dialog.

#STB-Input-Panel-Enum /// #STB-Input-Dialog-Enum
MyEnum = ("dog",("cat", "bird", "dog", "sheep"))

This Property is only displayed in the Dialog.

#STB-Input-Dialog-Enum
MyEnum = ("dog",["cat", "bird", "dog", "sheep"])

Clone this wiki locally