Exemplo n.º 1
0
        private void updateState(ValueChangedEvent <DownloadState> state)
        {
            switch (state.NewValue)
            {
            case DownloadState.NotDownloaded:
                background.FadeColour(colours.Gray4, 500, Easing.InOutExpo);
                icon.MoveToX(0, 500, Easing.InOutExpo);
                checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo);
                break;

            case DownloadState.Downloading:
                background.FadeColour(colours.Blue, 500, Easing.InOutExpo);
                icon.MoveToX(0, 500, Easing.InOutExpo);
                checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo);
                break;

            case DownloadState.Downloaded:
                background.FadeColour(colours.Yellow, 500, Easing.InOutExpo);
                break;

            case DownloadState.LocallyAvailable:
                background.FadeColour(colours.Green, 500, Easing.InOutExpo);
                icon.MoveToX(-8, 500, Easing.InOutExpo);
                checkmark.ScaleTo(new Vector2(13), 500, Easing.InOutExpo);
                break;
            }
        }
Exemplo n.º 2
0
        private void updateState(BeatmapSetDownloader.DownloadStatus state)
        {
            switch (state)
            {
            case BeatmapSetDownloader.DownloadStatus.NotDownloaded:
                background.FadeColour(colours.Gray4, 500, Easing.InOutExpo);
                icon.MoveToX(0, 500, Easing.InOutExpo);
                checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo);
                break;

            case BeatmapSetDownloader.DownloadStatus.Downloading:
                background.FadeColour(colours.Blue, 500, Easing.InOutExpo);
                icon.MoveToX(0, 500, Easing.InOutExpo);
                checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo);
                break;

            case BeatmapSetDownloader.DownloadStatus.Downloaded:
                background.FadeColour(colours.Green, 500, Easing.InOutExpo);
                icon.MoveToX(-8, 500, Easing.InOutExpo);
                checkmark.ScaleTo(new Vector2(13), 500, Easing.InOutExpo);
                break;
            }
        }