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

Go to the source code of this file.

Classes

class  SCR_PlayerControllerCommandingComponentClass

Enumerations

enum  SCR_ECommandVisualizationDuration { BRIEF = 10 , LONGLASTING , PERMANENT }

Functions

SCR_PlayerControllerCommandingComponentClass ScriptComponentClass Attribute (desc:"Config of pairs of actions and commanding menu configs to decide which action opens which menu")
void OnPostInit (IEntity owner)
 Editable Mine.
void OnOwnershipChanged (bool isChanging, bool becameOwner)
void OpenCommandingMenu ()
void OnControllerTakeControl (SCR_RadialMenuController controller)
void OnControllerLostControl (SCR_RadialMenuController controller, bool hasControl)
void SetupMapListener ()
void RemoveMapListener ()
void SetupPlayerRadialMenu ()
void RemoveListenersFromRadial ()
void OnMapOpen (MapConfiguration config)
void OnMapClose (MapConfiguration config)
void SetupMapRadialMenu ()
void OnMapCommandPerformed (SCR_SelectionMenuEntry element, float[] worldPos)
void OnGroupLeaderChanged (int groupID, int playerID)
void OnGroupChanged (int groupID)
void DeleteShownCommand ()
 If a command is currently being displayed, hide/delete it.
void HideCommandPreview ()
 Hide command preview.
void ShowCommandPreview (string commandName)
bool GetWorldToScreenPosition (BaseWorld world, vector worldPosition, out float posX, out float posY, int cameraIndex=-1)
void PhysicsCommandTrace (float range=COMMANDING_VISUAL_RANGE)
void OnRadialMenuSelected (SCR_SelectionMenu menu, SCR_SelectionMenuEntry entry)
void OnRadialMenuPerformed (SCR_SelectionMenu menu, SCR_SelectionMenuEntry entry)
void OnRadialMenuOpenFailed (SCR_SelectionMenu menu, SCR_ESelectionMenuFailReason reason)
void PrepareExecuteCommand (string commandName, vector targetPosition="0 0 0")
void ExecuteCommand (vector targetPosition, IEntity tracedEntity)
void RPC_RequestExecuteCommand (int commandIndex, RplId cursorTargetID, RplId groupRplID, vector targetPoisition, int playerID)
void CommandExecutedCallback (int commandIndex)
void RPC_CommandExecutedCallback (int commandIndex)
void PlayCommandGesture (int commandIndex)
void UpdateRadialMenu (IEntity owner, bool isOpen)
bool AddElementsFromCategory (SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry rootCategory=null)
bool AddElementsFromCategoryToMap (notnull SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry parentCategory=null)
SCR_MapMenuCommandingEntry InsertElementToMapRadial (SCR_PlayerCommandingMenuBaseElement element, notnull SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry mapCategory)
SCR_SelectionMenuEntry AddRadialMenuElement (SCR_PlayerCommandingMenuBaseElement newElement, SCR_SelectionMenuCategoryEntry parentCategory=null)
SCR_SelectionMenuEntry AddCategoryElement (SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry parentCategory=null)
SCR_SelectionMenuEntry AddCommandElement (SCR_PlayerCommandingMenuCommand command, SCR_SelectionMenuCategoryEntry parentCategory=null)
void OnPlayerRadialMenuBeforeOpen ()
void OnPlayerRadialMenuOpen ()
void OnPlayerRadialMenuClose ()
void OnQuickslotBind4 ()
void OnQuickslotBind5 ()
void OnQuickslotBind6 ()
void OnQuickslotBind7 ()
void OnQuickslotBind8 ()
void OnQuickslotBind9 ()
void BindToQuickslot (int slotIndex)
bool IsOpened ()
bool IsCommandSelected ()
void SetShownCommand (SCR_InfoDisplayExtended infoDisplay)
void SetShownCommandPreview (SCR_InfoDisplayExtended infoDisplay)
void DrawWaypointVisualization (vector targetPosition, float wpRadius, bool deletePrevious=true)

Variables

ResourceName m_sCommandingMapMenuConfigPath
ref SCR_RadialMenuController m_RadialMenuController
SCR_RadialMenu m_RadialMenu
ref SCR_PlayerCommandingMenuConfig m_CommandingMapMenuConfig
ref SCR_PlayerCommandingMenuConfig m_CommandingMenuConfig
ref SCR_PlayerCommandingMenuActionsSetup m_CommandingMenuPairsConfig
IEntity m_SelectedEntity
SCR_CommandingManagerComponent m_CommandingManager
SCR_MapRadialUI m_MapContextualMenu
SCR_InfoDisplayExtended m_CurrentShownCommand
SCR_InfoDisplayExtended m_CurrentShownCommandPreview
string m_sExecutedCommandName
ref array< ref Shapem_aShapes = {}
bool m_bIsCommandExecuting = false
bool m_bSlaveGroupRequested = false
bool m_bIsCommandSelected
ref SCR_PhysicsHelper m_PhysicsHelper
string m_sSelectedCommandEntry

