Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_BaseActionsEditorComponent Interface Reference
Inheritance diagram for SCR_BaseActionsEditorComponent:
[legend]

Public Member Functions

SCR_EditableEntityComponent GetHoveredEntity ()
 
int GetActions (out notnull array< SCR_BaseEditorAction > actions)
 Gets all actions on the component.
 
void EvaluateActions (notnull array< SCR_BaseEditorAction > actions, vector cursorWorldPosition, out notnull array< ref SCR_EditorActionData > filteredActions, out int flags=0)
 Evaluates passed list of actions for the current context.
 
int GetAndEvaluateActions (vector cursorWorldPosition, out notnull array< ref SCR_EditorActionData > filteredActions, out int flags=0)
 Gets and evaluates actions for current context, combination of GetActions and EvaluateActions functions.
 
bool ActionCanBeShown (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags)
 
bool ActionCanBePerformed (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags)
 
void ActionPerformInstantly (SCR_BaseEditorAction action, int flags=0)
 When action shortcut is activated, check if the action can be performed and if so, perform it.
 
void ActionPerform (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags)
 Perform given action.
 
override void EOnEditorActivate ()
 When the component is activated.
 
override void EOnEditorDeactivate ()
 When the component is deactivated.
 
- Public Member Functions inherited from SCR_BaseEditorComponent
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 ()
 

Protected Member Functions

int ValidateSelection (bool isInstant)
 Evaluate which entities are under cursor and which are selected.
 
void ActionPerformInstantlyNoDialog (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags=0)
 
TraceFlags GetInstantActionTraceFlags ()
 
void ActionPerformRpc (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags, int param=-1)
 
void ActionPerform (SCR_BaseEditorAction action, SCR_EditableEntityComponent hoveredEntityComponent, set< SCR_EditableEntityComponent > selectedEntityComponents, vector cursorWorldPosition, int flags, int param)
 
void ActionPerformLocal (SCR_BaseEditorAction action, SCR_EditableEntityComponent hoveredEntityComponent, set< SCR_EditableEntityComponent > selectedEntityComponents, vector cursorWorldPosition, int flags, int param)
 
void ActionPerformServer (int actionIndex, RplId hoveredEntityID, array< RplId > selectedEntityIds, vector cursorWorldPosition, int flags, int param)
 Perform given action on server, exclusively called by ActionPerform.
 
void ActionPerformOwner (int actionIndex, vector cursorWorldPosition, int flags, int param)
 Server callback for when action is executed succesfully, calls PerformOwner function on action for e.g. local effects.
 
- 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 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.
 
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 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_BaseEditableEntityFilter m_HoverManager
 
SCR_BaseEditableEntityFilter m_SelectedManager
 
SCR_MenuLayoutEditorComponent m_MenuLayoutManager
 
SCR_EditableEntityComponent m_HoveredEntity
 
ref set< SCR_EditableEntityComponentm_SelectedEntities = new set<SCR_EditableEntityComponent>()
 
- 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).
 

Member Function Documentation

◆ ActionCanBePerformed()

bool SCR_BaseActionsEditorComponent.ActionCanBePerformed ( SCR_BaseEditorAction  action,
vector  cursorWorldPosition,
int  flags 
)
Parameters
[in]action
[in]cursorWorldPosition
[in]flags
Returns

Implemented in SCR_CommandActionsEditorComponent, SCR_ContextActionsEditorComponent, and SCR_ToolbarActionsEditorComponent.

◆ ActionCanBeShown()

bool SCR_BaseActionsEditorComponent.ActionCanBeShown ( SCR_BaseEditorAction  action,
vector  cursorWorldPosition,
int  flags 
)
Parameters
[in]action
[in]cursorWorldPosition
[in]flags
Returns

Implemented in SCR_CommandActionsEditorComponent, SCR_ContextActionsEditorComponent, and SCR_ToolbarActionsEditorComponent.

◆ ActionPerform() [1/2]

void SCR_BaseActionsEditorComponent.ActionPerform ( SCR_BaseEditorAction  action,
SCR_EditableEntityComponent  hoveredEntityComponent,
set< SCR_EditableEntityComponent selectedEntityComponents,
vector  cursorWorldPosition,
int  flags,
int  param 
)
protected

◆ ActionPerform() [2/2]

void SCR_BaseActionsEditorComponent.ActionPerform ( SCR_BaseEditorAction  action,
vector  cursorWorldPosition,
int  flags 
)

Perform given action.

Parameters
[in]action
[in]cursorWorldPosition
[in]flags

◆ ActionPerformInstantly()

void SCR_BaseActionsEditorComponent.ActionPerformInstantly ( SCR_BaseEditorAction  action,
int  flags = 0 
)

When action shortcut is activated, check if the action can be performed and if so, perform it.

Parameters
[in]actionAction to be performed
[in]flags

◆ ActionPerformInstantlyNoDialog()

void SCR_BaseActionsEditorComponent.ActionPerformInstantlyNoDialog ( SCR_BaseEditorAction  action,
vector  cursorWorldPosition,
int  flags = 0 
)
protected

◆ ActionPerformLocal()

