16class SCR_InfoDisplayExtended : SCR_InfoDisplay
18 [
Attribute(
"1", UIWidgets.CheckBox,
"Toggles ON/OFF info display.")]
21 [
Attribute(
"39", UIWidgets.Flags,
"Defines when the GUI element is allowed to show.",
"", ParamEnumArray.FromEnum(
EShowGUI) )]
24 [
Attribute(
"",
desc:
"If Display can be disabled in settings, define the correct variable defined in: 'SCR_InterfaceSettings'")]
48 #ifdef DEBUG_INFO_DISPLAY_EXT
50 void _printClass(
string str)
95 #ifdef DEBUG_INFO_DISPLAY_EXT
96 _printClass(
string.Format(
"%1 [DisplayOnSuspended]",
this));
105 #ifdef DEBUG_INFO_DISPLAY_EXT
106 _printClass(
string.Format(
"%1 [DisplayOnResumed]",
this));
117 if (!interfaceSettings)
134 if (!interfaceSettings)
152 #ifdef DEBUG_INFO_DISPLAY_EXT
153 _printClass(
string.Format(
"%1 [OnStartDraw] owner: %2",
this, owner));
202 SCR_EditorManagerCore core = SCR_EditorManagerCore.Cast(SCR_EditorManagerCore.GetInstance(SCR_EditorManagerCore));
203 core.Event_OnEditorManagerInitOwner.Insert(OnEditorInit);
207 OnEditorInit(editorManager);
211 if ((m_eShow &
EShowGUI.IN_PAUSE_MENU) == 0)
213 PauseMenuUI.m_OnPauseMenuOpened.Insert(OnPauseMenuOpen);
215 PauseMenuUI.m_OnPauseMenuClosed.Insert(OnPauseMenuClose);
231 super.OnStartDraw(owner);
258 #ifdef DEBUG_INFO_DISPLAY_EXT
259 _printClass(
string.Format(
"%1 [OnControlledEntityChanged] %2 -> %3",
this, from, to));
264 ChimeraCharacter character = ChimeraCharacter.Cast(from);
271 m_CameraHandler.GetThirdPersonSwitchInvoker().Remove(UpdateVisibility);
279 m_CameraHandler.GetThirdPersonSwitchInvoker().Insert(UpdateVisibility);
286 eventHandlerOwner = to;
290 if (eventHandlerOwner)
301 ChimeraCharacter character = ChimeraCharacter.Cast(to);
331 private void OnADSSwitched(BaseWeaponComponent weapon,
bool inADS)
333 #ifdef DEBUG_INFO_DISPLAY_EXT
334 _printClass(
string.Format(
"%1 [OnADSSwitched] inADS: %2",
this, inADS));
345 #ifdef DEBUG_INFO_DISPLAY_EXT
346 _printClass(
string.Format(
"%1 [OnLifeStateChanged] lifeState: %2",
this, SCR_Enum.GetEnumName(
ECharacterLifeState, newLifeState)));
357 private void OnPauseMenuOpen()
359 #ifdef DEBUG_INFO_DISPLAY_EXT
360 _printClass(
string.Format(
"%1 [OnPauseMenuOpen]",
this));
369 private void OnPauseMenuClose()
371 #ifdef DEBUG_INFO_DISPLAY_EXT
372 _printClass(
string.Format(
"%1 [OnPauseMenuClose]",
this));
383 #ifdef DEBUG_INFO_DISPLAY_EXT
384 _printClass(
string.Format(
"%1 [OnEditorInit] editorManager: %2",
this, editorManager));
394 if ((m_eShow &
EShowGUI.IN_EDITOR) == 0)
403 private void OnEditorOpen()
405 #ifdef DEBUG_INFO_DISPLAY_EXT
406 _printClass(
string.Format(
"%1 [OnEditorOpen]",
this));
415 private void OnEditorClose()
417 #ifdef DEBUG_INFO_DISPLAY_EXT
418 _printClass(
string.Format(
"%1 [OnEditorClose]",
this));
427 private void UpdateVisibility()
429 #ifdef DEBUG_INFO_DISPLAY_EXT
446 cameraPassed = m_eShow &
EShowGUI.WITHOUT_ENTITY;
469 speed = UIConstants.FADE_RATE_INSTANT;
471 #ifdef DEBUG_INFO_DISPLAY_EXT
472 _printClass(
string.Format(
"%1 [Show] m_bShown && m_bCanShow: %2 | m_bShown: %3 | m_bCanShow: %4",
this, show &&
m_bCanShow, show,
m_bCanShow));
483 #ifdef DEBUG_INFO_DISPLAY_EXT
484 _printClass(
string.Format(
"%1 [OnStopDraw] owner: %2",
this, owner));
500 PauseMenuUI.m_OnPauseMenuOpened.Remove(OnPauseMenuOpen);
501 PauseMenuUI.m_OnPauseMenuClosed.Remove(OnPauseMenuClose);
510 m_CameraHandler.GetThirdPersonSwitchInvoker().Remove(UpdateVisibility);
515 super.OnStopDraw(owner);
525 #ifdef DEBUG_INFO_DISPLAY_EXT
526 _printClass(
string.Format(
"%1 [OnInit] owner: %2",
this, owner));
549 super.UpdateValues(owner, timeSlice);
ArmaReforgerScripted GetGame()
SCR_HUDManagerComponent m_HUDManager
SCR_AIUtilityComponentClass m_OwnerEntity
override event void DisplayStartDraw(IEntity owner)
override event void DisplayInit(IEntity owner)
override event void DisplayUpdate(IEntity owner, float timeSlice)
override event void DisplayStopDraw(IEntity owner)
SCR_CharacterPerceivableComponentClass m_CharacterController
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
SCR_FastTravelComponentClass m_PlayerController
override event void UpdateValues(IEntity owner, float timeSlice)
override event void OnStartDraw(IEntity owner)
override event void OnStopDraw(IEntity owner)
bool m_bAttachedToPlayerController
bool DisplayStartDrawInit(IEntity owner)
void DisplayConsciousnessChanged(bool conscious, bool init=false)
SCR_CharacterCameraHandlerComponent m_CameraHandler
void InitializeInterfaceSettings()
void DisplayControlledEntityChanged(IEntity from, IEntity to)
EventHandlerManagerComponent m_EventHandlerManager
bool m_bIsEnabledInSettings
MenuManager m_MenuManager
void DisplayOnSuspended()
Called when GUI is temporarily suspended due to visibility flags; e.g. GM entered and GUI marked as n...
string m_sInterfaceSettingName
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_EditorManagerEntity m_EditorManager
enum EVehicleType IEntity
proto external Managed FindComponent(typename typeName)
static SCR_HUDManagerComponent GetHUDManager()
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute
void SetEnabled(bool enabled)
proto external PlayerController GetPlayerController()
void OnControlledEntityChanged(IEntity from, IEntity to)
Runs every time the controlled entity has been changed.