Enumeration Type Documentation

◆ SCR_ECommandVisualizationDuration

Enumerator
BRIEF 

shows the command visualization only for few seconds

LONGLASTING 

shows the command visualization for as long as the command is active

PERMANENT 

shows the command visualization permanently, use for debug purposes

Definition at line 1054 of file SCR_PlayerControllerCommandingComponent.c.

Function Documentation

◆ AddCategoryElement()

SCR_SelectionMenuEntry AddCategoryElement ( SCR_PlayerCommandingMenuCategoryElement category,
SCR_SelectionMenuCategoryEntry parentCategory = null )
protected
Parameters
[in]categorycannot be null
[in]parentCategory
Returns

Definition at line 836 of file SCR_PlayerControllerCommandingComponent.c.

◆ AddCommandElement()

SCR_SelectionMenuEntry AddCommandElement ( SCR_PlayerCommandingMenuCommand command,
SCR_SelectionMenuCategoryEntry parentCategory = null )
protected
Parameters
[in]commandcannot be null
[in]parentCategory
Returns

Definition at line 870 of file SCR_PlayerControllerCommandingComponent.c.

◆ AddElementsFromCategory()

bool AddElementsFromCategory ( SCR_PlayerCommandingMenuCategoryElement category,
SCR_SelectionMenuCategoryEntry rootCategory = null )
protected
Parameters
[in]categorycannot be null
[in]rootCategory
Returns
true if this element is meant to be visible, otherwise false

Definition at line 696 of file SCR_PlayerControllerCommandingComponent.c.

◆ AddElementsFromCategoryToMap()

bool AddElementsFromCategoryToMap ( notnull SCR_PlayerCommandingMenuCategoryElement category,
SCR_SelectionMenuCategoryEntry parentCategory = null )
protected
Parameters
[in]categorycannot be null
[in]parentCategory

Definition at line 738 of file SCR_PlayerControllerCommandingComponent.c.

◆ AddRadialMenuElement()

SCR_SelectionMenuEntry AddRadialMenuElement ( SCR_PlayerCommandingMenuBaseElement newElement,
SCR_SelectionMenuCategoryEntry parentCategory = null )
protected
Parameters
[in]newElement
[in]parentCategory
Returns

Definition at line 818 of file SCR_PlayerControllerCommandingComponent.c.

◆ Attribute()

SCR_PlayerControllerCommandingComponentClass ScriptComponentClass Attribute ( desc:"Config of pairs of actions and commanding menu configs to decide which action opens which menu" )

Definition at line 1 of file SCR_PlayerControllerCommandingComponent.c.

◆ BindToQuickslot()

void BindToQuickslot ( int slotIndex)
protected

Definition at line 983 of file SCR_PlayerControllerCommandingComponent.c.

◆ CommandExecutedCallback()

void CommandExecutedCallback ( int commandIndex)
protected
Parameters
[in]commandIndex

Definition at line 620 of file SCR_PlayerControllerCommandingComponent.c.

◆ DeleteShownCommand()

void DeleteShownCommand ( )
protected

If a command is currently being displayed, hide/delete it.

Definition at line 343 of file SCR_PlayerControllerCommandingComponent.c.

◆ DrawWaypointVisualization()

void DrawWaypointVisualization ( vector targetPosition,
float wpRadius,
bool deletePrevious = true )
protected

Definition at line 1044 of file SCR_PlayerControllerCommandingComponent.c.

◆ ExecuteCommand()

void ExecuteCommand ( vector targetPosition,
IEntity tracedEntity )
protected
Parameters
[in]targetPosition
[in]tracedEntity

Definition at line 533 of file SCR_PlayerControllerCommandingComponent.c.

◆ GetWorldToScreenPosition()

bool GetWorldToScreenPosition ( BaseWorld world,
vector worldPosition,
out float posX,
out float posY,
int cameraIndex = -1 )
protected

Recalculates worldPosition to screen space.

Parameters
[in]world
[in]worldPosition
[out]posXX Position on the screen
[out]posYY Position on the screen
[in]intCamera thats being used

