API reference

SimpleDropdownList Class

Extends MonoBehaviour
A dropdown ui interface that uses 'UnityEngine.Text' labels and builds content via a load method that accepts a list of strings.

Fields

DropdownToggleUnselectedText : string
Signature
string Meta.Voice.Samples.TTSVoices.SimpleDropdownList.DropdownToggleUnselectedText
OnIndexSelected : SimpleDropdownIndexEvent
Signature
SimpleDropdownIndexEvent Meta.Voice.Samples.TTSVoices.SimpleDropdownList.OnIndexSelected
OnOptionSelected : SimpleDropdownOptionEvent
Signature
SimpleDropdownOptionEvent Meta.Voice.Samples.TTSVoices.SimpleDropdownList.OnOptionSelected
Options : string []
Signature
string [] Meta.Voice.Samples.TTSVoices.SimpleDropdownList.Options
SelectedOptionIndex : int
Signature
int Meta.Voice.Samples.TTSVoices.SimpleDropdownList.SelectedOptionIndex

Properties

IsShowing : bool
[Get]
Whether the popup is currently showing or not
Signature
bool Meta.Voice.Samples.TTSVoices.SimpleDropdownList.IsShowing
SelectedOption : string
[Get]
Signature
string Meta.Voice.Samples.TTSVoices.SimpleDropdownList.SelectedOption

Protected Methods

Awake ()
On awake, find dropdown cell
Signature
virtual void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.Awake()
Returns
void
LoadCell ( cell , index , option , y )
Load a specific cell
Signature
virtual void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.LoadCell(Toggle cell, int index, string option, ref float y)
Parameters
cell: Toggle
index: int  Cell index
option: string
y: ref float
Returns
void  Height of cell
OnDisable ()
Remove toggle delegate
Signature
virtual void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.OnDisable()
Returns
void
OnEnable ()
Add toggle delegate
Signature
virtual void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.OnEnable()
Returns
void
Start ()
Perform dropdown setup methods
Signature
virtual void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.Start()
Returns
void

Methods

GetOptionIndex ( option )
A method for obtaining the index of a dropdown option string.
Signature
int Meta.Voice.Samples.TTSVoices.SimpleDropdownList.GetOptionIndex(string option)
Parameters
option: string  Accepts an option text string that matches a loaded text option.
Returns
int  Returns the index of the provided option string
LoadDropdown ( newOptions )
Load dropdown with specified options
Signature
void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.LoadDropdown(string[] newOptions)
Parameters
newOptions: string []  The options to be used
Returns
void
SelectOption ( newIndex )
Select an item in the dropdown list
Signature
void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.SelectOption(int newIndex)
Parameters
newIndex: int  The option index to be selected
Returns
void
SelectOption ( option )
Select option by name
Signature
void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.SelectOption(string option)
Parameters
option: string  The option to be selected
Returns
void
SetShowing ( toShowing )
Show or hide the popup
Signature
void Meta.Voice.Samples.TTSVoices.SimpleDropdownList.SetShowing(bool toShowing)
Parameters
toShowing: bool  The option index to be selected
Returns
void