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

Public Member Functions

void OnWeaponChanged (BaseWeaponComponent weapon, BaseWeaponComponent prevWeapon)
 
void OnMuzzleChanged_init (BaseWeaponComponent weapon)
 
void OnMuzzleChanged (BaseWeaponComponent weapon, BaseMuzzleComponent muzzle, BaseMuzzleComponent prevMuzzle)
 
void OnMagazineChanged_init (BaseWeaponComponent weapon, BaseMuzzleComponent muzzle)
 
void OnMagazineChanged (BaseWeaponComponent weapon, BaseMagazineComponent magazine, BaseMagazineComponent prevMagazine)
 
void OnMagazineCountChanged_init (BaseWeaponComponent weapon, BaseMagazineComponent magazine)
 
void OnMagazineCountChanged (BaseWeaponComponent weapon, int magazineCount, bool isGrenade)
 
void OnAmmoCountChanged_init (BaseWeaponComponent weapon, BaseMagazineComponent magazine)
 
void OnAmmoCountChanged (BaseWeaponComponent weapon, BaseMuzzleComponent muzzle, BaseMagazineComponent magazine, int ammoCount, bool isBarrelChambered)
 
void OnFiremodeChanged_init (BaseWeaponComponent weapon, BaseMuzzleComponent muzzle)
 
void OnFiremodeChanged (BaseWeaponComponent weapon, BaseMuzzleComponent muzzle, BaseFireMode firemode)
 
void OnZeroingChanged_init (BaseWeaponComponent weapon)
 
void OnZeroingChanged (BaseWeaponComponent weapon, int zeroing)
 
void OnADSChanged_init (BaseWeaponComponent weapon)
 
void OnADSChanged (BaseWeaponComponent weapon, bool inADS)
 
void OnZoomChanged_init (BaseWeaponComponent weapon)
 
void OnZoomChanged (float zoom, float fov)
 
void OnInspectionModeChanged (bool state)
 
void OnAttachmentChanged (WeaponComponent weapon, bool isAttached, IEntity attachmentEntity)
 
override void DisplayUpdate (IEntity owner, float timeSlice)
 
void FadeElements ()
 
SCR_2DSightsComponent GetSights ()
 
SCR_MagazineIndicatorConfiguration GetMagazineConfig (SCR_WeaponState state)
 
void UpdateFireModeIndicator (SCR_WeaponState state)
 
void UpdateZeroingIndicator (SCR_WeaponState state)
 
void UpdateZoomIndicator (SCR_WeaponState state)
 
void UpdateAmmoTypeIndicator (SCR_WeaponState state)
 
void AnimateWidget_ColorFlash (Widget w, EWeaponFeature requiredFlag=-1, float speed=UIConstants.FADE_RATE_SLOW)
 
void AnimateWidget_TextPopUp (Widget w, float size, float sizeBoosted, EWeaponFeature requiredFlag=-1, float speed=UIConstants.FADE_RATE_SLOW)
 
override bool DisplayStartDrawInit (IEntity owner)
 
override void DisplayStartDraw (IEntity owner)
 
override void DisplayStopDraw (IEntity owner)
 
void AddEventHandlers (IEntity owner)
 
void RemoveEventHandlers (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)
 

Public Attributes

ref SCR_WeaponInfoWidgets m_Widgets
 
ref SCR_MagazinePredicate m_pMagazineSearchPredicate = new SCR_MagazinePredicate()
 
ref SCR_PrefabDataPredicate m_pPrefabDataPredicate = new SCR_PrefabDataPredicate()
 
- Public Attributes inherited from SCR_InfoDisplay
ResourceName m_LayoutPath
 
EHudLayers m_eLayer
 
int m_iOverrideZOrder
 

Static Public Attributes

const int SIZE_FIREMODE = 50
 
const int SIZE_MAGAZINE = 77
 
const float UPDATE_INTERVAL = 0.1
 
const float FADED_OPACITY = 0.3
 
static const ref Color COLOR_WHITE = Color.FromSRGBA(255, 255, 255, 255)
 
static const ref Color COLOR_ORANGE = Color.FromSRGBA(226, 167, 79, 255)
 

Protected Member Functions

void UpdateMagazineIndicator_Textures (SCR_WeaponState state)
 
void UpdateMagazineIndicator_Progress (SCR_WeaponState state)
 