Definition at line 412 of file SCR_PlayerControllerCommandingComponent.c.

◆ HideCommandPreview()

void HideCommandPreview ( )
protected

Hide command preview.

Definition at line 358 of file SCR_PlayerControllerCommandingComponent.c.

◆ InsertElementToMapRadial()

Parameters
[in]elementcannot be null
[in]category
[in]mapCategory

Definition at line 782 of file SCR_PlayerControllerCommandingComponent.c.

◆ IsCommandSelected()

bool IsCommandSelected ( )
protected

Definition at line 1025 of file SCR_PlayerControllerCommandingComponent.c.

◆ IsOpened()

bool IsOpened ( )
protected

Definition at line 1016 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnControllerLostControl()

void OnControllerLostControl ( SCR_RadialMenuController controller,
bool hasControl )
protected

Definition at line 175 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnControllerTakeControl()

void OnControllerTakeControl ( SCR_RadialMenuController controller)
protected

Definition at line 163 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnGroupChanged()

void OnGroupChanged ( int groupID)
protected
Parameters
[in]groupID

Definition at line 323 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnGroupLeaderChanged()

void OnGroupLeaderChanged ( int groupID,
int playerID )
protected
Parameters
[in]groupID
[in]playerID

Definition at line 308 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnMapClose()

void OnMapClose ( MapConfiguration config)
protected
Parameters
[in]config

Definition at line 256 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnMapCommandPerformed()

void OnMapCommandPerformed ( SCR_SelectionMenuEntry element,
float[] worldPos )
protected
Parameters
[in]element
[in]worldPos

Definition at line 289 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnMapOpen()

void OnMapOpen ( MapConfiguration config)
protected
Parameters
[in]config

Definition at line 244 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnPlayerRadialMenuBeforeOpen()

void OnPlayerRadialMenuBeforeOpen ( )
protected

Definition at line 919 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnPlayerRadialMenuClose()

void OnPlayerRadialMenuClose ( )
protected

Definition at line 955 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnPlayerRadialMenuOpen()

void OnPlayerRadialMenuOpen ( )
protected

Definition at line 948 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnQuickslotBind4()

void OnQuickslotBind4 ( )
protected

Definition at line 974 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnQuickslotBind5()

void OnQuickslotBind5 ( )
protected

Definition at line 975 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnQuickslotBind6()

void OnQuickslotBind6 ( )
protected

Definition at line 976 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnQuickslotBind7()

void OnQuickslotBind7 ( )
protected

Definition at line 977 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnQuickslotBind8()

void OnQuickslotBind8 ( )
protected

Definition at line 978 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnQuickslotBind9()

void OnQuickslotBind9 ( )
protected

Definition at line 979 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnRadialMenuOpenFailed()

void OnRadialMenuOpenFailed ( SCR_SelectionMenu menu,
SCR_ESelectionMenuFailReason reason )
protected

Definition at line 489 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnRadialMenuPerformed()

void OnRadialMenuPerformed ( SCR_SelectionMenu menu,
SCR_SelectionMenuEntry entry )
protected
Parameters
[in]menu
[in]entry

Definition at line 477 of file SCR_PlayerControllerCommandingComponent.c.

◆ OnRadialMenuSelected()

void OnRadialMenuSelected ( SCR_SelectionMenu menu,
SCR_SelectionMenuEntry entry )
protected
Parameters
[in]menu
[in]entry

Definition at line 458 of file SCR_PlayerControllerCommandingComponent.c.

◆ OpenCommandingMenu()

void OpenCommandingMenu ( )
protected

Definition at line 130 of file SCR_PlayerControllerCommandingComponent.c.

◆ PhysicsCommandTrace()

void PhysicsCommandTrace ( float range = COMMANDING_VISUAL_RANGE)
protected

Perform a TraceSegmented starting from Camera position in camera look direction with givin lengh

Parameters
[in]float,rangein meters

Definition at line 424 of file SCR_PlayerControllerCommandingComponent.c.

◆ PlayCommandGesture()

void PlayCommandGesture ( int commandIndex)
protected
Parameters
[in]commandIndex

Definition at line 637 of file SCR_PlayerControllerCommandingComponent.c.

◆ PrepareExecuteCommand()

void PrepareExecuteCommand ( string commandName,
vector targetPosition = "0 0 0" )
protected
Parameters
[in]commandName

Definition at line 503 of file SCR_PlayerControllerCommandingComponent.c.

◆ RemoveListenersFromRadial()

void RemoveListenersFromRadial ( )
protected

