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

Nametag UI Attached to SCR_HUDManagerComponent which is a component of SCR_PlayerController. More...

Inheritance diagram for SCR_NameTagDisplay:
[legend]

Public Member Functions

SCR_NameTagData GetEntityNameTag (IEntity ent)
 Retrieve nametag from entity map.
 
void OnNewVehicleOccupant (IEntity vehicle, SCR_NameTagData occupant)
 
void OnLeaveVehicleOccupant (IEntity vehicle, SCR_NameTagData occupant)
 
void UpdateTagElements (SCR_NameTagData data)
 Update all elements of the requested tag.
 
void CleanupTag (notnull SCR_NameTagData data, bool removeFromArray=true)
 Unregister events and move to unitialized tag pool.
 
void CleanupAllTags ()
 Unregister events of all tags and move to unitialized tag pool.
 
void StopUpdate ()
 Stop updating nametags.
 
override void DisplayUpdate (IEntity owner, float timeSlice)
 
override bool DisplayStartDrawInit (IEntity owner)
 
override void DisplayStartDraw (IEntity owner)
 
override void DisplayControlledEntityChanged (IEntity from, IEntity to)
 Reinit curent player tag after new entity is controlled.
 
override void DisplayStopDraw (IEntity owner)
 
- Public Member Functions inherited from SCR_InfoDisplayExtended
void SetEnabled (bool isEnabled)
 
override void Show (bool show, float speed=UIConstants.FADE_RATE_INSTANT, EAnimationCurve curve=EAnimationCurve.LINEAR)
 Show/hide InfoDisplay properly, not breaking other systems like AdaptiveOpacity or ConditionalVisibility.
 
- Public Member Functions inherited from SCR_InfoDisplay
SCR_InfoDisplayHandler GetHandler (TypeName handlerType)
 
SCR_InfoDisplayInvoker GetOnStart ()
 
SCR_InfoDisplayInvoker GetOnStop ()
 
IEntity GetOwnerEntity ()
 
Widget GetContentWidget ()
 
string GetContentWidgetName ()
 
void SetRootWidget (notnull Widget root)
 
void SetContentWidget (notnull Widget content)
 
void Show (bool show, float speed=UIConstants.FADE_RATE_INSTANT, EAnimationCurve curve=EAnimationCurve.LINEAR)
 Show/hide InfoDisplay properly, not breaking other systems like AdaptiveOpacity or ConditionalVisibility.
 
bool IsShown ()
 
Widget GetRootWidget ()
 
bool GetDimensions (out float width, out float height, bool addSafezones=true)
 Get width and height of the InfoDisplay element, optionally with safezones adjustments.
 
bool GetAnchorPosition (out float x, out float y, EWidgetAnchor anchor=EWidgetAnchor.TOPLEFT, bool addSafezones=true)
 Get width and height of the InfoDisplay element, optionally with safezones adjustments.
 
void RegisterToHudManager ()
 
- Public Member Functions inherited from GroupInfoDisplay
proto external int GetInfoDisplays (out notnull array< BaseInfoDisplay > outInfoDisplays)
 
- Public Member Functions inherited from BaseInfoDisplay
proto external GenericComponent FindComponentInParentContainer (TypeName typeName)
 

Static Public Member Functions

static array< ref SCR_NameTagZoneGetNametagZones ()
 Get zone array from assigned zone config.
 

Public Attributes

ref SCR_NameTagData m_CurrentPlayerTag
 
- Public Attributes inherited from SCR_InfoDisplay
ResourceName m_LayoutPath
 
EHudLayers m_eLayer
 
int m_iOverrideZOrder
 

Static Public Attributes

const int PREPARED_WIDGETS = 10
 
const int PREPARED_VEH_WIDGETS = 3
 

Protected Member Functions

void OnControllableDestroyed (IEntity entity, IEntity killerEntity, notnull Instigator killer)
 SCR_GameModeBase event.
 
void OnControllableDeleted (IEntity entity)
 SCR_GameModeBase event.
 
