Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ParamEnumArray Class Reference
Inheritance diagram for SCR_ParamEnumArray:

Static Protected Member Functions

static ParamEnumArray FromAddons (int titleFormat=2, int hideCoreModules=0)
static ParamEnumArray FromEnumArray (typename enumTypeName, notnull array< int > enumValues)
static ParamEnumArray FromEnumSkip (typename enumTypeName, int skipFirst, int skipLast=0)
static ParamEnumArray FromString (string input)
static array< stringSplitString (string input, string separator, int maxCount=0)

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

Detailed Description

Definition at line 1 of file SCR_ParamEnumArray.c.

Member Function Documentation

◆ FromAddons()

ParamEnumArray SCR_ParamEnumArray::FromAddons ( int titleFormat = 2,
int hideCoreModules = 0 )
inlinestaticprotected

Get a ParamEnumArray of named addon indices Example:

[Attribute(desc: "Pick an addon", uiwidget: UIWidgets.ComboBox, enums: SCR_ParamEnumArray.FromAddons())]
protected int m_iAddon;
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
static ParamEnumArray FromAddons(int titleFormat=2, int hideCoreModules=0)
SCR_FieldOfViewSettings Attribute
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)

Definition at line 19 of file SCR_ParamEnumArray.c.

◆ FromEnumArray()

ParamEnumArray SCR_ParamEnumArray::FromEnumArray ( typename enumTypeName ,
notnull array< int > enumValues )
inlinestaticprotected

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

Definition at line 54 of file SCR_ParamEnumArray.c.

◆ FromEnumSkip()

ParamEnumArray SCR_ParamEnumArray::FromEnumSkip ( typename enumTypeName ,
int skipFirst,
int skipLast = 0 )
inlinestaticprotected

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

Definition at line 112 of file SCR_ParamEnumArray.c.

◆ FromString()

ParamEnumArray SCR_ParamEnumArray::FromString ( string input)
inlinestaticprotected

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

Definition at line 164 of file SCR_ParamEnumArray.c.

◆ SplitString()

array< string > SCR_ParamEnumArray::SplitString ( string input,
string separator,
int maxCount = 0 )
inlinestaticprotected

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

Definition at line 234 of file SCR_ParamEnumArray.c.

Member Data Documentation

◆ CORE_MODULE_COUNT

const int SCR_ParamEnumArray::CORE_MODULE_COUNT = 2
staticprotected

Definition at line 3 of file SCR_ParamEnumArray.c.

◆ ENTRY_SEPARATOR

const string SCR_ParamEnumArray::ENTRY_SEPARATOR = SCR_StringHelper.SEMICOLON
staticprotected

Definition at line 5 of file SCR_ParamEnumArray.c.

◆ ESCAPE_CHARACTER

const string SCR_ParamEnumArray::ESCAPE_CHARACTER = SCR_StringHelper.SINGLE_QUOTE
staticprotected

Definition at line 7 of file SCR_ParamEnumArray.c.

◆ VALUE_SEPARATOR

const string SCR_ParamEnumArray::VALUE_SEPARATOR = SCR_StringHelper.COMMA
staticprotected

Definition at line 6 of file SCR_ParamEnumArray.c.


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