Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AttributesManagerEditorComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_AttributesManagerEditorComponentClass
 

Functions

void StartEditing (Managed item)
 
void StartEditing (notnull array< Managed > items, bool onlyServer=true)
 
protected void StartEditingServer (array< int > itemIds)
 
protected void StartEditingOwner (notnull array< int > attributesIds, notnull array< ref SCR_BaseEditorAttributeVar > attributesVars, notnull array< ref EEditorAttributeMultiSelect > attributesMultiSelect)
 
protected bool GetIsAttributeDuplicate (typename type)
 
void ConfirmEditing ()
 
protected void ConfirmEditingServer (notnull array< int > attributesIds, notnull array< ref SCR_BaseEditorAttributeVar > attributesVars, int PlayerID)
 
void CancelEditing ()
 
protected void CancelEditingServer ()
 
void Reset (bool telegraphChange)
 
protected void Clean ()
 
protected int GetVariables (bool onlyServer, notnull array< Managed > items, notnull out array< int > outIds, notnull out array< ref SCR_BaseEditorAttributeVar > outVars, notnull out array< ref EEditorAttributeMultiSelect > outAttributesMultiSelect)
 
bool CanOpenAttributeDialog (notnull array< Managed > items)
 
bool SetAttributeVariable (typename type, SCR_BaseEditorAttributeVar var)
 
bool GetAttributeVariable (typename type, out SCR_BaseEditorAttributeVar var)
 
int GetActiveAttributesOfType (typename type, notnull out array< SCR_BaseEditorAttribute > attributes, bool includedInherit=true, SCR_BaseEditorAttribute ignoreAttribute=null)
 
bool GetActiveAttribute (typename type, out SCR_BaseEditorAttribute attribute)
 
bool SetAttributeEnabled (typename type, bool enabled)
 
bool SetAttributeSelected (typename type, bool selected, int index=-1)
 
bool SetAttributeAsSubAttribute (typename type)
 
SCR_BaseEditorAttribute GetAttributeRef (typename type)
 
int GetEditedAttributes (out notnull array< SCR_BaseEditorAttribute > outAttributes)
 
int GetEditedItems (out notnull array< Managed > outitems)
 
ScriptInvoker GetOnAttributesRequest ()
 
ScriptInvoker GetOnAttributesStart ()
 
ScriptInvoker GetOnAttributesConfirm ()
 
ScriptInvoker GetOnAttributesCancel ()
 
ScriptInvoker GetOnResetAttributes ()
 
ScriptInvoker GetOnAttributeChangesApplied ()
 
ScriptInvoker GetOnAttributeDescriptionChanged ()
 
ScriptInvoker GetOnAttributeCategoryChanged ()
 
SCR_EditorAttributeUIInfo GetConflictingAttributeUIInfo ()
 
void SetCurrentCategory (ResourceName category)
 
ResourceName GetCurrentCategory ()
 
bool GetChangedAttributesOnce ()
 
void SetAttributeDescription (SCR_EditorAttributeUIInfo uiInfo, string customDescription=string.Empty, string param1=string.Empty, string param2=string.Empty, string param3=string.Empty)
 
override void EOnEditorActivate ()
 
override void EOnEditorDeactivate ()
 
override void EOnEditorInit ()
 
override void EOnEditorInitServer ()
 

Variables

SCR_AttributesManagerEditorComponentClass SNAPSHOT_SIZE = 96
 
private ChimeraMenuPreset m_MenuPreset
 
protected ref SCR_EditorAttributeUIInfo m_ConflictingAttributeUIInfo
 
private SCR_AttributesManagerEditorComponentClass m_PrefabData
 
private SCR_StatesEditorComponent m_StatesManager
 
private bool m_bHasServerAttributes
 
private ref array< Managed > m_aEditedItems
 
private ref array< SCR_BaseEditorAttributem_aEditedAttributes
 
private ref ScriptInvoker Event_OnAttributesRequest = new ScriptInvoker()
 
private ref ScriptInvoker Event_OnAttributesStart = new ScriptInvoker()
 
private ref ScriptInvoker Event_OnAttributesConfirm = new ScriptInvoker()
 
private ref ScriptInvoker Event_OnAttributesCancel = new ScriptInvoker()
 
private ref ScriptInvoker Event_OnResetAttributes = new ScriptInvoker()
 
private ref ScriptInvoker Event_OnAttributeChangesApplied = new ScriptInvoker()
 
private ref ScriptInvoker Event_OnAttributeDescriptionChanged = new ScriptInvoker()
 
private ref ScriptInvoker Event_OnAttributeCategoryChanged = new ScriptInvoker()
 
protected bool m_bHasChangedAttributesOnce = false
 
protected ResourceName m_CurrentCategory
 

