|
| static ParamEnumArray | FromAddons (int titleFormat=2, int hideCoreModules=0) |
| | Get a ParamEnumArray of named addon indices Example:
|
| |
| static ParamEnumArray | FromEnumArray (TypeName enumTypeName, notnull array< int > enumValues) |
| | Get a ParamEnumArray of array-provided enum values.
|
| |
| static ParamEnumArray | FromEnumSkip (TypeName enumTypeName, int skipFirst, int skipLast=0) |
| | Get a ParamEnumArray of enum values with the ability to skip beginning and/or end ones.
|
| |
| static ParamEnumArray | FromString (string input) |
| | Get ComboBox entries from string, format:
|
| |
|
| static array< string > | SplitString (string input, string separator, int maxCount=0) |
| | Split the provided string, considering escaped separators.
|
| |
◆ FromAddons()
| static ParamEnumArray SCR_ParamEnumArray.FromAddons |
( |
int | titleFormat = 2, |
|
|
int | hideCoreModules = 0 ) |
|
static |
Get a ParamEnumArray of named addon indices Example:
- Parameters
-
| [in] | titleFormat | 0 for "AddonID", 1 for "AddonTitle", 2 for "AddonTitle (AddonID)" |
| [in] | hideCoreModules | 0 to hide nothing, 1 to hide core (vanilla) addons, 2 to hide core addons only when more addons are available |
- Returns
- an [Attribute] combobox-compatible ParamEnumArray value (for int variable)
◆ FromEnumArray()
| static ParamEnumArray SCR_ParamEnumArray.FromEnumArray |
( |
TypeName | enumTypeName, |
|
|
notnull array< int > | enumValues ) |
|
static |
Get a ParamEnumArray of array-provided enum values.
- Parameters
-
| [in] | enumTypeName | |
| [in] | enumValues | keeps the provided order and skips invalid/combined values |
- Returns
- wanted array if everything is fine, FromEnum result if enumValues is empty, null if enumTypeName is null
◆ FromEnumSkip()
| static ParamEnumArray SCR_ParamEnumArray.FromEnumSkip |
( |
TypeName | enumTypeName, |
|
|
int | skipFirst, |
|
|
int | skipLast = 0 ) |
|
static |
Get a ParamEnumArray of enum values with the ability to skip beginning and/or end ones.
- Parameters
-
| [in] | enumTypeName | the enum typename |
| [in] | skipFirst | how many values from start must be skipped |
| [in] | avoidLast | how many values from end must be avoided |
- Returns
- the array, or full FromEnum on invalid skip/avoid values, or null on null enumTypeName
◆ FromString()
| static ParamEnumArray SCR_ParamEnumArray.FromString |
( |
string | input | ) |
|
|
static |
Get ComboBox entries from string, format:
- "text1;text2;text3"
- "text1,desc1;text2,desc2;text3,desc3"
- "value1,text1,desc1;value2,text2,desc2;value3,text3,desc3" If value is not defined, array index is used ("0", "1", "2", etc)
- Note
- commas and semicolons can be escaped using a single quote (" ', ", " '; ")
- Parameters
-
| [in] | input | format can be (entries are separated by semicolons ";"): |
- text
- text,description
- value,text,description (if there is no description, use a trailing comma to keep an empty description e.g "value,text,")
- Returns
- the resulting ParamEnumArray - never null
◆ SplitString()
| static array< string > SCR_ParamEnumArray.SplitString |
( |
string | input, |
|
|
string | separator, |
|
|
int | maxCount = 0 ) |
|
staticprotected |
Split the provided string, considering escaped separators.
- Parameters
-
| [in] | input | the string to split |
| [in] | separator | comma or semicolon (can factually be anything) |
| [in] | maxCount | if > 0, limit the max number of splits |
- Returns
- the split string
◆ CORE_MODULE_COUNT
| const int SCR_ParamEnumArray.CORE_MODULE_COUNT = 2 |
|
staticprotected |
◆ ENTRY_SEPARATOR
◆ ESCAPE_CHARACTER
◆ VALUE_SEPARATOR
The documentation for this interface was generated from the following file:
- Game/Global/SCR_ParamEnumArray.c