Ejemplo n.º 1
0
        /// <summary>
        ///     Displays the difficulty when deselected.
        /// </summary>
        public void DisplayAsDeselected()
        {
            Animations.Clear();
            ChangeWidthTo(410, Easing.OutQuint, 400);
            FadeToColor(Color.Black, Easing.OutQuint, 300);

            DifficultyName.Animations.Clear();
            TextDifficultyRating.Animations.Clear();
            Creator.ClearAnimations();

            DifficultyName.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, DifficultyName.Alpha, 0.65f, 400));
            TextDifficultyRating.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, TextDifficultyRating.Alpha, 0.65f, 400));
            Creator.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, Creator.Alpha, 0.65f, 400));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Displays the difficulty when it is selected.
        /// </summary>
        public void DisplayAsSelected()
        {
            Animations.Clear();
            ChangeWidthTo(500, Easing.OutQuint, 400);
            FadeToColor(new Color(68, 174, 221), Easing.OutQuint, 300);

            DifficultyName.Animations.Clear();
            TextDifficultyRating.Animations.Clear();
            Creator.ClearAnimations();

            DifficultyName.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, DifficultyName.Alpha, 1f, 400));
            TextDifficultyRating.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, TextDifficultyRating.Alpha, 1f, 400));
            Creator.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, Creator.Alpha, 1f, 400));
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Displays the difficulty when deselected.
        /// </summary>
        public void DisplayAsDeselected()
        {
            Animations.Clear();
            ChangeWidthTo(410, Easing.OutQuint, 400);
            Image = UserInterface.DeselectedMapset;

            DifficultyName.Animations.Clear();
            TextDifficultyRating.Animations.Clear();
            Creator.ClearAnimations();

            DifficultyName.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, DifficultyName.Alpha, 0.65f, 400));
            TextDifficultyRating.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, TextDifficultyRating.Alpha, 0.65f, 400));
            Creator.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.OutQuint, Creator.Alpha, 0.65f, 400));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// </summary>
        private void ShowPreview(JToken mapset)
        {
            MapBanner.Alpha = 0;

            MapBanner.ClearAnimations();
            Title.ClearAnimations();
            Artist.ClearAnimations();
            Creator.ClearAnimations();
            DownloadButton.ClearAnimations();
            CancelButton.ClearAnimations();
            ViewMapsetPageButton.ClearAnimations();

            Title.Alpha                = 0;
            Artist.Alpha               = 0;
            Creator.Alpha              = 0;
            DownloadButton.Alpha       = 0;
            CancelButton.Alpha         = 0;
            ViewMapsetPageButton.Alpha = 0;

            Title.Text = mapset["title"].ToString();
            Title.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            Artist.Text = mapset["artist"].ToString();
            Artist.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            Creator.Text = "Created By: " + mapset["creator_username"];
            Creator.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            DownloadButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));
            CancelButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));
            ViewMapsetPageButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            Task.Run(async() =>
            {
                MapBanner.Image = await ImageDownloader.DownloadMapsetBanner((int)mapset["id"]);
                MapBanner.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));
            });
        }
Ejemplo n.º 5
0
        /// <summary>
        /// </summary>
        private void HidePreview()
        {
            MapBanner.ClearAnimations();
            MapBanner.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, MapBanner.Alpha, 0, 300));

            Title.ClearAnimations();
            Title.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, Title.Alpha, 0, 300));

            Artist.ClearAnimations();
            Artist.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, Artist.Alpha, 0, 300));

            Creator.ClearAnimations();
            Creator.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, Creator.Alpha, 0, 300));

            DownloadButton.ClearAnimations();
            DownloadButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, DownloadButton.Alpha, 0, 300));

            CancelButton.ClearAnimations();
            CancelButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, CancelButton.Alpha, 0, 300));

            ViewMapsetPageButton.ClearAnimations();
            ViewMapsetPageButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, ViewMapsetPageButton.Alpha, 0, 300));
        }