void OnGroupJoined (SCR_AIGroup group, int playerID)
 
void OnGroupLeft (SCR_AIGroup group, int playerID)
 
void Update (float timeSlice)
 Decide which entities should have their nametags drawn.
 
bool IsFactionFriendly (IEntity entity)
 Check if entity is faction friendly to current players faction.
 
void AdjustRange (bool adjust, float FOVZoomed)
 Adjust zone range based on zoom.
 
void InitNameTags ()
 Basic initialization of invokers.
 
void ProcessFiltered ()
 Process newly gathered entities.
 
void InitializeTag (IEntity entity, bool friendlyOnly=true)
 Initialize name tag contex instance.
 
void CreateTagWidget (ENameTagEntityType type=0)
 Create widget for nametag.
 
void CleanupDisplay (bool destroyWidgets)
 Clear all tags and their widgets.
 
void UpdateDebug ()
 Debug.
 
- Protected Member Functions inherited from SCR_InfoDisplayExtended
bool DisplayStartDrawInit (IEntity owner)
 
void DisplayStartDraw (IEntity owner)
 
void DisplayStopDraw (IEntity owner)
 
void DisplayInit (IEntity owner)
 
void DisplayUpdate (IEntity owner, float timeSlice)
 
void DisplayControlledEntityChanged (IEntity from, IEntity to)
 
void DisplayConsciousnessChanged (bool conscious, bool init=false)
 
void DisplayOnSuspended ()
 Called when GUI is temporarily suspended due to visibility flags; e.g. GM entered and GUI marked as not to show in GM.
 
void DisplayOnResumed ()
 
void InitializeInterfaceSettings ()
 
void OnSettingsChanged ()
 
- Protected Member Functions inherited from SCR_InfoDisplay
void OnShownFinished (Widget w, float targetOpacity, WidgetAnimationOpacity anim=null)
 
override void OnStartDraw (IEntity owner)
 
void AdaptiveOpacity_Update (float opacity, float sceneBrightness, bool init=false)
 
override void OnStopDraw (IEntity owner)
 
override void UpdateValues (IEntity owner, float timeSlice)
 
override void OnInit (IEntity owner)
 
void OnInit (IEntity owner)
 
void UpdateValues (IEntity owner, float timeSlice)
 
void OnStartDraw (IEntity owner)
 
void OnStopDraw (IEntity owner)
 

Protected Attributes

ref array< IEntity > m_aFilteredEntities = new array<IEntity>()
 
ref array< ref SCR_NameTagDatam_aUninitializedTags = {}
 
ref array< ref SCR_VehicleTagDatam_aUninitializedVehTags = {}
 
ref array< ref SCR_NameTagDatam_aNameTags = {}
 
ref map< IEntity, ref SCR_NameTagDatam_aNameTagEntities = new map<IEntity, ref SCR_NameTagData>()
 
bool m_bIsRulesetInit = false
 
bool m_bSleepDisplay = false
 
int m_iCurrentPlayerID
 
Faction m_CurrentFaction
 
PlayerManager m_PlayerManager
 
- Protected Attributes inherited from SCR_InfoDisplayExtended
bool m_bIsEnabled
 
string m_sInterfaceSettingName
 
SCR_PlayerController m_PlayerController
 
SCR_CharacterControllerComponent m_CharacterController
 
SCR_CharacterCameraHandlerComponent m_CameraHandler
 
MenuManager m_MenuManager
 
EventHandlerManagerComponent m_EventHandlerManager
 
SCR_EditorManagerEntity m_EditorManager
 
bool m_bAttachedToPlayerController
 
bool m_bInThirdPerson
 
bool m_bInADS
 
bool m_bIsUnconscious
 
bool m_bInPauseMenu
 
bool m_bInEditor
 
bool m_bCanShow
 
bool m_bIsEnabledInSettings = true
 
bool m_bShowInAllCameras = true
 
- Protected Attributes inherited from SCR_InfoDisplay
string m_sParentSlot
 
string m_sContentWidget
 
