mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Merge pull request #7010 from peppy/add-missing-long-running
Add some more missing LongRunningLoad flags
This commit is contained in:
commit
5d7c40da6e
@ -209,9 +209,10 @@ namespace osu.Game.Tests.Visual.Background
|
||||
public void TransitionTest()
|
||||
{
|
||||
performFullSetup();
|
||||
var results = new FadeAccessibleResults(new ScoreInfo { User = new User { Username = "osu!" } });
|
||||
AddStep("Transition to Results", () => player.Push(results));
|
||||
AddUntilStep("Wait for results is current", results.IsCurrentScreen);
|
||||
FadeAccessibleResults results = null;
|
||||
AddStep("Transition to Results", () => player.Push(results =
|
||||
new FadeAccessibleResults(new ScoreInfo { User = new User { Username = "osu!" } })));
|
||||
AddUntilStep("Wait for results is current", () => results.IsCurrentScreen());
|
||||
waitForDim();
|
||||
AddAssert("Screen is undimmed, original background retained", () =>
|
||||
songSelect.IsBackgroundUndimmed() && songSelect.IsBackgroundCurrent() && results.IsBlurCorrect());
|
||||
|
@ -16,6 +16,7 @@ using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Overlays.MedalSplash
|
||||
{
|
||||
[LongRunningLoad]
|
||||
public class DrawableMedal : Container, IStateful<DisplayState>
|
||||
{
|
||||
private const float scale_when_unlocked = 0.76f;
|
||||
|
@ -12,6 +12,7 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Header.Components
|
||||
{
|
||||
[LongRunningLoad]
|
||||
public class DrawableBadge : CompositeDrawable, IHasTooltip
|
||||
{
|
||||
public static readonly Vector2 DRAWABLE_BADGE_SIZE = new Vector2(86, 40);
|
||||
|
@ -19,8 +19,8 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
private const int fade_duration = 200;
|
||||
|
||||
private Box underscoreLine;
|
||||
private readonly Box coloredBackground;
|
||||
private readonly Container background;
|
||||
private Box coloredBackground;
|
||||
private Container background;
|
||||
|
||||
/// <summary>
|
||||
/// A visual element displayed to the left of <see cref="LeftFlowContainer"/> content.
|
||||
@ -36,6 +36,19 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Height = 60;
|
||||
|
||||
Content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Width = 0.97f,
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OsuColour colour)
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
background = new Container
|
||||
@ -53,21 +66,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
},
|
||||
Child = coloredBackground = new Box { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
Content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Width = 0.97f,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OsuColour colour)
|
||||
{
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
Content,
|
||||
underscoreLine = new Box
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
@ -101,7 +100,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
Origin = Anchor.CentreRight,
|
||||
Direction = FillDirection.Vertical,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
coloredBackground.Colour = underscoreLine.Colour = colour.Gray4;
|
||||
}
|
||||
|
@ -66,11 +66,14 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
||||
};
|
||||
|
||||
case RecentActivityType.Achievement:
|
||||
return new MedalIcon(activity.Achievement.Slug)
|
||||
return new DelayedLoadWrapper(new MedalIcon(activity.Achievement.Slug)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fit,
|
||||
})
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = 60,
|
||||
FillMode = FillMode.Fit,
|
||||
};
|
||||
|
||||
default:
|
||||
|
@ -9,6 +9,7 @@ using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Sections.Recent
|
||||
{
|
||||
[LongRunningLoad]
|
||||
public class MedalIcon : Container
|
||||
{
|
||||
private readonly string slug;
|
||||
|
@ -70,7 +70,10 @@ namespace osu.Game.Screens.Ranking.Pages
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new UserHeader(Score.User)
|
||||
new DelayedLoadWrapper(new UserHeader(Score.User)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
})
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -370,6 +373,7 @@ namespace osu.Game.Screens.Ranking.Pages
|
||||
}
|
||||
}
|
||||
|
||||
[LongRunningLoad]
|
||||
private class UserHeader : Container
|
||||
{
|
||||
private readonly User user;
|
||||
|
Loading…
Reference in New Issue
Block a user