API reference
API reference
Select your platform
No SDKs available
No versions available

DropDownAttribute Class

An attribute for serialized strings that allow them to be used with a custom dropdown editor via a reflection method call.
Meta::WitAi::Attributes::DropDownAttribute extends PropertyAttribute.

Overview

Properties

string
The method name to be used for obtaining an IEnumerable<string> of options available for the drop down menu.
bool
Whether or not the dropdown options getter method should be invoked on every repaint or cached. This should be set to true if the list is expected to change throughout interactions with the GUI.
bool
Whether or not the dropdown option can be invalid in which case it will be left at index -1. If false, this will always clamp the dropdown to the first option.
bool
Returns true if the data options for the field list are empty and displays the property value instead.
bool
If true a refresh button will be shown
string
If set, this method will be used when the refresh button is pressed. This may be a longer manual refresh if needed and may or may not be the same as the refresh method used for refreshing on paint.
bool
If set a search button will appear to allow for text based searching of parameters

Public Member Functions

DropDownAttribute
( string optionListGetterName,
bool refreshOnRepaint,
bool allowInvalid,
bool showPropertyIfListIsEmpty,
bool showRefreshButton,
string refreshMethodName,
bool showSearch )
Constructor for drop down attribute

Details

Properties

string Meta.WitAi.Attributes.DropDownAttribute.OptionListGetterName
The method name to be used for obtaining an IEnumerable<string> of options available for the drop down menu.
bool Meta.WitAi.Attributes.DropDownAttribute.RefreshOnRepaint
Whether or not the dropdown options getter method should be invoked on every repaint or cached. This should be set to true if the list is expected to change throughout interactions with the GUI.
bool Meta.WitAi.Attributes.DropDownAttribute.AllowInvalid
Whether or not the dropdown option can be invalid in which case it will be left at index -1. If false, this will always clamp the dropdown to the first option.
bool Meta.WitAi.Attributes.DropDownAttribute.ShowPropertyIfListIsEmpty
Returns true if the data options for the field list are empty and displays the property value instead.
bool Meta.WitAi.Attributes.DropDownAttribute.ShowRefreshButton
If true a refresh button will be shown
string Meta.WitAi.Attributes.DropDownAttribute.RefreshMethodName
If set, this method will be used when the refresh button is pressed. This may be a longer manual refresh if needed and may or may not be the same as the refresh method used for refreshing on paint.
bool Meta.WitAi.Attributes.DropDownAttribute.ShowSearch
If set a search button will appear to allow for text based searching of parameters

Member Functions

Meta.WitAi.Attributes.DropDownAttribute.DropDownAttribute
( string optionListGetterName,
bool refreshOnRepaint,
bool allowInvalid,
bool showPropertyIfListIsEmpty,
bool showRefreshButton,
string refreshMethodName,
bool showSearch )
Constructor for drop down attribute
Did you find this page helpful?
Thumbs up icon
Thumbs down icon