Function Documentation

◆ CancelEditing()

void CancelEditing ( )

Cancel changes made during editing. Must be called on editor owner.

Definition at line 417 of file SCR_AttributesManagerEditorComponent.c.

◆ CancelEditingServer()

protected void CancelEditingServer ( )

Definition at line 438 of file SCR_AttributesManagerEditorComponent.c.

◆ CanOpenAttributeDialog()

bool CanOpenAttributeDialog ( notnull array< Managed >  items)
Parameters
[in]items
Returns

Definition at line 599 of file SCR_AttributesManagerEditorComponent.c.

◆ Clean()

protected void Clean ( )

Definition at line 510 of file SCR_AttributesManagerEditorComponent.c.

◆ ConfirmEditing()

void ConfirmEditing ( )

Confirm changes made during editing. Must be called on editor owner.

Definition at line 297 of file SCR_AttributesManagerEditorComponent.c.

◆ ConfirmEditingServer()

protected void ConfirmEditingServer ( notnull array< int attributesIds,
notnull array< ref SCR_BaseEditorAttributeVar attributesVars,
int  PlayerID 
)

Definition at line 384 of file SCR_AttributesManagerEditorComponent.c.

◆ EOnEditorActivate()

override void EOnEditorActivate ( )

Definition at line 968 of file SCR_AttributesManagerEditorComponent.c.

◆ EOnEditorDeactivate()

override void EOnEditorDeactivate ( )

Definition at line 974 of file SCR_AttributesManagerEditorComponent.c.

◆ EOnEditorInit()

override void EOnEditorInit ( )

Definition at line 980 of file SCR_AttributesManagerEditorComponent.c.

◆ EOnEditorInitServer()

override void EOnEditorInitServer ( )

Definition at line 997 of file SCR_AttributesManagerEditorComponent.c.

◆ GetActiveAttribute()

bool GetActiveAttribute ( typename type  ,
out SCR_BaseEditorAttribute  attribute 
)

Gets the attribute in the atribute window

Parameters
[in]typeClass of attribute
[out]attributeattribute to get
Returns
if the class is succesfully found

Definition at line 711 of file SCR_AttributesManagerEditorComponent.c.

◆ GetActiveAttributesOfType()

int GetActiveAttributesOfType ( typename type  ,
notnull out array< SCR_BaseEditorAttribute attributes,
bool  includedInherit = true,
SCR_BaseEditorAttribute  ignoreAttribute = null 
)

Get list of all attributes of given type (or inherits from type)

Parameters
[in]typeClass of attribute
[out]attributeslist of attributes of type
[in]includedInheritIf true will also get inherent classes else will only get the attributes of given type
[in]ignoreAttributeAdd if a given attribute should be ignored
Returns
Count of the found attributes

Definition at line 690 of file SCR_AttributesManagerEditorComponent.c.

◆ GetAttributeRef()

SCR_BaseEditorAttribute GetAttributeRef ( typename type  )
Parameters
[in]type
Returns

Definition at line 824 of file SCR_AttributesManagerEditorComponent.c.

◆ GetAttributeVariable()

bool GetAttributeVariable ( typename type  ,
out SCR_BaseEditorAttributeVar  var 
)

Gets the value of an attribute in the atribute window

Parameters
[in]typeClass of attribute to set value
[out]varValue to get
Returns
bool if the class is succesfully found

Definition at line 663 of file SCR_AttributesManagerEditorComponent.c.

◆ GetChangedAttributesOnce()

bool GetChangedAttributesOnce ( )

Get if user has changed attributes once

Returns
m_bHasChangedAttributesOnce

Definition at line 946 of file SCR_AttributesManagerEditorComponent.c.

◆ GetConflictingAttributeUIInfo()

SCR_EditorAttributeUIInfo GetConflictingAttributeUIInfo ( )

Info displayed when attribute is locked if it is a conflicting attribute

Returns
The conflicting attribute UI info

Definition at line 923 of file SCR_AttributesManagerEditorComponent.c.

◆ GetCurrentCategory()

ResourceName GetCurrentCategory ( )
Returns
Get current category config.

Definition at line 938 of file SCR_AttributesManagerEditorComponent.c.

◆ GetEditedAttributes()

int GetEditedAttributes ( out notnull array< SCR_BaseEditorAttribute outAttributes)

Get currently edited attributes

Parameters
[in]outAttributesArray to be filled with attributes
Returns
Number of attributes

Definition at line 839 of file SCR_AttributesManagerEditorComponent.c.

◆ GetEditedItems()

int GetEditedItems ( out notnull array< Managed >  outitems)

Get currently edited items

Parameters
[in]outAttributesArray to be filled with items
Returns
Number of items

Definition at line 848 of file SCR_AttributesManagerEditorComponent.c.

