13 protected SCR_AIGroupInfoComponent m_GroupInfoComponent;
14 protected EGroupControlMode m_CurrentState;
16 protected TextWidget m_Text;
19 protected ProgressBarWidget m_Bar;
24 if (m_Text && m_GroupInfoComponent.GetGroupControlMode() != m_CurrentState)
25 SetAIStateText(m_GroupInfoComponent.GetGroupControlMode());
29 protected void SetAIStateText(EGroupControlMode state)
31 m_CurrentState = state;
33 if (m_CurrentState == EGroupControlMode.IDLE || m_CurrentState == EGroupControlMode.NONE)
35 m_Text.SetText(m_sIdleStateText);
38 else if (m_CurrentState == EGroupControlMode.AUTONOMOUS)
40 m_Text.SetText(m_sAutonomousStateText);
43 else if (m_CurrentState == EGroupControlMode.FOLLOWING_WAYPOINT)
45 m_Text.SetText(m_sFollowingOrderStateText);
50 m_Text.SetText(
"DEBUG UNKNOWN STATE!");
51 Print(
string.Format(
"AIStateTooltipDetail, EGroupControlMode %1 is an unsupported AI state",
typename.EnumToString(EGroupControlMode, m_CurrentState)), LogLevel.NORMAL);
62 if (entity.GetPlayerID() > 0)
71 m_GroupInfoComponent = SCR_AIGroupInfoComponent.Cast(group.GetOwner().FindComponent(SCR_AIGroupInfoComponent));
72 if (!m_GroupInfoComponent)
75 m_Text = TextWidget.Cast(widget);
79 SetAIStateText( m_GroupInfoComponent.GetGroupControlMode());