Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_BaseEditorComponent Interface Reference

Base class for editor components. More...

Inheritance diagram for SCR_BaseEditorComponent:
[legend]

Public Member Functions

sealed void OnInitBase ()
 
sealed void OnDeleteBase ()
 
sealed void OnRequestBase (bool isOpen)
 
sealed void OnOpenedBase ()
 
sealed void OnClosedBase ()
 
sealed void OnPreActivateBase ()
 
sealed void OnActivateBase ()
 
sealed bool OnActivateAsyncBase (int attempt)
 
sealed void OnPostActivateBase ()
 
sealed void OnDeactivateBase ()
 
sealed void OnPostDeactivateBase ()
 
sealed bool OnDeactivateAsyncBase (int attempt)
 
sealed 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 Member Functions

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).
 

Protected Member Functions

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)
 
Template Methods (Owner)

Methods to be overridden by child classes, called where the editor is local.

void EOnEditorInit ()
 When the entity is created.
 
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.
 
void EOnEditorActivate ()
 When 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.
 
void EOnEditorDeactivate ()
 When the component is deactivated.
 
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.
 
Template Methods (Server)

Methods to be overridden by child classes, called on server.

void EOnEditorInitServer ()
 When the entity is created (called on server)
 
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

SCR_EditorBaseEntity m_Owner
 
SCR_EditorManagerEntity m_Manager
 
SCR_BaseEditorComponent m_Parent
 
RplComponent m_RplComponent
 

Detailed Description

Base class for editor components.

Execution Order

Examples
d:/jenkins/workspace/ar_data_branches_stable_1.2.1/A4Data/scripts/Game/Editor/Components/Editor/SCR_TestEditorComponent.c.

Constructor & Destructor Documentation

◆ SCR_BaseEditorComponent()

void SCR_BaseEditorComponent.SCR_BaseEditorComponent ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)
Parameters
[in]src
[in]ent
[in]parent

◆ ~SCR_BaseEditorComponent()

void SCR_BaseEditorComponent.~SCR_BaseEditorComponent ( )

Member Function Documentation

◆ EOnEditorActivate()

void SCR_BaseEditorComponent.EOnEditorActivate ( )
protected

◆ EOnEditorActivateAsync()

bool SCR_BaseEditorComponent.EOnEditorActivateAsync ( int  attempt)
protected

When the component is activated.

Asynchronous, can take multiple frames in case of complex operations.

Parameters
[in]attemptNumber of previous attempts to activate the component.
Returns
True if the component is activated, false if it isn't (another attempt will follow in the next frame).

Implemented in SCR_ContentBrowserEditorComponent, SCR_EntitiesManagerEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorActivateServer()

void SCR_BaseEditorComponent.EOnEditorActivateServer ( )
protected

◆ EOnEditorClose()

void SCR_BaseEditorComponent.EOnEditorClose ( )
protected

◆ EOnEditorCloseServer()

void SCR_BaseEditorComponent.EOnEditorCloseServer ( )
protected

◆ EOnEditorCloseServerCallback()

void SCR_BaseEditorComponent.EOnEditorCloseServerCallback ( )
protected

When the editor is closed (called on server after async loading finished on client)

Implemented in SCR_TestEditorComponent.

◆ EOnEditorDeactivate()

void SCR_BaseEditorComponent.EOnEditorDeactivate ( )
protected

◆ EOnEditorDeactivateAsync()

bool SCR_BaseEditorComponent.EOnEditorDeactivateAsync ( int  attempt)
protected

When the component is deactivated.

Asynchronous, can take multiple frames in case of complex operations.

Parameters
[in]attemptNumber of previous attempts to deactivate the component.
Returns
true if the component is activated, false if it isn't (another attempt will follow in the next frame).

Implemented in SCR_EntitiesManagerEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorDeactivateServer()

void SCR_BaseEditorComponent.EOnEditorDeactivateServer ( )
protected

When the component is deactivated (called on server)

Implemented in SCR_CampaignBuildingPlacingEditorComponent, SCR_ContentBrowserEditorComponent, SCR_DynamicSimulationEditorComponent, SCR_ServerInfoEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorDebug()

void SCR_BaseEditorComponent.EOnEditorDebug ( array< string >  debugTexts)
protected