Definition at line 225 of file SCR_PlayerControllerCommandingComponent.c.

◆ RemoveMapListener()

void RemoveMapListener ( )
protected

Definition at line 194 of file SCR_PlayerControllerCommandingComponent.c.

◆ RPC_CommandExecutedCallback()

void RPC_CommandExecutedCallback ( int commandIndex)
protected
Parameters
[in]commandIndex

Definition at line 629 of file SCR_PlayerControllerCommandingComponent.c.

◆ RPC_RequestExecuteCommand()

void RPC_RequestExecuteCommand ( int commandIndex,
RplId cursorTargetID,
RplId groupRplID,
vector targetPoisition,
int playerID )
protected
Parameters
[in]commandIndex
[in]cursorTargetID
[in]groupRplID
[in]targetPoisition
[in]playerID

Definition at line 606 of file SCR_PlayerControllerCommandingComponent.c.

◆ SetShownCommand()

void SetShownCommand ( SCR_InfoDisplayExtended infoDisplay)
protected

Definition at line 1031 of file SCR_PlayerControllerCommandingComponent.c.

◆ SetShownCommandPreview()

void SetShownCommandPreview ( SCR_InfoDisplayExtended infoDisplay)
protected

Definition at line 1037 of file SCR_PlayerControllerCommandingComponent.c.

◆ SetupMapListener()

void SetupMapListener ( )
protected

Definition at line 183 of file SCR_PlayerControllerCommandingComponent.c.

◆ SetupMapRadialMenu()

void SetupMapRadialMenu ( )
protected

Definition at line 267 of file SCR_PlayerControllerCommandingComponent.c.

◆ SetupPlayerRadialMenu()

void SetupPlayerRadialMenu ( )
protected

Definition at line 205 of file SCR_PlayerControllerCommandingComponent.c.

◆ ShowCommandPreview()

void ShowCommandPreview ( string commandName)
protected

Prepare the command to be shown

Parameters
[in]commandname

Definition at line 376 of file SCR_PlayerControllerCommandingComponent.c.

◆ UpdateRadialMenu()

void UpdateRadialMenu ( IEntity owner,
bool isOpen )
protected
Parameters
[in]owner
[in]isOpen

Definition at line 673 of file SCR_PlayerControllerCommandingComponent.c.

Variable Documentation

◆ m_aShapes

ref array<ref Shape> m_aShapes = {}
protected

Definition at line 32 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_bIsCommandExecuting

bool m_bIsCommandExecuting = false
protected

Definition at line 34 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_bIsCommandSelected

bool m_bIsCommandSelected
protected

Definition at line 36 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_bSlaveGroupRequested

bool m_bSlaveGroupRequested = false
protected

Definition at line 35 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_CommandingManager

SCR_CommandingManagerComponent m_CommandingManager
protected

Definition at line 25 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_CommandingMapMenuConfig

ref SCR_PlayerCommandingMenuConfig m_CommandingMapMenuConfig
protected

Definition at line 19 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_CommandingMenuConfig

ref SCR_PlayerCommandingMenuConfig m_CommandingMenuConfig
protected

Definition at line 20 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_CommandingMenuPairsConfig

ref SCR_PlayerCommandingMenuActionsSetup m_CommandingMenuPairsConfig
protected

Definition at line 21 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_CurrentShownCommand

SCR_InfoDisplayExtended m_CurrentShownCommand
protected

Definition at line 27 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_CurrentShownCommandPreview

SCR_InfoDisplayExtended m_CurrentShownCommandPreview
protected

Definition at line 28 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_MapContextualMenu

SCR_MapRadialUI m_MapContextualMenu
protected

Definition at line 26 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_PhysicsHelper

ref SCR_PhysicsHelper m_PhysicsHelper
protected

Definition at line 37 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_RadialMenu

SCR_RadialMenu m_RadialMenu
protected

Definition at line 17 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_RadialMenuController

ref SCR_RadialMenuController m_RadialMenuController
protected

Definition at line 15 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_sCommandingMapMenuConfigPath

ResourceName m_sCommandingMapMenuConfigPath
protected

Definition at line 12 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_SelectedEntity

IEntity m_SelectedEntity
protected

Definition at line 23 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_sExecutedCommandName

string m_sExecutedCommandName
protected

Definition at line 30 of file SCR_PlayerControllerCommandingComponent.c.

◆ m_sSelectedCommandEntry

string m_sSelectedCommandEntry
protected

Definition at line 39 of file SCR_PlayerControllerCommandingComponent.c.