Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_ParamEnumArray Interface Reference
Inheritance diagram for SCR_ParamEnumArray:

Static Public Member Functions

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 Protected Member Functions

static array< string > SplitString (string input, string separator, int maxCount=0)
 Split the provided string, considering escaped separators.
 

Static Protected Attributes

static const int CORE_MODULE_COUNT = 2
 
static const string ENTRY_SEPARATOR = SCR_StringHelper.SEMICOLON
 
static const string VALUE_SEPARATOR = SCR_StringHelper.COMMA
 
static const string ESCAPE_CHARACTER = SCR_StringHelper.SINGLE_QUOTE
 

Member Function Documentation

◆ FromAddons()

static ParamEnumArray SCR_ParamEnumArray.FromAddons ( int titleFormat = 2,
int hideCoreModules = 0 )
static

Get a ParamEnumArray of named addon indices Example:

[Attribute(desc: "Pick an addon", uiwidget: UIWidgets.ComboBox, enums: SCR_ParamEnumArray.FromAddons())]
protected int m_iAddon;
Definition SCR_ParamEnumArray.c:2
static ParamEnumArray FromAddons(int titleFormat=2, int hideCoreModules=0)
Get a ParamEnumArray of named addon indices Example:
Definition SCR_ParamEnumArray.c:19
Parameters
[in]titleFormat0 for "AddonID", 1 for "AddonTitle", 2 for "AddonTitle (AddonID)"
[in]hideCoreModules0 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]enumValueskeeps 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]enumTypeNamethe enum typename
[in]skipFirsthow many values from start must be skipped
[in]avoidLasthow 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]inputformat 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]inputthe string to split
[in]separatorcomma or semicolon (can factually be anything)
[in]maxCountif > 0, limit the max number of splits
Returns
the split string

Member Data Documentation

◆ CORE_MODULE_COUNT

const int SCR_ParamEnumArray.CORE_MODULE_COUNT = 2
staticprotected

◆ ENTRY_SEPARATOR

const string SCR_ParamEnumArray.ENTRY_SEPARATOR = SCR_StringHelper.SEMICOLON
staticprotected

◆ ESCAPE_CHARACTER

const string SCR_ParamEnumArray.ESCAPE_CHARACTER = SCR_StringHelper.SINGLE_QUOTE
staticprotected

◆ VALUE_SEPARATOR

const string SCR_ParamEnumArray.VALUE_SEPARATOR = SCR_StringHelper.COMMA
staticprotected

The documentation for this interface was generated from the following file: