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

Go to the source code of this file.

Data Structures

class  SCR_EditorActionGroup
 
class  SCR_BaseActionsEditorComponentClass
 

Functions

class SCR_EditorActionGroup BaseContainerProps (configRoot:true)
 
SCR_EditableEntityComponent GetHoveredEntity ()
 
int GetActions (out notnull array< SCR_BaseEditorAction > actions)
 
void EvaluateActions (notnull array< SCR_BaseEditorAction > actions, vector cursorWorldPosition, out notnull array< ref SCR_EditorActionData > filteredActions, out int flags=0)
 
int GetAndEvaluateActions (vector cursorWorldPosition, out notnull array< ref SCR_EditorActionData > filteredActions, out int flags=0)
 
protected int ValidateSelection (bool isInstant)
 
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)
 
protected void ActionPerformInstantlyNoDialog (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags=0)
 
protected TraceFlags GetInstantActionTraceFlags ()
 
void ActionPerform (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags)
 
protected void ActionPerformRpc (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags, int param=-1)
 
protected void ActionPerform (SCR_BaseEditorAction action, SCR_EditableEntityComponent hoveredEntityComponent, set< SCR_EditableEntityComponent > selectedEntityComponents, vector cursorWorldPosition, int flags, int param)
 
protected void ActionPerformLocal (SCR_BaseEditorAction action, SCR_EditableEntityComponent hoveredEntityComponent, set< SCR_EditableEntityComponent > selectedEntityComponents, vector cursorWorldPosition, int flags, int param)
 
protected void ActionPerformServer (int actionIndex, RplId hoveredEntityID, array< RplId > selectedEntityIds, vector cursorWorldPosition, int flags, int param)
 
protected 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. More...
 
private void SerializeEntities (out RplId hoveredEntityId, out array< RplId > selectedEntityIds)
 
private bool GetRplIdFromEditableEntity (SCR_EditableEntityComponent entity, out RplId entityRplId)
 
private void DeSerializeEntities (RplId hoveredEntityId, array< RplId > selectedEntityIds, out SCR_EditableEntityComponent hoveredEntityComponent, out set< SCR_EditableEntityComponent > selectedEntityComponents)
 
private bool GetEditableEntityFromRplId (RplId entityRplId, out SCR_EditableEntityComponent editableEntityComponent)
 
override void EOnEditorActivate ()
 
override void EOnEditorDeactivate ()
 

Variables

EEditorActionGroup m_ActionGroup
 
int m_iOrder
 
ref SCR_SortedArray< SCR_BaseEditorActionm_aActions
 
SCR_BaseActionsEditorComponentClass m_HoverManager
 
protected SCR_BaseEditableEntityFilter m_SelectedManager
 
protected SCR_MenuLayoutEditorComponent m_MenuLayoutManager
 
protected SCR_EditableEntityComponent m_HoveredEntity
 
protected ref set< SCR_EditableEntityComponentm_SelectedEntities = new set<SCR_EditableEntityComponent>()
 

Function Documentation

◆ ActionCanBePerformed()

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

Definition at line 242 of file SCR_BaseActionsEditorComponent.c.

◆ ActionCanBeShown()

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

Definition at line 231 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerform() [1/2]

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

Definition at line 327 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerform() [2/2]

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

Perform given action

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

Definition at line 288 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformInstantly()

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.

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

Definition at line 251 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformInstantlyNoDialog()

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

Definition at line 264 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformLocal()

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

Definition at line 333 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformOwner()

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

Definition at line 374 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformRpc()

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

Definition at line 309 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformServer()

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

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

Definition at line 349 of file SCR_BaseActionsEditorComponent.c.

◆ BaseContainerProps()

class SCR_EditorActionGroup BaseContainerProps ( configRoot:true  )

Definition at line 13 of file SCR_BaseActionsEditorComponent.c.

◆ DeSerializeEntities()

private void DeSerializeEntities ( RplId  hoveredEntityId,
array< RplId >  selectedEntityIds,
out SCR_EditableEntityComponent  hoveredEntityComponent,
out set< SCR_EditableEntityComponent selectedEntityComponents 
)

Definition at line 426 of file SCR_BaseActionsEditorComponent.c.

◆ EOnEditorActivate()

override void EOnEditorActivate ( )

Definition at line 463 of file SCR_BaseActionsEditorComponent.c.

◆ EOnEditorDeactivate()

override void EOnEditorDeactivate ( )

Definition at line 482 of file SCR_BaseActionsEditorComponent.c.

◆ EvaluateActions()

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

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

Definition at line 184 of file SCR_BaseActionsEditorComponent.c.

◆ GetActions()

int 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

Definition at line 168 of file SCR_BaseActionsEditorComponent.c.

◆ GetAndEvaluateActions()

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

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

Definition at line 207 of file SCR_BaseActionsEditorComponent.c.

◆ GetEditableEntityFromRplId()

private bool GetEditableEntityFromRplId ( RplId  entityRplId,
out SCR_EditableEntityComponent  editableEntityComponent 
)

Definition at line 449 of file SCR_BaseActionsEditorComponent.c.

◆ GetHoveredEntity()

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

Definition at line 159 of file SCR_BaseActionsEditorComponent.c.

◆ GetInstantActionTraceFlags()

protected TraceFlags GetInstantActionTraceFlags ( )

Definition at line 278 of file SCR_BaseActionsEditorComponent.c.

◆ GetRplIdFromEditableEntity()

private bool GetRplIdFromEditableEntity ( SCR_EditableEntityComponent  entity,
out RplId  entityRplId 
)

Definition at line 419 of file SCR_BaseActionsEditorComponent.c.

◆ SerializeEntities()

private void SerializeEntities ( out RplId  hoveredEntityId,
out array< RplId >  selectedEntityIds 
)

Definition at line 390 of file SCR_BaseActionsEditorComponent.c.

◆ ValidateSelection()

protected int ValidateSelection ( bool  isInstant)

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

Definition at line 220 of file SCR_BaseActionsEditorComponent.c.

Variable Documentation

◆ m_aActions

ref SCR_SortedArray<SCR_BaseEditorAction> m_aActions

Definition at line 8 of file SCR_BaseActionsEditorComponent.c.

◆ m_ActionGroup

EEditorActionGroup m_ActionGroup

Definition at line 3 of file SCR_BaseActionsEditorComponent.c.

◆ m_HoveredEntity

protected SCR_EditableEntityComponent m_HoveredEntity

Definition at line 154 of file SCR_BaseActionsEditorComponent.c.

◆ m_HoverManager

◆ m_iOrder

int m_iOrder

Definition at line 6 of file SCR_BaseActionsEditorComponent.c.

◆ m_MenuLayoutManager

protected SCR_MenuLayoutEditorComponent m_MenuLayoutManager

Definition at line 152 of file SCR_BaseActionsEditorComponent.c.

◆ m_SelectedEntities

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

Definition at line 155 of file SCR_BaseActionsEditorComponent.c.

◆ m_SelectedManager

protected SCR_BaseEditableEntityFilter m_SelectedManager

Definition at line 151 of file SCR_BaseActionsEditorComponent.c.