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