◆ GetIsAttributeDuplicate()

protected bool GetIsAttributeDuplicate ( typename type  )

Definition at line 275 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnAttributeCategoryChanged()

ScriptInvoker GetOnAttributeCategoryChanged ( )

Get script invoker that is called everytime category is changed

Returns
Script invoker OnAttributeCategoryChanged

Definition at line 915 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnAttributeChangesApplied()

ScriptInvoker GetOnAttributeChangesApplied ( )

Get event called when attribute changes are applied

Returns
Script invoker

Definition at line 899 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnAttributeDescriptionChanged()

ScriptInvoker GetOnAttributeDescriptionChanged ( )

Get event called when attribute description changes and should be displayed in the attribute UI dailog

Returns
Script invoker Event_OnAttributeDescriptionChanged

Definition at line 907 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnAttributesCancel()

ScriptInvoker GetOnAttributesCancel ( )

Get event called when editing attributes is canceled. Called only for editor user.

Returns
Script invoker

Definition at line 883 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnAttributesConfirm()

ScriptInvoker GetOnAttributesConfirm ( )

Get event called when editing attributes is confirmed. Called only for editor user.

Returns
Script invoker

Definition at line 875 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnAttributesRequest()

ScriptInvoker GetOnAttributesRequest ( )

Get event called when request for editing attributes is sent to server. Called only for editor user.

Returns
Script invoker

Definition at line 857 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnAttributesStart()

ScriptInvoker GetOnAttributesStart ( )

Get event called when editing attributes is confirmed by server. Called only for editor user.

Returns
Script invoker

Definition at line 866 of file SCR_AttributesManagerEditorComponent.c.

◆ GetOnResetAttributes()

ScriptInvoker GetOnResetAttributes ( )

Get event called when attributes are reset.

Returns
Script invoker

Definition at line 891 of file SCR_AttributesManagerEditorComponent.c.

◆ GetVariables()

protected int GetVariables ( bool  onlyServer,
notnull array< Managed >  items,
notnull out array< int outIds,
notnull out array< ref SCR_BaseEditorAttributeVar outVars,
notnull out array< ref EEditorAttributeMultiSelect outAttributesMultiSelect 
)

Definition at line 525 of file SCR_AttributesManagerEditorComponent.c.

◆ Reset()

void Reset ( bool  telegraphChange)

Reset values of currently edited attributes to the state they had when the editing started. Must be called on editor owner.

Parameters
[in]telegraphChangeTrue to update GUI when attribute value is changed

Definition at line 452 of file SCR_AttributesManagerEditorComponent.c.

◆ SetAttributeAsSubAttribute()

bool SetAttributeAsSubAttribute ( typename type  )

Called to send out an event that makes sure the given attribute knows it is a sub attribute for another attribute which sets so visual differences

Parameters
[in]typeclass of attribute
Returns
if the class is succesfully found

Definition at line 797 of file SCR_AttributesManagerEditorComponent.c.

◆ SetAttributeDescription()

void SetAttributeDescription ( SCR_EditorAttributeUIInfo  uiInfo,
string  customDescription = string.Empty,
string  param1 = string.Empty,
string  param2 = string.Empty,
string  param3 = string.Empty 
)

Calls an event to set the attribute Description displayed in the Attributes dialog

Parameters
[in]uiInfo
[in]customDescription
[in]param1param in text
[in]param2param in text
[in]param3param in text

Definition at line 958 of file SCR_AttributesManagerEditorComponent.c.

◆ SetAttributeEnabled()

bool SetAttributeEnabled ( typename type  ,
bool  enabled 
)

Called to send out an event that the attribute is enabled or disabled

Parameters
[in]typeClass of attribute to set value
[in]enabledenable value to set
Returns
if the class is succesfully found

Definition at line 735 of file SCR_AttributesManagerEditorComponent.c.

◆ SetAttributeSelected()

bool SetAttributeSelected ( typename type  ,
bool  selected,
int  index = -1 
)

Called to send out an event that the attribute should be selected. Think of a slider being used which is also set by presets

Parameters
[in]typeclass of attribute to set value
[in]selectedvalue to set
[in]indexoptionally an index of a element that needs to be set selected
Returns
if the class is succesfully found

Definition at line 768 of file SCR_AttributesManagerEditorComponent.c.

◆ SetAttributeVariable()

bool SetAttributeVariable ( typename type  ,
SCR_BaseEditorAttributeVar  var 
)

Sets the value of an attribute in the atribute window This is called seperetly from the UI and is for attributes to influence other attributes

Parameters
[in]typeClass of attribute to set value
[in]varvalue to set
Returns
bool if the class is succesfully found

Definition at line 634 of file SCR_AttributesManagerEditorComponent.c.