int m_iContentWidthAdjustment
 
int m_iContentHeightAdjustment
 
string m_sAdaptiveOpacityWidgetName
 
ref array< ref SCR_InfoDisplayHandlerm_aHandlers
 
bool m_bShown
 
Widget m_wRoot
 
Widget m_wContent
 
Widget m_wSlot
 
SCR_HUDManagerComponent m_HUDManager
 
int m_iChildDisplays = 0
 
ref array< BaseInfoDisplaym_aChildDisplays = new array<BaseInfoDisplay>
 
SCR_InfoDisplay m_pParentDisplay
 
bool m_bRegistered = false
 
IEntity m_OwnerEntity
 
ref array< ref SCR_InfoDisplayHandlerm_aUpdatableHandlers = {}
 
ref SCR_InfoDisplayInvoker m_OnStart = new SCR_InfoDisplayInvoker()
 
ref SCR_InfoDisplayInvoker m_OnStop = new SCR_InfoDisplayInvoker()
 

Static Protected Attributes

static ref SCR_NameTagConfig s_NametagCfg
 

Detailed Description

Nametag UI Attached to SCR_HUDManagerComponent which is a component of SCR_PlayerController.

Member Function Documentation

◆ AdjustRange()

void SCR_NameTagDisplay.AdjustRange ( bool  adjust,
float  FOVZoomed 
)
protected

Adjust zone range based on zoom.

Parameters
adjustdetermines if we are adjusting the ranges or restorign them to default
FOVZoomedis the new FOV we are adjusting to

◆ CleanupAllTags()

void SCR_NameTagDisplay.CleanupAllTags ( )

Unregister events of all tags and move to unitialized tag pool.

◆ CleanupDisplay()

void SCR_NameTagDisplay.CleanupDisplay ( bool  destroyWidgets)
protected

Clear all tags and their widgets.

Parameters
destroyWidgetsdetermines whether the widgets are kept or destroyed

◆ CleanupTag()

void SCR_NameTagDisplay.CleanupTag ( notnull SCR_NameTagData  data,
bool  removeFromArray = true 
)

Unregister events and move to unitialized tag pool.

Parameters
datais the subject nametag
removeFromArraydetermines whether the tag is removed from main array, this is not desired when entrire array is being cleaned up

◆ CreateTagWidget()

void SCR_NameTagDisplay.CreateTagWidget ( ENameTagEntityType  type = 0)
protected

Create widget for nametag.

◆ DisplayControlledEntityChanged()

override void SCR_NameTagDisplay.DisplayControlledEntityChanged ( IEntity  from,
IEntity  to 
)

Reinit curent player tag after new entity is controlled.

Implements SCR_InfoDisplayExtended.

◆ DisplayStartDraw()

override void SCR_NameTagDisplay.DisplayStartDraw ( IEntity  owner)

◆ DisplayStartDrawInit()

override bool SCR_NameTagDisplay.DisplayStartDrawInit ( IEntity  owner)

◆ DisplayStopDraw()

override void SCR_NameTagDisplay.DisplayStopDraw ( IEntity  owner)

◆ DisplayUpdate()

override void SCR_NameTagDisplay.DisplayUpdate ( IEntity  owner,
float  timeSlice 
)

◆ GetEntityNameTag()

SCR_NameTagData SCR_NameTagDisplay.GetEntityNameTag ( IEntity  ent)

Retrieve nametag from entity map.

◆ GetNametagZones()

static array< ref SCR_NameTagZone > SCR_NameTagDisplay.GetNametagZones ( )
static

Get zone array from assigned zone config.

Returns
array of nametag zones

◆ InitializeTag()

void SCR_NameTagDisplay.InitializeTag ( IEntity  entity,
bool  friendlyOnly = true 
)
protected

Initialize name tag contex instance.

Parameters
entityis a character entity
friendlyOnlydetermines whether faction check is required for creation

◆ InitNameTags()

void SCR_NameTagDisplay.InitNameTags ( )
protected

Basic initialization of invokers.

◆ IsFactionFriendly()

