mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Merge branch 'master' into fix-ruleset-crossthread
This commit is contained in:
@ -107,7 +107,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(10),
|
Spacing = new Vector2(10),
|
||||||
Padding = new MarginPadding { Bottom = 250 }
|
Padding = new MarginPadding { Bottom = 550 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -132,11 +132,9 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
var loadedBackgrounds = backgrounds.Where(b => b.ContentLoaded);
|
var loadedBackgrounds = backgrounds.Where(b => b.ContentLoaded);
|
||||||
|
|
||||||
int initialLoadCount = 0;
|
AddUntilStep("some loaded", () => loadedBackgrounds.Any());
|
||||||
|
|
||||||
AddUntilStep("some loaded", () => (initialLoadCount = loadedBackgrounds.Count()) > 0);
|
|
||||||
AddStep("scroll to bottom", () => scrollContainer.ScrollToEnd());
|
AddStep("scroll to bottom", () => scrollContainer.ScrollToEnd());
|
||||||
AddUntilStep("some unloaded", () => loadedBackgrounds.Count() < initialLoadCount);
|
AddUntilStep("all unloaded", () => !loadedBackgrounds.Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestUpdateableBeatmapBackgroundSprite : UpdateableBeatmapBackgroundSprite
|
private class TestUpdateableBeatmapBackgroundSprite : UpdateableBeatmapBackgroundSprite
|
||||||
|
@ -4,14 +4,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions;
|
|
||||||
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.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Graphics.Textures;
|
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Online.Leaderboards;
|
||||||
using osu.Game.Overlays.Profile.Header.Components;
|
using osu.Game.Overlays.Profile.Header.Components;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
@ -185,8 +183,6 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
|
|
||||||
private class ScoreRankInfo : CompositeDrawable
|
private class ScoreRankInfo : CompositeDrawable
|
||||||
{
|
{
|
||||||
private readonly ScoreRank rank;
|
|
||||||
private readonly Sprite rankSprite;
|
|
||||||
private readonly OsuSpriteText rankCount;
|
private readonly OsuSpriteText rankCount;
|
||||||
|
|
||||||
public int RankCount
|
public int RankCount
|
||||||
@ -196,8 +192,6 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
|
|
||||||
public ScoreRankInfo(ScoreRank rank)
|
public ScoreRankInfo(ScoreRank rank)
|
||||||
{
|
{
|
||||||
this.rank = rank;
|
|
||||||
|
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
InternalChild = new FillFlowContainer
|
InternalChild = new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -206,10 +200,10 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
rankSprite = new Sprite
|
new DrawableRank(rank)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.X,
|
||||||
FillMode = FillMode.Fit
|
Height = 30,
|
||||||
},
|
},
|
||||||
rankCount = new OsuSpriteText
|
rankCount = new OsuSpriteText
|
||||||
{
|
{
|
||||||
@ -220,12 +214,6 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(TextureStore textures)
|
|
||||||
{
|
|
||||||
rankSprite.Texture = textures.Get($"Grades/{rank.GetDescription()}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user