6 protected ref Color m_ColorPossessed;
8 const string WIDGET_NAME =
"Name";
11 protected void SetName(TextWidget nameWidget,
int playerID)
13 string playerName =
GetGame().GetPlayerManager().GetPlayerName(playerID);
14 if (playerName.IsEmpty())
17 nameWidget.SetText(
GetGame().GetPlayerManager().GetPlayerName(playerID));
18 GetGame().GetCallqueue().Remove(SetName);
21 override void OnShownOffScreen(
bool offScreen)
28 nameWidget.SetOpacity(0);
30 nameWidget.SetOpacity(1);
40 TextWidget nameWidget = TextWidget.Cast(widget.FindAnyWidget(
WIDGET_NAME));
45 SCR_EditablePlayerDelegateComponent delegate = SCR_EditablePlayerDelegateComponent.Cast(entity);
48 playerID = delegate.GetPlayerID();
55 playerID = playersManager.GetPlayerID(entity);
56 if (playersManager.IsPossessed(entity))
57 widget.SetColor(m_ColorPossessed);
64 ArmaReforgerScripted game =
GetGame();
69 if (game.GetCallqueue()) game.GetCallqueue().CallLater(SetName, 0,
true, nameWidget, playerID);
72 if (sceneSlot && sceneSlot.GetOffScreenWidget())
73 sceneSlot.GetOffScreenWidget().SetColor(widget.GetColor());