◆ EOnEditorDelete()

void SCR_BaseEditorComponent.EOnEditorDelete ( )
protected

◆ EOnEditorDeleteServer()

void SCR_BaseEditorComponent.EOnEditorDeleteServer ( )
protected

When the entity is destroyed (called on server)

Implemented in SCR_BudgetEditorComponent, SCR_PlayerDelegateEditorComponent, SCR_PlayersManagerEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorInit()

void SCR_BaseEditorComponent.EOnEditorInit ( )
protected

◆ EOnEditorInitServer()

void SCR_BaseEditorComponent.EOnEditorInitServer ( )
protected

◆ EOnEditorOpen()

void SCR_BaseEditorComponent.EOnEditorOpen ( )
protected

◆ EOnEditorOpenServer()

void SCR_BaseEditorComponent.EOnEditorOpenServer ( )
protected

◆ EOnEditorOpenServerCallback()

void SCR_BaseEditorComponent.EOnEditorOpenServerCallback ( )
protected

When the editor is opened (called on server after async loading finished on client)

Implemented in SCR_PlayersManagerEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorPostActivate()

void SCR_BaseEditorComponent.EOnEditorPostActivate ( )
protected

◆ EOnEditorPostDeactivate()

void SCR_BaseEditorComponent.EOnEditorPostDeactivate ( )
protected

When the component is deactivated, but after the next mode is activated.

Implemented in SCR_CameraEditorComponent, SCR_MenuLayoutEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorPreActivate()

void SCR_BaseEditorComponent.EOnEditorPreActivate ( )
protected

Before the component is activated.

Implemented in SCR_CameraEditorComponent, and SCR_TestEditorComponent.

◆ EOnEditorRequest()

void SCR_BaseEditorComponent.EOnEditorRequest ( bool  isOpen)
protected

When opening/closing request is sent to server.

Implemented in SCR_TestEditorComponent.

◆ EOnEffect()

void SCR_BaseEditorComponent.EOnEffect ( SCR_BaseEditorEffect  effect)
protected

When an effect is created in reaction an an event.

Implemented in SCR_PingEditorComponent, and SCR_TestEditorComponent.

◆ FindEditorComponent()

SCR_BaseEditorComponent SCR_BaseEditorComponent.FindEditorComponent ( TypeName  type,
bool  showError = false,
bool  modeFirst = false 
)

Get the editor manager to which this component belongs.

Parameters
[in]type
[in]showError
[in]modeFirst
Returns
Editor manager

◆ GetAllInstances()

static int SCR_BaseEditorComponent.GetAllInstances ( TypeName  type,
out notnull array< Managed >  outComponents 
)
static

Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity).

Parameters
[in]typeRequested component type
[out]outComponentsArray to be filled with components
Returns
Number of found components

◆ GetEditorComponentData()

EntityComponentPrefabData SCR_BaseEditorComponent.GetEditorComponentData ( )

Get prefab data of this component.

Returns
Prefab data

◆ GetInstance() [1/2]

static Managed SCR_BaseEditorComponent.GetInstance ( SCR_EditorBaseEntity  editorManager,
TypeName  type,
bool  showError = false 
)
static

Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity).

When not found on editor manager, it will be searched for in current editor mode (SCR_EditorModeEntity).

Parameters
[in]editorManagerEditor manager or mode which is searched
[in]typeRequested component type
[in]showErrorTrue to log a warning message when the component was not found (useful when the component is required by a script)
Returns
Component

◆ GetInstance() [2/2]

static Managed SCR_BaseEditorComponent.GetInstance ( TypeName  type,
bool  showError = false,
bool  modeFirst = false 
)
static

Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity).

When not found on editor manager, it will be searched for in current editor mode (SCR_EditorModeEntity).

Parameters
[in]typeRequested component type
[in]showErrorTrue to log a warning message when the component was not found
[in]modeFirstWhen true, search the component first on editor mode and then on editor manager. By default it's false, the other way around.
Returns
Component
Examples
d:/jenkins/workspace/ar_data_branches_stable_1.2.1/A4Data/scripts/Game/Editor/Containers/EditableEntityFilters/SCR_RenderedEditableEntityFilter.c.

◆ GetManager()

