4 [
Attribute(
desc:
"Which HUD Layout should be opened when a player exits Editor.")]
5 protected string m_sExitingEditorLayout;
6 [
Attribute(
desc:
"Which HUD Layout should be opened when a player enters Editor.")]
7 protected string m_sEnteringEditorLayout;
9 protected bool m_bIsEditorOpen;
12 protected void OnEditorExit()
14 m_bIsEditorOpen =
false;
18 layoutHandler.ChangeActiveHUDLayout(m_sExitingEditorLayout);
22 protected void OnEditorEnter()
24 m_bIsEditorOpen =
true;
28 layoutHandler.ChangeActiveHUDLayout(m_sEnteringEditorLayout);
32 protected void OnCharacterPossesed(IEntity entity)
39 layoutHandler.ChangeActiveHUDLayout(m_sExitingEditorLayout);
54 if (!pc || !editorManager ||
m_HUDManager.GetInfoDisplayCount() == 0)
57 pc.m_OnBeforePossess.Insert(OnCharacterPossesed);
58 editorManager.GetOnOpened().Insert(OnEditorEnter);
59 editorManager.GetOnClosed().Insert(OnEditorExit);
63 if (editorManager.IsOpened())