1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-31 16:32:55 +08:00

Merge branch 'master' into fix-logo-overhead

This commit is contained in:
Dean Herbert 2018-09-11 01:22:44 +09:00 committed by GitHub
commit 7c7f0e11e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 14 deletions

View File

@ -108,7 +108,9 @@ namespace osu.Game
dependencies.Cache(contextFactory = new DatabaseContextFactory(Host.Storage)); dependencies.Cache(contextFactory = new DatabaseContextFactory(Host.Storage));
dependencies.Cache(new LargeTextureStore(new TextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures")))); var largeStore = new LargeTextureStore(new TextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures")));
largeStore.AddStore(new TextureLoaderStore(new OnlineStore()));
dependencies.Cache(largeStore);
dependencies.CacheAs(this); dependencies.CacheAs(this);
dependencies.Cache(LocalConfig); dependencies.Cache(LocalConfig);

View File

@ -104,8 +104,6 @@ namespace osu.Game.Overlays.Direct
beatmaps.ItemAdded += setAdded; beatmaps.ItemAdded += setAdded;
} }
public override bool DisposeOnDeathRemoval => true;
protected override void Dispose(bool isDisposing) protected override void Dispose(bool isDisposing)
{ {
base.Dispose(isDisposing); base.Dispose(isDisposing);

View File

@ -118,9 +118,9 @@ namespace osu.Game.Overlays.MedalSplash
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours, TextureStore textures) private void load(OsuColour colours, TextureStore textures, LargeTextureStore largeTextures)
{ {
medalSprite.Texture = textures.Get(medal.ImageUrl); medalSprite.Texture = largeTextures.Get(medal.ImageUrl);
medalGlow.Texture = textures.Get(@"MedalSplash/medal-glow"); medalGlow.Texture = textures.Get(@"MedalSplash/medal-glow");
description.Colour = colours.BlueLight; description.Colour = colours.BlueLight;
} }

View File

@ -176,7 +176,7 @@ namespace osu.Game.Overlays.Profile.Header
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(LargeTextureStore textures)
{ {
Child = new Sprite Child = new Sprite
{ {

View File

@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(LargeTextureStore textures)
{ {
sprite.Texture = textures.Get(url); sprite.Texture = textures.Get(url);
} }

View File

@ -29,6 +29,7 @@ namespace osu.Game.Screens.Ranking
{ {
public class ResultsPageScore : ResultsPage public class ResultsPageScore : ResultsPage
{ {
private Container scoreContainer;
private ScoreCounter scoreCounter; private ScoreCounter scoreCounter;
public ResultsPageScore(Score score, WorkingBeatmap beatmap) : base(score, beatmap) { } public ResultsPageScore(Score score, WorkingBeatmap beatmap) : base(score, beatmap) { }
@ -76,7 +77,7 @@ namespace osu.Game.Screens.Ranking
Size = new Vector2(150, 60), Size = new Vector2(150, 60),
Margin = new MarginPadding(20), Margin = new MarginPadding(20),
}, },
new Container scoreContainer = new Container
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
@ -92,8 +93,8 @@ namespace osu.Game.Screens.Ranking
}, },
scoreCounter = new SlowScoreCounter(6) scoreCounter = new SlowScoreCounter(6)
{ {
Anchor = Anchor.TopCentre, Anchor = Anchor.Centre,
Origin = Anchor.TopCentre, Origin = Anchor.Centre,
Colour = colours.PinkDarker, Colour = colours.PinkDarker,
Y = 10, Y = 10,
TextSize = 56, TextSize = 56,
@ -185,6 +186,13 @@ namespace osu.Game.Screens.Ranking
}); });
} }
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
scoreCounter.Scale = new Vector2(Math.Min(1f, (scoreContainer.DrawWidth - 20) / scoreCounter.DrawWidth));
}
private class DrawableScoreStatistic : Container private class DrawableScoreStatistic : Container
{ {
private readonly KeyValuePair<HitResult, object> statistic; private readonly KeyValuePair<HitResult, object> statistic;
@ -368,7 +376,7 @@ namespace osu.Game.Screens.Ranking
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(LargeTextureStore textures)
{ {
if (!string.IsNullOrEmpty(user.CoverUrl)) if (!string.IsNullOrEmpty(user.CoverUrl))
cover.Texture = textures.Get(user.CoverUrl); cover.Texture = textures.Get(user.CoverUrl);

View File

@ -24,7 +24,7 @@ namespace osu.Game.Users
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(LargeTextureStore textures)
{ {
if (textures == null) if (textures == null)
throw new ArgumentNullException(nameof(textures)); throw new ArgumentNullException(nameof(textures));

View File

@ -18,7 +18,7 @@ namespace osu.Game.Users
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(LargeTextureStore textures)
{ {
if (textures == null) if (textures == null)
throw new ArgumentNullException(nameof(textures)); throw new ArgumentNullException(nameof(textures));

View File

@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="ppy.osu.Framework" Version="2018.907.0" /> <PackageReference Include="ppy.osu.Framework" Version="2018.910.1" />
<PackageReference Include="SharpCompress" Version="0.22.0" /> <PackageReference Include="SharpCompress" Version="0.22.0" />
<PackageReference Include="NUnit" Version="3.10.1" /> <PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="SharpRaven" Version="2.4.0" /> <PackageReference Include="SharpRaven" Version="2.4.0" />