SCR_EditorManagerEntity SCR_BaseEditorComponent.GetManager ( )

Get editor manager this component belongs to.

Returns
Editor manager

◆ GetOnEffect()

ScriptInvoker SCR_BaseEditorComponent.GetOnEffect ( )

Get event called when an effect is activated.

Returns
Script invoker

◆ GetParentComponent()

SCR_BaseEditorComponent SCR_BaseEditorComponent.GetParentComponent ( )
protected

◆ InitOwner()

void SCR_BaseEditorComponent.InitOwner ( )

◆ InitServer()

void SCR_BaseEditorComponent.InitServer ( )

◆ IsAdmin()

bool SCR_BaseEditorComponent.IsAdmin ( )
protected

◆ IsMaster()

bool SCR_BaseEditorComponent.IsMaster ( )
protected

◆ IsOnEditorManager()

bool SCR_BaseEditorComponent.IsOnEditorManager ( )
protected

◆ IsOwner()

bool SCR_BaseEditorComponent.IsOwner ( )
protected

◆ IsProxy()

bool SCR_BaseEditorComponent.IsProxy ( )
protected

◆ IsRemoved()

bool SCR_BaseEditorComponent.IsRemoved ( )

Check if the component is being deleted.

Returns
True if entity is ready to be deleted

◆ OnActivateAsyncBase()

sealed bool SCR_BaseEditorComponent.OnActivateAsyncBase ( int  attempt)
Parameters
[in]attempt
Returns

◆ OnActivateBase()

sealed void SCR_BaseEditorComponent.OnActivateBase ( )

◆ OnClosedBase()

sealed void SCR_BaseEditorComponent.OnClosedBase ( )

◆ OnDeactivateAsyncBase()

sealed bool SCR_BaseEditorComponent.OnDeactivateAsyncBase ( int  attempt)
Parameters
[in]attempt
Returns

◆ OnDeactivateBase()

sealed void SCR_BaseEditorComponent.OnDeactivateBase ( )

◆ OnDeleteBase()

sealed void SCR_BaseEditorComponent.OnDeleteBase ( )

◆ OnEffectBase()

sealed void SCR_BaseEditorComponent.OnEffectBase ( SCR_BaseEditorEffect  effect)
Parameters
[in]effect

◆ OnInitBase()

sealed void SCR_BaseEditorComponent.OnInitBase ( )

◆ OnOpenedBase()

sealed void SCR_BaseEditorComponent.OnOpenedBase ( )

◆ OnPostActivateBase()

sealed void SCR_BaseEditorComponent.OnPostActivateBase ( )

◆ OnPostDeactivateBase()

sealed void SCR_BaseEditorComponent.OnPostDeactivateBase ( )

◆ OnPostInit()

override void SCR_BaseEditorComponent.OnPostInit ( IEntity  owner)

Implemented in SCR_MapEditorComponent.

◆ OnPreActivateBase()

sealed void SCR_BaseEditorComponent.OnPreActivateBase ( )

◆ OnRequestBase()

sealed void SCR_BaseEditorComponent.OnRequestBase ( bool  isOpen)
Parameters
[in]isOpen

◆ ResetEditorComponent()

void SCR_BaseEditorComponent.ResetEditorComponent ( )

Reset values controlled by the component.

To be overridden by child classes.

Implemented in SCR_CameraEditorComponent, SCR_CameraFiltersEditorComponent, and SCR_MenuOverlaysEditorComponent.

◆ SendNotification()

void SCR_BaseEditorComponent.SendNotification ( ENotification  notificationID,
int  selfID = 0,
int  targetID = 0,
vector  position = vector::Zero 
)
protected

◆ SetParentComponent()

void SCR_BaseEditorComponent.SetParentComponent ( SCR_BaseEditorComponent  parent)
protected

Member Data Documentation

◆ m_Manager

SCR_EditorManagerEntity SCR_BaseEditorComponent.m_Manager
protected

◆ m_Owner

SCR_EditorBaseEntity SCR_BaseEditorComponent.m_Owner
protected

◆ m_Parent

SCR_BaseEditorComponent SCR_BaseEditorComponent.m_Parent
protected

◆ m_RplComponent

RplComponent SCR_BaseEditorComponent.m_RplComponent
protected

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