void UpdateMagazineIndicator_Count (SCR_WeaponState state)
 
void UpdateBulletInChamberIndicator (SCR_WeaponState state)
 
void UpdateWeaponNameAndCaliber (SCR_WeaponState state)
 
BaseWeaponManagerComponent GetWeaponManager (IEntity owner)
 
void SetWidgetImage (ImageWidget w, string imageOrImageset, string imageName="", int size=-1)
 Sets widget's image to an image or imageset.
 
- 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)
 

Static Protected Member Functions

static InventoryStorageManagerComponent GetInventoryManager ()
 Returns player's inventory manager, or vehicle's inv manager if player is in vehicle.
 

Protected Attributes

BaseWeaponManagerComponent m_WeaponManager
 
SCR_InventoryStorageManagerComponent m_InventoryManager
 
CompartmentAccessComponent m_CompartmentAccess
 
ref SCR_WeaponState m_WeaponState
 
EWeaponFeature m_eWeaponStateEvent = EWeaponFeature.NONE
 
ref SCR_FadeInOutAnimator m_WeaponInfoPanelAnimator
 
ref SCR_FadeInOutAnimator m_ZeroingAnimator
 
bool m_bFadeInOutActive = false
 
- 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

const float FADEOUT_PANEL_DELAY = 6
 
const float FADEOUT_OPTICS_DELAY = 6
 
const float FADEOUT_AMMO_TYPE_DELAY = 6
 
const ResourceName DEFAULT_WEAPON_INFO_LAYOUT = "{8170DE93810F928A}UI/layouts/HUD/WeaponInfo/WeaponInfo.layout"
 
const ResourceName DEFAULT_MAGAZINE_INDICATOR = "{7C114BA7C59E198D}Configs/WeaponInfo/MagazineIndicators/box.conf"
 

Member Function Documentation

◆ AddEventHandlers()

void SCR_WeaponInfo.AddEventHandlers ( IEntity  owner)

Implemented in SCR_WeaponInfoVehicle.

◆ AnimateWidget_ColorFlash()

void SCR_WeaponInfo.AnimateWidget_ColorFlash ( Widget  w,
EWeaponFeature  requiredFlag = -1,
float  speed = UIConstants::FADE_RATE_SLOW 
)

◆ AnimateWidget_TextPopUp()

void SCR_WeaponInfo.AnimateWidget_TextPopUp ( Widget  w,
float  size,
float  sizeBoosted,
EWeaponFeature  requiredFlag = -1,
float  speed = UIConstants::FADE_RATE_SLOW 
)

◆ DisplayStartDraw()

override void SCR_WeaponInfo.DisplayStartDraw ( IEntity  owner)

◆ DisplayStartDrawInit()

override bool SCR_WeaponInfo.DisplayStartDrawInit ( IEntity  owner)

Implements SCR_InfoDisplayExtended.

Implemented in SCR_WeaponInfoVehicle.

◆ DisplayStopDraw()

override void SCR_WeaponInfo.DisplayStopDraw ( IEntity  owner)

◆ DisplayUpdate()

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

Implements SCR_InfoDisplayExtended.

Implemented in SCR_WeaponInfoVehicle.

◆ FadeElements()

void SCR_WeaponInfo.FadeElements ( )

◆ GetInventoryManager()

static InventoryStorageManagerComponent SCR_WeaponInfo.GetInventoryManager ( )
staticprotected

Returns player's inventory manager, or vehicle's inv manager if player is in vehicle.

◆ GetMagazineConfig()

SCR_MagazineIndicatorConfiguration SCR_WeaponInfo.GetMagazineConfig ( SCR_WeaponState  state)

◆ GetSights()

SCR_2DSightsComponent SCR_WeaponInfo.GetSights ( )

Implemented in SCR_WeaponInfoVehicle.

◆ GetWeaponManager()

BaseWeaponManagerComponent SCR_WeaponInfo.GetWeaponManager ( IEntity  owner)
protected

◆ OnADSChanged()

void SCR_WeaponInfo.OnADSChanged ( BaseWeaponComponent  weapon,
bool  inADS 
)

◆ OnADSChanged_init()

void SCR_WeaponInfo.OnADSChanged_init ( BaseWeaponComponent  weapon)

◆ OnAmmoCountChanged()