void SCR_BaseActionsEditorComponent.ActionPerformLocal ( SCR_BaseEditorAction  action,
SCR_EditableEntityComponent  hoveredEntityComponent,
set< SCR_EditableEntityComponent selectedEntityComponents,
vector  cursorWorldPosition,
int  flags,
int  param 
)
protected

◆ ActionPerformOwner()

void SCR_BaseActionsEditorComponent.ActionPerformOwner ( int  actionIndex,
vector  cursorWorldPosition,
int  flags,
int  param 
)
protected

Server callback for when action is executed succesfully, calls PerformOwner function on action for e.g. local effects.

◆ ActionPerformRpc()

void SCR_BaseActionsEditorComponent.ActionPerformRpc ( SCR_BaseEditorAction  action,
vector  cursorWorldPosition,
int  flags,
int  param = -1 
)
protected

◆ ActionPerformServer()

void SCR_BaseActionsEditorComponent.ActionPerformServer ( int  actionIndex,
RplId  hoveredEntityID,
array< RplId >  selectedEntityIds,
vector  cursorWorldPosition,
int  flags,
int  param 
)
protected

Perform given action on server, exclusively called by ActionPerform.

Parameters
[in]actionIndexIndex of the action in the m_Actions list, same on server and client
[in]hoveredEntityIDRplID of the hovered entity, -1 if none hovered
[in]selectedEntityIdsRplIDs of the selected entities, empty array if none selected
[in]cursorWorldPositionworld position where action was intitiated
[in]flagsEEditorContextActionFlags / EEditorCommandActionFlags for placing
[in]paramparameter obtained through SCR_BaseEditorAction.GetParam() on client, use to pass client data/ids to server

◆ EOnEditorActivate()

override void SCR_BaseActionsEditorComponent.EOnEditorActivate ( )

When the component is activated.

Implements SCR_BaseEditorComponent.

Implemented in SCR_CommandActionsEditorComponent, SCR_ContextActionsEditorComponent, and SCR_ToolbarActionsEditorComponent.

◆ EOnEditorDeactivate()

override void SCR_BaseActionsEditorComponent.EOnEditorDeactivate ( )

When the component is deactivated.

Implements SCR_BaseEditorComponent.

Implemented in SCR_CommandActionsEditorComponent, SCR_ContextActionsEditorComponent, and SCR_ToolbarActionsEditorComponent.

◆ EvaluateActions()

void SCR_BaseActionsEditorComponent.EvaluateActions ( notnull array< SCR_BaseEditorAction actions,
vector  cursorWorldPosition,
out notnull array< ref SCR_EditorActionData filteredActions,
out int  flags = 0 
)

Evaluates passed list of actions for the current context.

Parameters
[in]actionsinput array with all actions
[in]cursorWorldPositioinworld positon used to evaluate actions
[out]filteredActionsoutput array containing all available actions for the current context
[out]flagsConitions to be cached for faster evaluation in functions
Returns
Amount of available actions

Implemented in SCR_ContextActionsEditorComponent.

◆ GetActions()

int SCR_BaseActionsEditorComponent.GetActions ( out notnull array< SCR_BaseEditorAction actions)

Gets all actions on the component.

Parameters
[out]actionsoutput array containing all actions on this component
Returns
Amount of total actions

◆ GetAndEvaluateActions()

int SCR_BaseActionsEditorComponent.GetAndEvaluateActions ( vector  cursorWorldPosition,
out notnull array< ref SCR_EditorActionData filteredActions,
out int  flags = 0 
)

Gets and evaluates actions for current context, combination of GetActions and EvaluateActions functions.

Parameters
[in]cursorWorldPositionworld positon used to evaluate actions
[in]filteredActionsoutput array containing all available actions for the current context
[in]flagsCached results of common conditions
Returns
Amount of available actions

◆ GetHoveredEntity()

SCR_EditableEntityComponent SCR_BaseActionsEditorComponent.GetHoveredEntity ( )
Returns
Entity under cursor when context menu was opened

◆ GetInstantActionTraceFlags()

TraceFlags SCR_BaseActionsEditorComponent.GetInstantActionTraceFlags ( )
protected

◆ ValidateSelection()

int SCR_BaseActionsEditorComponent.ValidateSelection ( bool  isInstant)
protected

Evaluate which entities are under cursor and which are selected.

To be overridden by inherited classes.

Parameters
[in]isInstantTrue if an action is performed right after this evaluation
Returns
Condition flags passed to actions

Implemented in SCR_CommandActionsEditorComponent, and SCR_ContextActionsEditorComponent.

Member Data Documentation

◆ m_HoveredEntity

SCR_EditableEntityComponent SCR_BaseActionsEditorComponent.m_HoveredEntity
protected

◆ m_HoverManager

SCR_BaseEditableEntityFilter SCR_BaseActionsEditorComponent.m_HoverManager
protected

◆ m_MenuLayoutManager

SCR_MenuLayoutEditorComponent SCR_BaseActionsEditorComponent.m_MenuLayoutManager
protected

◆ m_SelectedEntities

ref set<SCR_EditableEntityComponent> SCR_BaseActionsEditorComponent.m_SelectedEntities = new set<SCR_EditableEntityComponent>()
protected

◆ m_SelectedManager

SCR_BaseEditableEntityFilter SCR_BaseActionsEditorComponent.m_SelectedManager
protected

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