◆ SetCurrentCategory()

void SetCurrentCategory ( ResourceName  category)

Set current category config.

Parameters
[in]categoryCategory config

Definition at line 931 of file SCR_AttributesManagerEditorComponent.c.

◆ StartEditing() [1/2]

void StartEditing ( Managed  item)

Start attributes editing of single item. Must be called on editor owner.

Parameters
[in]item
Returns
item Edited MapItem

Definition at line 93 of file SCR_AttributesManagerEditorComponent.c.

◆ StartEditing() [2/2]

void StartEditing ( notnull array< Managed >  items,
bool  onlyServer = true 
)

Start attributes editing of multiple items. Must be called on editor owner.

  • Server attributes will be sent to server, which will fill them with values and send them back.
  • Once back, Event_OnAttributesStart is invoked.
  • If all attributes are local, no server verification is performed.
    Parameters
    [in]items
    [in]onlyServer
    Returns
    item Edited items (must be explicitly array<Managed>, not another type! Even when the array element itself inherits from Managed)

Definition at line 123 of file SCR_AttributesManagerEditorComponent.c.

◆ StartEditingOwner()

protected void StartEditingOwner ( notnull array< int attributesIds,
notnull array< ref SCR_BaseEditorAttributeVar attributesVars,
notnull array< ref EEditorAttributeMultiSelect attributesMultiSelect 
)

Definition at line 215 of file SCR_AttributesManagerEditorComponent.c.

◆ StartEditingServer()

protected void StartEditingServer ( array< int itemIds)

Definition at line 171 of file SCR_AttributesManagerEditorComponent.c.

Variable Documentation

◆ Event_OnAttributeCategoryChanged

private ref ScriptInvoker Event_OnAttributeCategoryChanged = new ScriptInvoker()

Definition at line 76 of file SCR_AttributesManagerEditorComponent.c.

◆ Event_OnAttributeChangesApplied

private ref ScriptInvoker Event_OnAttributeChangesApplied = new ScriptInvoker()

Definition at line 74 of file SCR_AttributesManagerEditorComponent.c.

◆ Event_OnAttributeDescriptionChanged

private ref ScriptInvoker Event_OnAttributeDescriptionChanged = new ScriptInvoker()

Definition at line 75 of file SCR_AttributesManagerEditorComponent.c.

◆ Event_OnAttributesCancel

private ref ScriptInvoker Event_OnAttributesCancel = new ScriptInvoker()

Definition at line 72 of file SCR_AttributesManagerEditorComponent.c.

◆ Event_OnAttributesConfirm

private ref ScriptInvoker Event_OnAttributesConfirm = new ScriptInvoker()

Definition at line 71 of file SCR_AttributesManagerEditorComponent.c.

◆ Event_OnAttributesRequest

private ref ScriptInvoker Event_OnAttributesRequest = new ScriptInvoker()

Definition at line 69 of file SCR_AttributesManagerEditorComponent.c.

◆ Event_OnAttributesStart

private ref ScriptInvoker Event_OnAttributesStart = new ScriptInvoker()

Definition at line 70 of file SCR_AttributesManagerEditorComponent.c.

◆ Event_OnResetAttributes

private ref ScriptInvoker Event_OnResetAttributes = new ScriptInvoker()

Definition at line 73 of file SCR_AttributesManagerEditorComponent.c.

◆ m_aEditedAttributes

private ref array<SCR_BaseEditorAttribute> m_aEditedAttributes

Definition at line 68 of file SCR_AttributesManagerEditorComponent.c.

◆ m_aEditedItems

private ref array<Managed> m_aEditedItems

Definition at line 67 of file SCR_AttributesManagerEditorComponent.c.

◆ m_bHasChangedAttributesOnce

protected bool m_bHasChangedAttributesOnce = false

Definition at line 78 of file SCR_AttributesManagerEditorComponent.c.

◆ m_bHasServerAttributes

private bool m_bHasServerAttributes

Definition at line 66 of file SCR_AttributesManagerEditorComponent.c.

◆ m_ConflictingAttributeUIInfo

protected ref SCR_EditorAttributeUIInfo m_ConflictingAttributeUIInfo
attribute

Definition at line 62 of file SCR_AttributesManagerEditorComponent.c.

◆ m_CurrentCategory

protected ResourceName m_CurrentCategory

Definition at line 82 of file SCR_AttributesManagerEditorComponent.c.

◆ m_MenuPreset

private ChimeraMenuPreset m_MenuPreset
attribute

Definition at line 59 of file SCR_AttributesManagerEditorComponent.c.

◆ m_PrefabData

◆ m_StatesManager

private SCR_StatesEditorComponent m_StatesManager

Definition at line 65 of file SCR_AttributesManagerEditorComponent.c.