1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 18:42:56 +08:00

Improve display of beatmap thumbnails

This commit is contained in:
Dean Herbert 2017-12-11 12:47:31 +09:00
parent 98ce856de1
commit 0c2158ccbd
2 changed files with 20 additions and 20 deletions

View File

@ -15,7 +15,14 @@ namespace osu.Game.Tests.Visual
{ {
internal class TestCaseHistoricalSection : OsuTestCase internal class TestCaseHistoricalSection : OsuTestCase
{ {
public override IReadOnlyList<Type> RequiredTypes => new [] { typeof(HistoricalSection), typeof(PaginatedMostPlayedBeatmapContainer), typeof(DrawableMostPlayedRow) }; public override IReadOnlyList<Type> RequiredTypes =>
new[]
{
typeof(HistoricalSection),
typeof(PaginatedMostPlayedBeatmapContainer),
typeof(DrawableMostPlayedRow),
typeof(DrawableProfileRow)
};
public TestCaseHistoricalSection() public TestCaseHistoricalSection()
{ {

View File

@ -4,13 +4,11 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using OpenTK; using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Overlays.Profile.Sections.Historical namespace osu.Game.Overlays.Profile.Sections.Historical
{ {
@ -26,24 +24,19 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
this.playCount = playCount; this.playCount = playCount;
} }
protected override Drawable CreateLeftVisual() => new Container protected override Drawable CreateLeftVisual() => new DelayedLoadWrapper(new BeatmapSetCover(beatmap.BeatmapSet, BeatmapSetCoverType.List)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
FillMode = FillMode.Fit,
RelativeSizeAxes = Axes.Both,
OnLoadComplete = d => d.FadeInFromZero(500, Easing.OutQuint)
})
{ {
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft,
Children = new Drawable[] RelativeSizeAxes = Axes.None,
{ Size = new Vector2(80, 50),
new Box //Image Background while loading
{
Size = new Vector2(80, 50),
Colour = Color4.Black,
},
new DelayedLoadWrapper(new BeatmapSetCover(beatmap.BeatmapSet, BeatmapSetCoverType.List)
{
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
}),
},
}; };
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]
@ -105,7 +98,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
} }
}); });
if(profileOverlay != null) if (profileOverlay != null)
mapperContainer.Action = () => profileOverlay.ShowUser(beatmap.BeatmapSet.Metadata.Author); mapperContainer.Action = () => profileOverlay.ShowUser(beatmap.BeatmapSet.Metadata.Author);
} }
} }