void SCR_WeaponInfo.OnAmmoCountChanged ( BaseWeaponComponent  weapon,
BaseMuzzleComponent  muzzle,
BaseMagazineComponent  magazine,
int  ammoCount,
bool  isBarrelChambered 
)

◆ OnAmmoCountChanged_init()

void SCR_WeaponInfo.OnAmmoCountChanged_init ( BaseWeaponComponent  weapon,
BaseMagazineComponent  magazine 
)

◆ OnAttachmentChanged()

void SCR_WeaponInfo.OnAttachmentChanged ( WeaponComponent  weapon,
bool  isAttached,
IEntity  attachmentEntity 
)

◆ OnFiremodeChanged()

void SCR_WeaponInfo.OnFiremodeChanged ( BaseWeaponComponent  weapon,
BaseMuzzleComponent  muzzle,
BaseFireMode  firemode 
)

◆ OnFiremodeChanged_init()

void SCR_WeaponInfo.OnFiremodeChanged_init ( BaseWeaponComponent  weapon,
BaseMuzzleComponent  muzzle 
)

◆ OnInspectionModeChanged()

void SCR_WeaponInfo.OnInspectionModeChanged ( bool  state)

◆ OnMagazineChanged()

void SCR_WeaponInfo.OnMagazineChanged ( BaseWeaponComponent  weapon,
BaseMagazineComponent  magazine,
BaseMagazineComponent  prevMagazine 
)

◆ OnMagazineChanged_init()

void SCR_WeaponInfo.OnMagazineChanged_init ( BaseWeaponComponent  weapon,
BaseMuzzleComponent  muzzle 
)

◆ OnMagazineCountChanged()

void SCR_WeaponInfo.OnMagazineCountChanged ( BaseWeaponComponent  weapon,
int  magazineCount,
bool  isGrenade 
)

◆ OnMagazineCountChanged_init()

void SCR_WeaponInfo.OnMagazineCountChanged_init ( BaseWeaponComponent  weapon,
BaseMagazineComponent  magazine 
)

◆ OnMuzzleChanged()

void SCR_WeaponInfo.OnMuzzleChanged ( BaseWeaponComponent  weapon,
BaseMuzzleComponent  muzzle,
BaseMuzzleComponent  prevMuzzle 
)

Implemented in SCR_WeaponInfoVehicle.

◆ OnMuzzleChanged_init()

void SCR_WeaponInfo.OnMuzzleChanged_init ( BaseWeaponComponent  weapon)

◆ OnWeaponChanged()

void SCR_WeaponInfo.OnWeaponChanged ( BaseWeaponComponent  weapon,
BaseWeaponComponent  prevWeapon 
)

◆ OnZeroingChanged()

void SCR_WeaponInfo.OnZeroingChanged ( BaseWeaponComponent  weapon,
int  zeroing 
)

◆ OnZeroingChanged_init()

void SCR_WeaponInfo.OnZeroingChanged_init ( BaseWeaponComponent  weapon)

◆ OnZoomChanged()

void SCR_WeaponInfo.OnZoomChanged ( float  zoom,
float  fov 
)

◆ OnZoomChanged_init()

void SCR_WeaponInfo.OnZoomChanged_init ( BaseWeaponComponent  weapon)

◆ RemoveEventHandlers()

void SCR_WeaponInfo.RemoveEventHandlers ( IEntity  owner)

Implemented in SCR_WeaponInfoVehicle.

◆ SetWidgetImage()

void SCR_WeaponInfo.SetWidgetImage ( ImageWidget  w,
string  imageOrImageset,
string  imageName = "",
int  size = -1 
)
protected

Sets widget's image to an image or imageset.

◆ UpdateAmmoTypeIndicator()

void SCR_WeaponInfo.UpdateAmmoTypeIndicator ( SCR_WeaponState  state)

◆ UpdateBulletInChamberIndicator()

void SCR_WeaponInfo.UpdateBulletInChamberIndicator ( SCR_WeaponState  state)
protected

◆ UpdateFireModeIndicator()

void SCR_WeaponInfo.UpdateFireModeIndicator ( SCR_WeaponState  state)

◆ UpdateMagazineIndicator_Count()

void SCR_WeaponInfo.UpdateMagazineIndicator_Count ( SCR_WeaponState  state)
protected

