5 protected string m_sLayerName;
8 protected override void OnStart(notnull SCR_InfoDisplay display)
12 Print(
"Info Display cant have SCR_InfoDisplayLayerHandler & SCR_InfoDisplaySlotHandler co-exist as handlers!", LogLevel.ERROR);
16 WorkspaceWidget workspace =
GetGame().GetWorkspace();
21 Print(
"No HUD Manager for Layer Slot: " + m_sLayerName, LogLevel.ERROR);
28 Print(
"Cant find SCR_HUDManagerLayoutHandler for Layer Slot: " + m_sLayerName, LogLevel.ERROR);
33 Widget layerSlotWidget = layoutHandler.FindWidgetByNameFromAnyLayout(m_sLayerName, owningLayout);
36 Print(
"No Slot Widget for Layer Slot: " + m_sLayerName, LogLevel.ERROR);
40 Widget rootWidget = workspace.CreateWidgets(display.m_LayoutPath, layerSlotWidget);
43 Print(
"Can't initialize Info Display on provided Slot Widget: " + m_sLayerName, LogLevel.ERROR);
47 display.SetRootWidget(rootWidget);
48 display.SetContentWidget(rootWidget);
51 hudElement.SetWidget(rootWidget);
52 hudElement.SetParentWidgetName(m_sLayerName);
53 hudElement.SetParentLayout(owningLayout);
54 owningLayout.AddHudElement(hudElement,
false);
55 display.RegisterToHudManager();