Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseActionsEditorComponent.c File Reference

Go to the source code of this file.

Classes

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)
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)
void ActionPerformInstantlyNoDialog (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags=0)
TraceFlags GetInstantActionTraceFlags ()
void ActionPerform (SCR_BaseEditorAction action, vector cursorWorldPosition, int flags)
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)
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.

Variables

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

Function Documentation

◆ ActionCanBePerformed()

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

Definition at line 246 of file SCR_BaseActionsEditorComponent.c.

◆ ActionCanBeShown()

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

Definition at line 235 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerform() [1/2]

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

Definition at line 331 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerform() [2/2]

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

Perform given action

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

Definition at line 292 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformInstantly()

void ActionPerformInstantly ( SCR_BaseEditorAction action,
int flags = 0 )
protected

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 255 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformInstantlyNoDialog()

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

Definition at line 268 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformLocal()

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

Definition at line 337 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformOwner()

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

Definition at line 384 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformRpc()

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

Definition at line 313 of file SCR_BaseActionsEditorComponent.c.

◆ ActionPerformServer()

void 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

Definition at line 353 of file SCR_BaseActionsEditorComponent.c.

◆ BaseContainerProps()

class SCR_EditorActionGroup BaseContainerProps ( configRoot:true )

Definition at line 1 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 )
protected

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 188 of file SCR_BaseActionsEditorComponent.c.

◆ GetActions()

int GetActions ( out notnull array< SCR_BaseEditorAction > actions)
protected

Gets all actions on the component

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

Definition at line 172 of file SCR_BaseActionsEditorComponent.c.

◆ GetAndEvaluateActions()

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

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 211 of file SCR_BaseActionsEditorComponent.c.

◆ GetHoveredEntity()

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

Definition at line 163 of file SCR_BaseActionsEditorComponent.c.

◆ GetInstantActionTraceFlags()

TraceFlags GetInstantActionTraceFlags ( )
protected

Definition at line 282 of file SCR_BaseActionsEditorComponent.c.

◆ ValidateSelection()

int 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

Definition at line 224 of file SCR_BaseActionsEditorComponent.c.

Variable Documentation

◆ m_aActions

ref SCR_SortedArray<SCR_BaseEditorAction> m_aActions

Definition at line 20 of file SCR_BaseActionsEditorComponent.c.

◆ m_ActionGroup

EEditorActionGroup m_ActionGroup

Definition at line 15 of file SCR_BaseActionsEditorComponent.c.

◆ m_HoveredEntity

SCR_EditableEntityComponent m_HoveredEntity
protected

Definition at line 158 of file SCR_BaseActionsEditorComponent.c.

◆ m_HoverManager

◆ m_iOrder

int m_iOrder

Definition at line 18 of file SCR_BaseActionsEditorComponent.c.

◆ m_MenuLayoutManager

SCR_MenuLayoutEditorComponent m_MenuLayoutManager
protected

Definition at line 156 of file SCR_BaseActionsEditorComponent.c.

◆ m_SelectedEntities

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

Definition at line 159 of file SCR_BaseActionsEditorComponent.c.

◆ m_SelectedManager

SCR_BaseEditableEntityFilter m_SelectedManager
protected

Definition at line 155 of file SCR_BaseActionsEditorComponent.c.