mirror of
https://github.com/ppy/osu
synced 2025-01-03 04:42:10 +00:00
Update download progress bar appearance to match intended design
This commit is contained in:
parent
91baaa73f3
commit
222846290e
@ -210,15 +210,6 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
d.AddText("mapped by ", t => t.Colour = colourProvider.Content2);
|
||||
d.AddUserLink(beatmapSet.Author);
|
||||
}),
|
||||
statisticsContainer = new FillFlowContainer<BeatmapCardStatistic>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(10, 0),
|
||||
Alpha = 0,
|
||||
ChildrenEnumerable = createStatistics()
|
||||
}
|
||||
}
|
||||
},
|
||||
new Container
|
||||
@ -228,44 +219,63 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
Horizontal = 10,
|
||||
Vertical = 4
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
idleBottomContent = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
Horizontal = 10,
|
||||
Vertical = 4
|
||||
},
|
||||
Spacing = new Vector2(4, 0),
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 3),
|
||||
AlwaysPresent = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new BeatmapSetOnlineStatusPill
|
||||
statisticsContainer = new FillFlowContainer<BeatmapCardStatistic>
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Status = beatmapSet.Status,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(10, 0),
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true,
|
||||
ChildrenEnumerable = createStatistics()
|
||||
},
|
||||
new DifficultySpectrumDisplay(beatmapSet)
|
||||
new FillFlowContainer
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
DotSize = new Vector2(6, 12)
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(4, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new BeatmapSetOnlineStatusPill
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Status = beatmapSet.Status,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
},
|
||||
new DifficultySpectrumDisplay(beatmapSet)
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
DotSize = new Vector2(6, 12)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
downloadProgressBar = new BeatmapCardDownloadProgressBar(beatmapSet)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 0,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft
|
||||
Height = 6,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -358,7 +368,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
rightButtonArea.FadeTo(IsHovered ? 1 : 0, TRANSITION_DURATION, Easing.OutQuint);
|
||||
|
||||
idleBottomContent.FadeTo(downloadProgressBar.IsActive.Value ? 0 : 1, TRANSITION_DURATION, Easing.OutQuint);
|
||||
downloadProgressBar.ResizeHeightTo(downloadProgressBar.IsActive.Value ? 8 : 0, TRANSITION_DURATION, Easing.OutQuint);
|
||||
downloadProgressBar.FadeTo(downloadProgressBar.IsActive.Value ? 1 : 0, TRANSITION_DURATION, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,8 +21,11 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
public override bool IsPresent => true;
|
||||
|
||||
private readonly BeatmapDownloadTracker tracker;
|
||||
private readonly Box background;
|
||||
private readonly Box foreground;
|
||||
private readonly CircularContainer background;
|
||||
private readonly CircularContainer foreground;
|
||||
|
||||
private readonly Box backgroundFill;
|
||||
private readonly Box foregroundFill;
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; }
|
||||
@ -35,13 +38,23 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
tracker = new BeatmapDownloadTracker(beatmapSet),
|
||||
background = new Box
|
||||
background = new CircularContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
Child = backgroundFill = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
},
|
||||
foreground = new Box
|
||||
foreground = new CircularContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
Child = foregroundFill = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -49,7 +62,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
background.Colour = colourProvider.Background6;
|
||||
backgroundFill.Colour = colourProvider.Background6;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -66,12 +79,12 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
case DownloadState.Downloading:
|
||||
FinishTransforms(true);
|
||||
foreground.Colour = colourProvider.Highlight1;
|
||||
foregroundFill.Colour = colourProvider.Highlight1;
|
||||
isActive.Value = true;
|
||||
break;
|
||||
|
||||
case DownloadState.Importing:
|
||||
foreground.FadeColour(colours.Yellow, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
|
||||
foregroundFill.FadeColour(colours.Yellow, BeatmapCard.TRANSITION_DURATION, Easing.OutQuint);
|
||||
isActive.Value = true;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user