|
Arma Reforger Script API
|
Manager ofeditor attributes. More...
Public Member Functions | |
| void | StartEditing (Managed item) |
| Start attributes editing of single item. | |
| void | StartEditing (notnull array< Managed > items, bool onlyServer=true) |
| Start attributes editing of multiple items. | |
| void | ConfirmEditing () |
| Confirm changes made during editing. | |
| void | CancelEditing () |
| Cancel changes made during editing. | |
| void | Reset (bool telegraphChange) |
| Reset values of currently edited attributes to the state they had when the editing started. | |
| bool | CanOpenAttributeDialog (notnull array< Managed > items) |
| 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. | |
| bool | GetAttributeVariable (TypeName type, out SCR_BaseEditorAttributeVar var) |
| Gets the value of an attribute in the atribute window. | |
| 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) | |
| bool | GetActiveAttribute (TypeName type, out SCR_BaseEditorAttribute attribute) |
| Gets the attribute in the atribute window. | |
| bool | SetAttributeEnabled (TypeName type, bool enabled) |
| Called to send out an event that the attribute is enabled or disabled. | |
| bool | SetAttributeSelected (TypeName type, bool selected, int index=-1) |
| Called to send out an event that the attribute should be selected. | |
| 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. | |
| SCR_BaseEditorAttribute | GetAttributeRef (TypeName type) |
| int | GetEditedAttributes (out notnull array< SCR_BaseEditorAttribute > outAttributes) |
| Get currently edited attributes. | |
| int | GetEditedItems (out notnull array< Managed > outitems) |
| Get currently edited items. | |
| ScriptInvoker | GetOnAttributesRequest () |
| Get event called when request for editing attributes is sent to server. | |
| ScriptInvoker | GetOnAttributesStart () |
| Get event called when editing attributes is confirmed by server. | |
| ScriptInvoker | GetOnAttributesConfirm () |
| Get event called when editing attributes is confirmed. | |
| ScriptInvoker | GetOnAttributesCancel () |
| Get event called when editing attributes is canceled. | |
| ScriptInvoker | GetOnResetAttributes () |
| Get event called when attributes are reset. | |
| ScriptInvoker | GetOnAttributeChangesApplied () |
| Get event called when attribute changes are applied. | |
| ScriptInvoker | GetOnAttributeDescriptionChanged () |
| Get event called when attribute description changes and should be displayed in the attribute UI dailog. | |
| ScriptInvoker | GetOnAttributeCategoryChanged () |
| Get script invoker that is called everytime category is changed. | |
| SCR_EditorAttributeUIInfo | GetConflictingAttributeUIInfo () |
| Info displayed when attribute is locked if it is a conflicting attribute. | |
| void | SetCurrentCategory (ResourceName category) |
| Set current category config. | |
| ResourceName | GetCurrentCategory () |
| bool | GetChangedAttributesOnce () |
| Get if user has changed attributes once. | |
| 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. | |
| override void | EOnEditorActivate () |
| When the component is activated. | |
| override void | EOnEditorDeactivate () |
| When the component is deactivated. | |
| override void | EOnEditorInit () |
| When the entity is created. | |
| override void | EOnEditorInitServer () |
| When the entity is created (called on server) | |
Public Member Functions inherited from SCR_BaseEditorComponent | |
| void | OnInitBase () |
| void | OnDeleteBase () |
| void | OnRequestBase (bool isOpen) |
| void | OnOpenedBase () |
| void | OnClosedBase () |
| void | OnPreActivateBase () |
| void | OnActivateBase () |
| bool | OnActivateAsyncBase (int attempt) |
| void | OnPostActivateBase () |
| void | OnDeactivateBase () |
| void | OnPostDeactivateBase () |
| bool | OnDeactivateAsyncBase (int attempt) |
| void | OnEffectBase (SCR_BaseEditorEffect effect) |
| SCR_EditorManagerEntity | GetManager () |
| Get editor manager this component belongs to. | |
| SCR_BaseEditorComponent | FindEditorComponent (TypeName type, bool showError=false, bool modeFirst=false) |
| Get the editor manager to which this component belongs. | |
| EntityComponentPrefabData | GetEditorComponentData () |
| Get prefab data of this component. | |
| bool | IsRemoved () |
| Check if the component is being deleted. | |
| void | ResetEditorComponent () |
| Reset values controlled by the component. | |
| ScriptInvoker | GetOnEffect () |
| Get event called when an effect is activated. | |
| void | InitServer () |
| void | InitOwner () |
| override void | OnPostInit (IEntity owner) |
| void | SCR_BaseEditorComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
| void | ~SCR_BaseEditorComponent () |
Static Public Attributes | |
| const int | SNAPSHOT_SIZE = 96 |
Protected Member Functions | |
| void | StartEditingServer (array< int > itemIds) |
| void | StartEditingOwner (notnull array< int > attributesIds, notnull array< ref SCR_BaseEditorAttributeVar > attributesVars, notnull array< ref EEditorAttributeMultiSelect > attributesMultiSelect) |
| bool | GetIsAttributeDuplicate (TypeName type) |
| void | ConfirmEditingServer (notnull array< int > attributesIds, notnull array< ref SCR_BaseEditorAttributeVar > attributesVars, int PlayerID) |
| void | CancelEditingServer () |
| void | Clean () |
| 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) |
Protected Member Functions inherited from SCR_BaseEditorComponent | |
| bool | IsOnEditorManager () |
| bool | IsOwner () |
| bool | IsProxy () |
| bool | IsMaster () |
| bool | IsAdmin () |
| SCR_BaseEditorComponent | GetParentComponent () |
| void | SetParentComponent (SCR_BaseEditorComponent parent) |
| void | SendNotification (ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero) |
| void | EOnEditorDelete () |
| When the entity is destroyed. | |
| void | EOnEditorRequest (bool isOpen) |
| When opening/closing request is sent to server. | |
| void | EOnEditorOpen () |
| When the editor is opened. | |
| void | EOnEditorClose () |
| When the editor is closed. | |
| void | EOnEditorPreActivate () |
| Before the component is activated. | |
| bool | EOnEditorActivateAsync (int attempt) |
| When the component is activated. | |
| void | EOnEditorPostActivate () |
| When the component is activated, but after EOnEditorActivate() function was called in all components. | |
| bool | EOnEditorDeactivateAsync (int attempt) |
| When the component is deactivated. | |
| void | EOnEditorPostDeactivate () |
| When the component is deactivated, but after the next mode is activated. | |
| void | EOnEditorDebug (array< string > debugTexts) |
| Every frame while the editor is opened and debug menu is shown. | |
| void | EOnEffect (SCR_BaseEditorEffect effect) |
| When an effect is created in reaction an an event. | |
| void | EOnEditorDeleteServer () |
| When the entity is destroyed (called on server) | |
| void | EOnEditorOpenServer () |
| When the editor is opened (called on server) | |
| void | EOnEditorOpenServerCallback () |
| When the editor is opened (called on server after async loading finished on client) | |
| void | EOnEditorCloseServer () |
| When the editor is closed (called on server) | |
| void | EOnEditorCloseServerCallback () |
| When the editor is closed (called on server after async loading finished on client) | |
| void | EOnEditorActivateServer () |
| When the component is activated (called on server) | |
| void | EOnEditorDeactivateServer () |
| When the component is deactivated (called on server) | |
Protected Attributes | |
| ref SCR_EditorAttributeUIInfo | m_ConflictingAttributeUIInfo |
| bool | m_bHasChangedAttributesOnce = false |
| ResourceName | m_CurrentCategory |
Protected Attributes inherited from SCR_BaseEditorComponent | |
| SCR_EditorBaseEntity | m_Owner |
| SCR_EditorManagerEntity | m_Manager |
| SCR_BaseEditorComponent | m_Parent |
| RplComponent | m_RplComponent |
Additional Inherited Members | |
Static Public Member Functions inherited from SCR_BaseEditorComponent | |
| static Managed | GetInstance (TypeName type, bool showError=false, bool modeFirst=false) |
| Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity). | |
| static Managed | GetInstance (SCR_EditorBaseEntity editorManager, TypeName type, bool showError=false) |
| Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity). | |
| static int | GetAllInstances (TypeName type, out notnull array< Managed > outComponents) |
| Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity). | |
Manager ofeditor attributes.
All available attributes (SCR_BaseEditorAttribute and inherited classes) are defined here, each attribute (added in the EditorMode prefab) must be an unique class inherited from SCR_BaseEditorAttribute!
To edit attributes, follow these steps:
| void SCR_AttributesManagerEditorComponent.CancelEditing | ( | ) |
Cancel changes made during editing.
Must be called on editor owner.
|
protected |
| bool SCR_AttributesManagerEditorComponent.CanOpenAttributeDialog | ( | notnull array< Managed > | items | ) |
| [in] | items |
|
protected |
| void SCR_AttributesManagerEditorComponent.ConfirmEditing | ( | ) |
Confirm changes made during editing.
Must be called on editor owner.
|
protected |
| override void SCR_AttributesManagerEditorComponent.EOnEditorActivate | ( | ) |
When the component is activated.
Implements SCR_BaseEditorComponent.
| override void SCR_AttributesManagerEditorComponent.EOnEditorDeactivate | ( | ) |
When the component is deactivated.
Implements SCR_BaseEditorComponent.
| override void SCR_AttributesManagerEditorComponent.EOnEditorInit | ( | ) |
When the entity is created.
Implements SCR_BaseEditorComponent.
| override void SCR_AttributesManagerEditorComponent.EOnEditorInitServer | ( | ) |
When the entity is created (called on server)
Implements SCR_BaseEditorComponent.
| bool SCR_AttributesManagerEditorComponent.GetActiveAttribute | ( | TypeName | type, |
| out SCR_BaseEditorAttribute | attribute ) |
Gets the attribute in the atribute window.
| [in] | type | Class of attribute |
| [out] | attribute | attribute to get |
| int SCR_AttributesManagerEditorComponent.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)
| [in] | type | Class of attribute |
| [out] | attributes | list of attributes of type |
| [in] | includedInherit | If true will also get inherit classes else will only get the attributes of given type |
| [in] | ignoreAttribute | Add if a given attribute should be ignored |
| SCR_BaseEditorAttribute SCR_AttributesManagerEditorComponent.GetAttributeRef | ( | TypeName | type | ) |
| [in] | type |
| bool SCR_AttributesManagerEditorComponent.GetAttributeVariable | ( | TypeName | type, |
| out SCR_BaseEditorAttributeVar | var ) |
Gets the value of an attribute in the atribute window.
| [in] | type | Class of attribute to set value |
| [out] | var | Value to get |
| bool SCR_AttributesManagerEditorComponent.GetChangedAttributesOnce | ( | ) |
Get if user has changed attributes once.
| SCR_EditorAttributeUIInfo SCR_AttributesManagerEditorComponent.GetConflictingAttributeUIInfo | ( | ) |
Info displayed when attribute is locked if it is a conflicting attribute.
| ResourceName SCR_AttributesManagerEditorComponent.GetCurrentCategory | ( | ) |
| int SCR_AttributesManagerEditorComponent.GetEditedAttributes | ( | out notnull array< SCR_BaseEditorAttribute > | outAttributes | ) |
Get currently edited attributes.
| [in] | outAttributes | Array to be filled with attributes |
| int SCR_AttributesManagerEditorComponent.GetEditedItems | ( | out notnull array< Managed > | outitems | ) |
Get currently edited items.
| [in] | outAttributes | Array to be filled with items |
|
protected |
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnAttributeCategoryChanged | ( | ) |
Get script invoker that is called everytime category is changed.
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnAttributeChangesApplied | ( | ) |
Get event called when attribute changes are applied.
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnAttributeDescriptionChanged | ( | ) |
Get event called when attribute description changes and should be displayed in the attribute UI dailog.
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnAttributesCancel | ( | ) |
Get event called when editing attributes is canceled.
Called only for editor user.
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnAttributesConfirm | ( | ) |
Get event called when editing attributes is confirmed.
Called only for editor user.
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnAttributesRequest | ( | ) |
Get event called when request for editing attributes is sent to server.
Called only for editor user.
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnAttributesStart | ( | ) |
Get event called when editing attributes is confirmed by server.
Called only for editor user.
| ScriptInvoker SCR_AttributesManagerEditorComponent.GetOnResetAttributes | ( | ) |
Get event called when attributes are reset.
|
protected |
| void SCR_AttributesManagerEditorComponent.Reset | ( | bool | telegraphChange | ) |
Reset values of currently edited attributes to the state they had when the editing started.
Must be called on editor owner.
| [in] | telegraphChange | True to update GUI when attribute value is changed |
| bool SCR_AttributesManagerEditorComponent.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.
| [in] | type | class of attribute |
| void SCR_AttributesManagerEditorComponent.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.
| [in] | uiInfo | |
| [in] | customDescription | |
| [in] | param1 | param in text |
| [in] | param2 | param in text |
| [in] | param3 | param in text |
| bool SCR_AttributesManagerEditorComponent.SetAttributeEnabled | ( | TypeName | type, |
| bool | enabled ) |
Called to send out an event that the attribute is enabled or disabled.
| [in] | type | Class of attribute to set value |
| [in] | enabled | enable value to set |
| bool SCR_AttributesManagerEditorComponent.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
| [in] | type | class of attribute to set value |
| [in] | selected | value to set |
| [in] | index | optionally an index of a element that needs to be set selected |
| bool SCR_AttributesManagerEditorComponent.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.
| [in] | type | Class of attribute to set value |
| [in] | var | value to set |
| void SCR_AttributesManagerEditorComponent.SetCurrentCategory | ( | ResourceName | category | ) |
Set current category config.
| [in] | category | Category config |
| void SCR_AttributesManagerEditorComponent.StartEditing | ( | Managed | item | ) |
Start attributes editing of single item.
Must be called on editor owner.
| [in] | item |
| void SCR_AttributesManagerEditorComponent.StartEditing | ( | notnull array< Managed > | items, |
| bool | onlyServer = true ) |
Start attributes editing of multiple items.
Must be called on editor owner.
| [in] | items | |
| [in] | onlyServer |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |