Exemplo n.º 1
0
        public override void OnInitialize()
        {
            base.OnInitialize();

            #region Header

            AddElement(new HUDLabel
            {
                Alignment        = HUDAlignment.TOPCENTER,
                RelativePosition = new FPoint(0, 0),
                Size             = new FSize(WIDTH, 48),

                TextAlignment = HUDAlignment.CENTER,
                Text          = LevelMeta.LevelName,
                TextColor     = FlatColors.TextHUD,
                Font          = Textures.HUDFontBold,
                FontSize      = 48,
            });

            #endregion

            #region Icons

            AddElement(_diffButton0 = new EnhancedHUDDifficultyButton(2, FractionDifficulty.DIFF_0, () => SelectDiff(FractionDifficulty.DIFF_0))
            {
                Active   = MainGame.Inst.Profile.HasCustomLevelBeaten(LevelMeta.OnlineID, FractionDifficulty.DIFF_0),
                Selected = FractionDifficulty.DIFF_0 == SelectedDifficulty,

                Alignment        = HUDAlignment.TOPLEFT,
                Size             = new FSize(ICON_SIZE, ICON_SIZE),
                RelativePosition = new FPoint(1 * ICON_MARGIN + 0 * ICON_SIZE, ICON_MARGIN + 32)
            });

            AddElement(_diffButton1 = new EnhancedHUDDifficultyButton(2, FractionDifficulty.DIFF_1, () => SelectDiff(FractionDifficulty.DIFF_1))
            {
                Active   = MainGame.Inst.Profile.HasCustomLevelBeaten(LevelMeta.OnlineID, FractionDifficulty.DIFF_1),
                Selected = FractionDifficulty.DIFF_1 == SelectedDifficulty,

                Alignment        = HUDAlignment.TOPLEFT,
                Size             = new FSize(ICON_SIZE, ICON_SIZE),
                RelativePosition = new FPoint(3 * ICON_MARGIN + 1 * ICON_SIZE, ICON_MARGIN + 32)
            });

            AddElement(_diffButton2 = new EnhancedHUDDifficultyButton(2, FractionDifficulty.DIFF_2, () => SelectDiff(FractionDifficulty.DIFF_2))
            {
                Active   = MainGame.Inst.Profile.HasCustomLevelBeaten(LevelMeta.OnlineID, FractionDifficulty.DIFF_2),
                Selected = FractionDifficulty.DIFF_2 == SelectedDifficulty,

                Alignment        = HUDAlignment.TOPLEFT,
                Size             = new FSize(ICON_SIZE, ICON_SIZE),
                RelativePosition = new FPoint(5 * ICON_MARGIN + 2 * ICON_SIZE, ICON_MARGIN + 32)
            });

            AddElement(_diffButton3 = new EnhancedHUDDifficultyButton(2, FractionDifficulty.DIFF_3, () => SelectDiff(FractionDifficulty.DIFF_3))
            {
                Active   = MainGame.Inst.Profile.HasCustomLevelBeaten(LevelMeta.OnlineID, FractionDifficulty.DIFF_3),
                Selected = FractionDifficulty.DIFF_3 == SelectedDifficulty,

                Alignment        = HUDAlignment.TOPLEFT,
                Size             = new FSize(ICON_SIZE, ICON_SIZE),
                RelativePosition = new FPoint(7 * ICON_MARGIN + 3 * ICON_SIZE, ICON_MARGIN + 32)
            });

            #endregion

            #region Buttons

            AddElement(new HUDIconTextButton(2)
            {
                Alignment        = HUDAlignment.BOTTOMLEFT,
                RelativePosition = new FPoint(24, FOOTER_HEIGHT + 24),
                Size             = new FSize(3.5f * TW, 60),

                L10NText      = L10NImpl.STR_HSP_BACK,
                TextColor     = Color.White,
                Font          = Textures.HUDFontRegular,
                FontSize      = 55,
                TextAlignment = HUDAlignment.CENTER,
                TextPadding   = 8,
                Icon          = Textures.TexIconBack,

                BackgroundNormal  = HUDBackgroundDefinition.CreateRounded(FlatColors.ButtonHUD, 16),
                BackgroundPressed = HUDBackgroundDefinition.CreateRounded(FlatColors.ButtonPressedHUD, 16),

                Click = (s, a) => MainGame.Inst.SetOverworldScreenWithSCCM(SCCMMainPanel.SCCMTab.Hot),
            });

            AddElement(_btnReplay = new HUDIconTextButton(2)
            {
                Alignment        = HUDAlignment.BOTTOMRIGHT,
                RelativePosition = new FPoint(24, FOOTER_HEIGHT + 24),
                Size             = new FSize(3.5f * TW, 60),

                L10NText      = L10NImpl.STR_HSP_AGAIN,
                TextColor     = Color.White,
                Font          = Textures.HUDFontRegular,
                FontSize      = 55,
                TextAlignment = HUDAlignment.CENTER,
                TextPadding   = 8,
                Icon          = Textures.TexIconRedo,

                BackgroundNormal  = HUDBackgroundDefinition.CreateRounded(FlatColors.Nephritis, 16),
                BackgroundPressed = HUDBackgroundDefinition.CreateRounded(FlatColors.Emerald, 16),

                Click = (s, a) => Replay(SelectedDifficulty),
            });

            #endregion

            #region Star

            AddElement(_btnStar = new HUDEllipseImageButton
            {
                Alignment        = HUDAlignment.CENTER,
                RelativePosition = new FPoint(0, 4.25f),
                Size             = new FSize(3f * TW, 3f * TW),

                Image        = Textures.TexIconStar,
                ImageColor   = (MainGame.Inst.Profile.HasCustomLevelStarred(LevelMeta.OnlineID) || LevelMeta.UserID == MainGame.Inst.Profile.OnlineUserID) ? FlatColors.SunFlower : FlatColors.BackgroundHUD,
                ImagePadding = 16f,

                BackgroundNormal  = FlatColors.ButtonHUD,
                BackgroundPressed = FlatColors.ButtonPressedHUD,

                IsEnabled = (LevelMeta.UserID != MainGame.Inst.Profile.OnlineUserID),
                Click     = (s, a) => ToggleStar(),
            });

            AddElement(_lblStarCount = new HUDLabel(4)
            {
                Alignment        = HUDAlignment.CENTER,
                RelativePosition = new FPoint(0, 4),
                Size             = new FSize(4 * TW, 4 * TW),

                TextAlignment = HUDAlignment.CENTER,
                Text          = LevelMeta.Stars.ToString(),
                TextColor     = FlatColors.Foreground,
                Font          = Textures.HUDFontBold,
                FontSize      = 48,
            });

            #endregion

            #region Footer

            AddElement(new HUDRectangle(0)
            {
                Alignment = HUDAlignment.BOTTOMRIGHT,
                Size      = new FSize(WIDTH, FOOTER_HEIGHT - 10),

                Definition = HUDBackgroundDefinition.CreateRounded(FlatColors.BackgroundHUD2, 16, false, false, true, true),
            });

            AddElement(new HUDRectangle(2)
            {
                Alignment        = HUDAlignment.BOTTOMLEFT,
                RelativePosition = new FPoint(0, FOOTER_HEIGHT - FOOTER_COLBAR_HEIGHT),
                Size             = new FSize(WIDTH / 3f, FOOTER_COLBAR_HEIGHT),

                Definition = HUDBackgroundDefinition.CreateSimple(FlatColors.Nephritis),
            });

            AddElement(new HUDRectangle(1)
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(0, FOOTER_HEIGHT - FOOTER_COLBAR_HEIGHT),
                Size             = new FSize(WIDTH / 2f, FOOTER_COLBAR_HEIGHT),

                Definition = HUDBackgroundDefinition.CreateSimple(FlatColors.PeterRiver),
            });

            AddElement(new HUDRectangle(2)
            {
                Alignment        = HUDAlignment.BOTTOMRIGHT,
                RelativePosition = new FPoint(0, FOOTER_HEIGHT - FOOTER_COLBAR_HEIGHT),
                Size             = new FSize(WIDTH / 3f, FOOTER_COLBAR_HEIGHT),

                Definition = HUDBackgroundDefinition.CreateSimple(FlatColors.Pomegranate),
            });

            AddElement(new HUDSeperator(HUDOrientation.Vertical, 3)
            {
                Alignment        = HUDAlignment.BOTTOMLEFT,
                RelativePosition = new FPoint(WIDTH / 3f, 0),
                Size             = new FSize(1, FOOTER_HEIGHT),

                Color = FlatColors.SeperatorHUD,
            });

            AddElement(new HUDSeperator(HUDOrientation.Vertical, 3)
            {
                Alignment        = HUDAlignment.BOTTOMRIGHT,
                RelativePosition = new FPoint(WIDTH / 3f, 0),
                Size             = new FSize(1, FOOTER_HEIGHT),

                Color = FlatColors.SeperatorHUD,
            });

            AddElement(new HUDLabel(2)
            {
                Alignment        = HUDAlignment.BOTTOMLEFT,
                RelativePosition = new FPoint(0, 77),
                Size             = new FSize(WIDTH / 3f, 40),

                TextAlignment = HUDAlignment.BOTTOMCENTER,
                L10NText      = L10NImpl.STR_HSP_AUTHOR,
                TextColor     = FlatColors.TextHUD,
                Font          = Textures.HUDFontRegular,
                FontSize      = 35,
            });

            AddElement(new HUDLabel(2)
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(0, 77),
                Size             = new FSize(WIDTH / 3f, 40),

                TextAlignment = HUDAlignment.BOTTOMCENTER,
                L10NText      = L10NImpl.STR_HSP_POINTS,
                TextColor     = FlatColors.TextHUD,
                Font          = Textures.HUDFontRegular,
                FontSize      = 35,
            });

            AddElement(LabelTimeHeader = new HUDLabel(2)
            {
                Alignment        = HUDAlignment.BOTTOMRIGHT,
                RelativePosition = new FPoint(0, 77),
                Size             = new FSize(WIDTH / 3f, 40),

                TextAlignment = HUDAlignment.BOTTOMCENTER,
                L10NText      = L10NImpl.STR_HSP_TIME_NOW,
                TextColor     = FlatColors.TextHUD,
                Font          = Textures.HUDFontRegular,
                FontSize      = 35,
            });

            AddElement(new HUDLabel(2)
            {
                Alignment        = HUDAlignment.BOTTOMLEFT,
                RelativePosition = new FPoint(0, 15),
                Size             = new FSize(WIDTH / 3f, 60),

                Text          = LevelMeta.Username ?? "Unknown",
                WordWrap      = HUDWordWrap.Ellipsis,
                TextAlignment = HUDAlignment.BOTTOMCENTER,
                TextColor     = FlatColors.TextHUD,
                Font          = Textures.HUDFontBold,
                FontSize      = 57,

                AutoFontSizeShrink = true,
            });

            AddElement(new HUDIncrementIndicatorLabel(MainGame.Inst.Profile.ScoreSCCM.ToString(), _scoreGain == 0 ? "" : "+" + _scoreGain, 2)
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(0, 15),
                Size             = new FSize(WIDTH / 3f, 60),

                TextAlignment = HUDAlignment.BOTTOMCENTER,
                TextColor     = FlatColors.TextHUD,
                Font          = Textures.HUDFontBold,
                FontSize      = 57,
            });

            AddElement(LabelTimeValue = new HUDLabel(2)
            {
                Alignment        = HUDAlignment.BOTTOMRIGHT,
                RelativePosition = new FPoint(0, 15),
                Size             = new FSize(WIDTH / 3f, 60),

                Text          = TimeExtension.FormatMilliseconds(PersonalTimes[(int)SelectedDifficulty] ?? -1, false),
                TextAlignment = HUDAlignment.BOTTOMCENTER,
                TextColor     = FlatColors.TextHUD,
                Font          = Textures.HUDFontBold,
                FontSize      = 57,
            });

            #endregion

            AddOperation(new HUDSCCMScorePanelTimeDisplayOperation());
            UpdateTDMLabels();
        }
Exemplo n.º 2
0
        public override void OnInitialize()
        {
            #region Header

            AddElement(new HUDRectangle(-99)
            {
                Alignment        = HUDAlignment.TOPCENTER,
                RelativePosition = FPoint.Zero,
                Size             = new FSize(WIDTH, 1.40f * TW),

                Definition = HUDBackgroundDefinition.CreateRounded(FlatColors.BackgroundHUD.Darken(0.9f), 16, true, true, false, false),
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTER,
                Alignment        = HUDAlignment.TOPCENTER,
                RelativePosition = new FPoint(0, 0),
                Size             = new FSize(WIDTH, 1.40f * TW),

                Font     = Textures.HUDFontBold,
                FontSize = TW,

                Text      = _meta?.LevelName ?? _blueprint.FullName,
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = Color.White,
            });

            var starred = MainGame.Inst.Profile.HasCustomLevelStarred(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID);
            var mylevel = ((_meta?.UserID ?? _blueprint.CustomMeta_UserID) == MainGame.Inst.Profile.OnlineUserID);

            AddElement(_btnStar = new HUDEllipseImageButton
            {
                Alignment        = HUDAlignment.TOPRIGHT,
                RelativePosition = new FPoint(0, 0),
                Size             = new FSize(64, 64),

                Image             = Textures.TexIconStar,
                BackgroundNormal  = Color.Transparent,
                BackgroundPressed = FlatColors.ButtonPressedHUD,
                ImageColor        = (starred || mylevel) ? FlatColors.SunFlower : FlatColors.Silver,
                ImageAlignment    = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale        = HUDImageScaleAlgorithm.STRETCH,

                Click = (s, a) => ToggleStar(),

                IsEnabled = ((_meta?.UserID ?? _blueprint.CustomMeta_UserID) != MainGame.Inst.Profile.OnlineUserID) && (MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID)),
            });

            AddElement(_lblStar = new HUDLabel
            {
                Alignment        = HUDAlignment.TOPRIGHT,
                RelativePosition = new FPoint(0, 55),
                Size             = new FSize(64, 32),

                Font     = Textures.HUDFontRegular,
                FontSize = 24,

                Text          = (_meta == null) ? "?" : _meta.Stars.ToString(),
                WordWrap      = HUDWordWrap.NoWrap,
                TextColor     = (starred || mylevel) ? FlatColors.SunFlower : FlatColors.Silver,
                TextAlignment = HUDAlignment.TOPCENTER,
            });

            #endregion

            #region Tab Header

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.BOTTOMLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(1 * TW, 1 * TW),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontBold,
                FontSize = 32,

                L10NText  = L10NImpl.STR_INF_YOU,
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = FlatColors.Clouds,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.BOTTOMLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(4 * TW, 1 * TW),
                Size             = new FSize(6 * TW, TW),

                Font     = Textures.HUDFontBold,
                FontSize = 32,

                L10NText  = L10NImpl.STR_INF_HIGHSCORE,
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = FlatColors.Clouds,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.BOTTOMLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(10 * TW, 1 * TW),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontBold,
                FontSize = 32,

                L10NText  = L10NImpl.STR_INF_CLEARS,
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = FlatColors.Clouds,
            });

            #endregion

            #region Tab Col Images

            AddElement(new HUDImage
            {
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(8, 2 * TW + 16 + (48 + 16) * 0 + 8),
                Size             = new FSize(48, 48),

                Image          = Textures.TexDifficultyLine0,
                Color          = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_0) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_0) : FlatColors.Silver,
                ImageAlignment = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale     = HUDImageScaleAlgorithm.STRETCH,
            });

            AddElement(new HUDImage
            {
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(8, 2 * TW + 16 + (48 + 16) * 1 + 8),
                Size             = new FSize(48, 48),

                Image          = Textures.TexDifficultyLine1,
                Color          = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_1) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_1) : FlatColors.Silver,
                ImageAlignment = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale     = HUDImageScaleAlgorithm.STRETCH,
            });

            AddElement(new HUDImage
            {
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(8, 2 * TW + 16 + (48 + 16) * 2 + 8),
                Size             = new FSize(48, 48),

                Image          = Textures.TexDifficultyLine2,
                Color          = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_2) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_2) : FlatColors.Silver,
                ImageAlignment = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale     = HUDImageScaleAlgorithm.STRETCH,
            });

            AddElement(new HUDImage
            {
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(8, 2 * TW + 16 + (48 + 16) * 3 + 8),
                Size             = new FSize(48, 48),

                Image          = Textures.TexDifficultyLine3,
                Color          = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_3) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_3) : FlatColors.Silver,
                ImageAlignment = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale     = HUDImageScaleAlgorithm.STRETCH,
            });

            #endregion

            #region Tab Col 1

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(1 * TW, 2 * TW + 16 + (48 + 16) * 0),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = MainGame.Inst.Profile.GetCustomLevelTimeString(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_0),
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_0) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_0) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(1 * TW, 2 * TW + 16 + (48 + 16) * 1),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = MainGame.Inst.Profile.GetCustomLevelTimeString(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_1),
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_1) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_1) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(1 * TW, 2 * TW + 16 + (48 + 16) * 2),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = MainGame.Inst.Profile.GetCustomLevelTimeString(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_2),
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_2) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_2) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(1 * TW, 2 * TW + 16 + (48 + 16) * 3),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = MainGame.Inst.Profile.GetCustomLevelTimeString(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_3),
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_3) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_3) : FlatColors.TextHUD,
            });

            #endregion

            #region Tab Col 2

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(4 * TW, 2 * TW + 16 + (48 + 16) * 0),
                Size             = new FSize(6 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_0].FormatHighscoreCell() ?? "",
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_0) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_0) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(4 * TW, 2 * TW + 16 + (48 + 16) * 1),
                Size             = new FSize(6 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_1].FormatHighscoreCell() ?? "",
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_1) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_1) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(4 * TW, 2 * TW + 16 + (48 + 16) * 2),
                Size             = new FSize(6 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_2].FormatHighscoreCell() ?? "",
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_2) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_2) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(4 * TW, 2 * TW + 16 + (48 + 16) * 3),
                Size             = new FSize(6 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_3].FormatHighscoreCell() ?? "",
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_3) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_3) : FlatColors.TextHUD,
            });

            #endregion

            #region Tab Col 3

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(10 * TW, 2 * TW + 16 + (48 + 16) * 0),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_0].FormatGlobalClearsCell() ?? "",
                WordWrap  = HUDWordWrap.NoWrap,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_0) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_0) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(10 * TW, 2 * TW + 16 + (48 + 16) * 1),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_1].FormatGlobalClearsCell() ?? "",
                WordWrap  = HUDWordWrap.NoWrap,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_1) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_1) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(10 * TW, 2 * TW + 16 + (48 + 16) * 2),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_2].FormatGlobalClearsCell() ?? "",
                WordWrap  = HUDWordWrap.NoWrap,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_2) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_2) : FlatColors.TextHUD,
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.CENTERLEFT,
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(10 * TW, 2 * TW + 16 + (48 + 16) * 3),
                Size             = new FSize(3 * TW, TW),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Highscores[(int)FractionDifficulty.DIFF_3].FormatGlobalClearsCell() ?? "",
                WordWrap  = HUDWordWrap.NoWrap,
                TextColor = MainGame.Inst.Profile.HasCustomLevelBeaten(_meta?.OnlineID ?? _blueprint.CustomMeta_LevelID, FractionDifficulty.DIFF_3) ? FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_3) : FlatColors.TextHUD,
            });

            #endregion

            #region Footer

            AddElement(new HUDRectangle
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = FPoint.Zero,
                Size             = new FSize(WIDTH, 1.5f * TW),

                Definition = HUDBackgroundDefinition.CreateRounded(FlatColors.BackgroundHUD2, 16, false, false, true, true),
            });

            AddElement(new HUDSeperator(HUDOrientation.Horizontal, 3)
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(0, 1.5f * TW),
                Size             = new FSize(WIDTH, HUD.PixelWidth),

                Color = FlatColors.SeperatorHUD,
            });

            AddElement(_btnPlay0 = new HUDEllipseImageButton
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(-84 / 2 - 16 - 84 - 32, 6),
                Size             = new FSize(84, 84),

                Image             = Textures.TexDifficultyLine0,
                BackgroundNormal  = FlatColors.ButtonHUD,
                BackgroundPressed = FlatColors.ButtonPressedHUD,
                ImageColor        = FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_0),
                ImageAlignment    = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale        = HUDImageScaleAlgorithm.STRETCH,

                Click = (s, a) => Play(FractionDifficulty.DIFF_0),
            });

            AddElement(_btnPlay1 = new HUDEllipseImageButton
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(-84 / 2 - 16, 6),
                Size             = new FSize(84, 84),

                Image             = Textures.TexDifficultyLine1,
                BackgroundNormal  = FlatColors.ButtonHUD,
                BackgroundPressed = FlatColors.ButtonPressedHUD,
                ImageColor        = FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_1),
                ImageAlignment    = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale        = HUDImageScaleAlgorithm.STRETCH,

                Click = (s, a) => Play(FractionDifficulty.DIFF_1),
            });

            AddElement(_btnPlay2 = new HUDEllipseImageButton
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(+84 / 2 + 16, 6),
                Size             = new FSize(84, 84),

                Image             = Textures.TexDifficultyLine2,
                BackgroundNormal  = FlatColors.ButtonHUD,
                BackgroundPressed = FlatColors.ButtonPressedHUD,
                ImageColor        = FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_2),
                ImageAlignment    = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale        = HUDImageScaleAlgorithm.STRETCH,

                Click = (s, a) => Play(FractionDifficulty.DIFF_2),
            });

            AddElement(_btnPlay3 = new HUDEllipseImageButton
            {
                Alignment        = HUDAlignment.BOTTOMCENTER,
                RelativePosition = new FPoint(+84 / 2 + 16 + 84 + 32, 6),
                Size             = new FSize(84, 84),

                Image             = Textures.TexDifficultyLine3,
                BackgroundNormal  = FlatColors.ButtonHUD,
                BackgroundPressed = FlatColors.ButtonPressedHUD,
                ImageColor        = FractionDifficultyHelper.GetColor(FractionDifficulty.DIFF_3),
                ImageAlignment    = HUDImageAlignmentAlgorithm.CENTER,
                ImageScale        = HUDImageScaleAlgorithm.STRETCH,

                Click = (s, a) => Play(FractionDifficulty.DIFF_3),
            });

            AddElement(new HUDLabel
            {
                TextAlignment    = HUDAlignment.BOTTOMRIGHT,
                Alignment        = HUDAlignment.BOTTOMRIGHT,
                RelativePosition = new FPoint(4, 4),
                Size             = new FSize(236, 32),

                Font     = Textures.HUDFontRegular,
                FontSize = 32,

                Text      = _meta?.Username ?? "???",
                WordWrap  = HUDWordWrap.Ellipsis,
                TextColor = FlatColors.GreenSea,
            });

            #endregion

            if (_blueprint == null && _meta != null)
            {
                StartDownload();
            }
            else if (_blueprint != null && _meta == null)
            {
                StartMetaUpdate();
            }
            else if (_blueprint != null && _meta != null)
            {
                _downloadState = DownloadState.Finished;
            }
            else
            {
                SAMLog.Error("SCCMLPD::EnumSwitch_OI", $"_blueprint: '{_blueprint}' | _meta = '{_meta}'");
            }
        }