public void UpdateSelectedTeam() { if (GameMode.IsActive && GameMode.ActiveMode is TDMMode) { int index = (int)PlayerInfo.HeroInfo.TeamID; if (index >= 0) { if (Cast.Try(items[index], out MainMenuButton button)) { arrow.SetPosY(button.VPos.Y + GUCView.PixelToVirtualY(5), true); arrow.SetPosX(button.VPos.X - GUCView.PixelToVirtualX(25), true); arrow.Show(); return; } } } arrow.Hide(); }
public void UpdateSelectedTeam() { if (TeamMode.ActiveTODef != null) { var team = TeamMode.TeamDef; int index = TeamMode.ActiveTODef.Teams.IndexOf(team); if (team != null && index >= 0) { if (Cast.Try(items[index], out MainMenuButton button)) { arrow.SetPosY(button.VPos.Y + GUCView.PixelToVirtualY(5), true); arrow.SetPosX(button.VPos.X - GUCView.PixelToVirtualX(25), true); arrow.Show(); return; } } } arrow.Hide(); }