◆ UpdateMagazineIndicator_Progress()

void SCR_WeaponInfo.UpdateMagazineIndicator_Progress ( SCR_WeaponState  state)
protected

◆ UpdateMagazineIndicator_Textures()

void SCR_WeaponInfo.UpdateMagazineIndicator_Textures ( SCR_WeaponState  state)
protected

◆ UpdateWeaponNameAndCaliber()

void SCR_WeaponInfo.UpdateWeaponNameAndCaliber ( SCR_WeaponState  state)
protected

◆ UpdateZeroingIndicator()

void SCR_WeaponInfo.UpdateZeroingIndicator ( SCR_WeaponState  state)

◆ UpdateZoomIndicator()

void SCR_WeaponInfo.UpdateZoomIndicator ( SCR_WeaponState  state)

Member Data Documentation

◆ COLOR_ORANGE

const ref Color SCR_WeaponInfo.COLOR_ORANGE = Color.FromSRGBA(226, 167, 79, 255)
static

◆ COLOR_WHITE

const ref Color SCR_WeaponInfo.COLOR_WHITE = Color.FromSRGBA(255, 255, 255, 255)
static

◆ DEFAULT_MAGAZINE_INDICATOR

const ResourceName SCR_WeaponInfo.DEFAULT_MAGAZINE_INDICATOR = "{7C114BA7C59E198D}Configs/WeaponInfo/MagazineIndicators/box.conf"
staticprotected

◆ DEFAULT_WEAPON_INFO_LAYOUT

const ResourceName SCR_WeaponInfo.DEFAULT_WEAPON_INFO_LAYOUT = "{8170DE93810F928A}UI/layouts/HUD/WeaponInfo/WeaponInfo.layout"
staticprotected

◆ FADED_OPACITY

const float SCR_WeaponInfo.FADED_OPACITY = 0.3
static

◆ FADEOUT_AMMO_TYPE_DELAY

const float SCR_WeaponInfo.FADEOUT_AMMO_TYPE_DELAY = 6
staticprotected

◆ FADEOUT_OPTICS_DELAY

const float SCR_WeaponInfo.FADEOUT_OPTICS_DELAY = 6
staticprotected

◆ FADEOUT_PANEL_DELAY

const float SCR_WeaponInfo.FADEOUT_PANEL_DELAY = 6
staticprotected

◆ m_bFadeInOutActive

bool SCR_WeaponInfo.m_bFadeInOutActive = false
protected

◆ m_CompartmentAccess

CompartmentAccessComponent SCR_WeaponInfo.m_CompartmentAccess
protected

◆ m_eWeaponStateEvent

EWeaponFeature SCR_WeaponInfo.m_eWeaponStateEvent = EWeaponFeature.NONE
protected

◆ m_InventoryManager

SCR_InventoryStorageManagerComponent SCR_WeaponInfo.m_InventoryManager
protected

◆ m_pMagazineSearchPredicate

ref SCR_MagazinePredicate SCR_WeaponInfo.m_pMagazineSearchPredicate = new SCR_MagazinePredicate()

◆ m_pPrefabDataPredicate

ref SCR_PrefabDataPredicate SCR_WeaponInfo.m_pPrefabDataPredicate = new SCR_PrefabDataPredicate()

◆ m_WeaponInfoPanelAnimator

ref SCR_FadeInOutAnimator SCR_WeaponInfo.m_WeaponInfoPanelAnimator
protected

◆ m_WeaponManager

BaseWeaponManagerComponent SCR_WeaponInfo.m_WeaponManager
protected

◆ m_WeaponState

ref SCR_WeaponState SCR_WeaponInfo.m_WeaponState
protected

◆ m_Widgets

ref SCR_WeaponInfoWidgets SCR_WeaponInfo.m_Widgets

◆ m_ZeroingAnimator

ref SCR_FadeInOutAnimator SCR_WeaponInfo.m_ZeroingAnimator
protected

◆ SIZE_FIREMODE

const int SCR_WeaponInfo.SIZE_FIREMODE = 50
static

◆ SIZE_MAGAZINE

const int SCR_WeaponInfo.SIZE_MAGAZINE = 77
static

◆ UPDATE_INTERVAL

const float SCR_WeaponInfo.UPDATE_INTERVAL = 0.1
static

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