Skip to content

types.enum_property_builder ​

Builds and registers a enum setting.

Functions ​

default_value(value : string): types.enum_property_builder ​

Sets the default value of the setting.

options(options : table): types.enum_property_builder ​

Sets the available strings for enum and multi_select settings.

observer(callback : function): types.enum_property_builder ​

Sets a callback notified when the setting value changes.

  • callback (fun(old_value:string,new_value:string)) Receives the previous and new values
  • returns (types.enum_property_builder) This builder

visibility(callback : function): types.enum_property_builder ​

Sets a callback controlling GUI visibility. Defaults to always visible.

category(category : types.property_category): types.enum_property_builder ​

Groups the setting under an existing property category.

description(description : string): types.enum_property_builder ​

Sets the setting's description.

build(): types.enum_property ​

Registers the setting and returns its property.