UGantrySettingChoice
One of a list of options, usually drawn as a rotator or a drop-down.
Fixed options go in Options. Options that depend on the machine, such as screen resolutions or sound devices, can be worked out each time they are asked for. In Blueprint, override Get Options. In C++, call BindOptions.
- Inherits
UGantrySettingValue
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Options read-only | TArray<FGantrySettingOption> | The options, when they are fixed. | |
DefaultValue read-only | FString | The default option's value; empty for no default. Without one, a saved value starts at the first option. |
Functions
GetOptions
The options on offer now.
| Pin | Type | Direction | Description |
|---|---|---|---|
| Return Value | TArray<FGantrySettingOption> | out | The bound options when there are, otherwise Options. |
GetSelectedIndex
Which option the current value is.
| Pin | Type | Direction | Description |
|---|---|---|---|
| Return Value | int32 | out | Its index in Get Options, or -1 when the value is none of them (a custom mix). |
GetSelectedText
| Pin | Type | Direction | Description |
|---|---|---|---|
| Return Value | FText | out | The chosen option's text, or the raw value when it is none of the options. |
SetSelectedIndex
Chooses an option by its index in Get Options.
Out of range does nothing.
| Pin | Type | Direction | Description |
|---|---|---|---|
Index | int32 | in |
C++
Public C++ members that Blueprint does not see.
FOptionsFunction
using UGantrySettingChoice::FOptionsFunction = TFunction<TArray<FGantrySettingOption>>
Native options: worked out each time they are asked for.
ResetToDefault
virtual void
Selects Default Value, when it is set.
HasDefault
virtual bool
Whether Default Value is set.
GetDefaultValueString
virtual FString
Default Value when it is set, otherwise the first option's value.
BindOptions
void
C++: works the options out with a function each time they are asked for.