Example #1
0
        public DrawableTeamHeader(TeamColour colour)
        {
            Background.Colour = TournamentGame.GetTeamColour(colour);

            Text.Colour = TournamentGame.TEXT_COLOUR;
            Text.Text   = $"Team {colour}".ToUpperInvariant();
            Text.Scale  = new Vector2(0.6f);
        }
        private void updateState()
        {
            var found = currentMatch.Value.PicksBans.FirstOrDefault(p => p.BeatmapID == Beatmap.OnlineID);

            bool doFlash = found != choice;

            choice = found;

            if (found != null)
            {
                if (doFlash)
                {
                    flash?.FadeOutFromOne(500).Loop(0, 10);
                }

                BorderThickness = 6;

                BorderColour = TournamentGame.GetTeamColour(found.Team);

                switch (found.Type)
                {
                case ChoiceType.Pick:
                    Colour = Color4.White;
                    Alpha  = 1;
                    break;

                case ChoiceType.Ban:
                    Colour = Color4.Gray;
                    Alpha  = 0.5f;
                    break;
                }
            }
            else
            {
                Colour          = Color4.White;
                BorderThickness = 0;
                Alpha           = 1;
            }
        }