bool SCR_NameTagDisplay.IsFactionFriendly ( IEntity  entity)
protected

Check if entity is faction friendly to current players faction.

Parameters
entityis a player entity
Returns
Returns true if checked entity is faction friendly

◆ OnControllableDeleted()

void SCR_NameTagDisplay.OnControllableDeleted ( IEntity  entity)
protected

SCR_GameModeBase event.

◆ OnControllableDestroyed()

void SCR_NameTagDisplay.OnControllableDestroyed ( IEntity  entity,
IEntity  killerEntity,
notnull Instigator  killer 
)
protected

SCR_GameModeBase event.

◆ OnGroupJoined()

void SCR_NameTagDisplay.OnGroupJoined ( SCR_AIGroup  group,
int  playerID 
)
protected

◆ OnGroupLeft()

void SCR_NameTagDisplay.OnGroupLeft ( SCR_AIGroup  group,
int  playerID 
)
protected

◆ OnLeaveVehicleOccupant()

void SCR_NameTagDisplay.OnLeaveVehicleOccupant ( IEntity  vehicle,
SCR_NameTagData  occupant 
)

◆ OnNewVehicleOccupant()

void SCR_NameTagDisplay.OnNewVehicleOccupant ( IEntity  vehicle,
SCR_NameTagData  occupant 
)

◆ ProcessFiltered()

void SCR_NameTagDisplay.ProcessFiltered ( )
protected

Process newly gathered entities.

◆ StopUpdate()

void SCR_NameTagDisplay.StopUpdate ( )

Stop updating nametags.

◆ Update()

void SCR_NameTagDisplay.Update ( float  timeSlice)
protected

Decide which entities should have their nametags drawn.

Parameters
timeSliceis the OnFrame timeslice

◆ UpdateDebug()

void SCR_NameTagDisplay.UpdateDebug ( )
protected

Debug.

◆ UpdateTagElements()

void SCR_NameTagDisplay.UpdateTagElements ( SCR_NameTagData  data)

Update all elements of the requested tag.

Parameters
datais nametag data struct

Member Data Documentation

◆ m_aFilteredEntities

ref array<IEntity> SCR_NameTagDisplay.m_aFilteredEntities = new array<IEntity>()
protected

◆ m_aNameTagEntities

ref map<IEntity, ref SCR_NameTagData> SCR_NameTagDisplay.m_aNameTagEntities = new map<IEntity, ref SCR_NameTagData>()
protected

◆ m_aNameTags

ref array<ref SCR_NameTagData> SCR_NameTagDisplay.m_aNameTags = {}
protected

◆ m_aUninitializedTags

ref array<ref SCR_NameTagData> SCR_NameTagDisplay.m_aUninitializedTags = {}
protected

◆ m_aUninitializedVehTags

ref array<ref SCR_VehicleTagData> SCR_NameTagDisplay.m_aUninitializedVehTags = {}
protected

◆ m_bIsRulesetInit

bool SCR_NameTagDisplay.m_bIsRulesetInit = false
protected

◆ m_bSleepDisplay

bool SCR_NameTagDisplay.m_bSleepDisplay = false
protected

◆ m_CurrentFaction

Faction SCR_NameTagDisplay.m_CurrentFaction
protected

◆ m_CurrentPlayerTag

ref SCR_NameTagData SCR_NameTagDisplay.m_CurrentPlayerTag

◆ m_iCurrentPlayerID

int SCR_NameTagDisplay.m_iCurrentPlayerID
protected

◆ m_PlayerManager

PlayerManager SCR_NameTagDisplay.m_PlayerManager
protected

◆ PREPARED_VEH_WIDGETS

const int SCR_NameTagDisplay.PREPARED_VEH_WIDGETS = 3
static

◆ PREPARED_WIDGETS

const int SCR_NameTagDisplay.PREPARED_WIDGETS = 10
static

◆ s_NametagCfg

ref SCR_NameTagConfig SCR_NameTagDisplay.s_NametagCfg
staticprotected

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