mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Merge remote-tracking branch 'upstream/master' into user-status-wiring
This commit is contained in:
@ -15,6 +15,7 @@ using osu.Framework.Screens;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
@ -35,7 +36,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private Player player;
|
||||
|
||||
private Container content;
|
||||
private LogoTrackingContainer content;
|
||||
|
||||
private BeatmapMetadataDisplay info;
|
||||
|
||||
@ -64,35 +65,34 @@ namespace osu.Game.Screens.Play
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
InternalChild = content = new Container
|
||||
InternalChild = (content = new LogoTrackingContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
}).WithChildren(new Drawable[]
|
||||
{
|
||||
info = new BeatmapMetadataDisplay(Beatmap.Value, Mods.Value, content.LogoFacade)
|
||||
{
|
||||
info = new BeatmapMetadataDisplay(Beatmap.Value, Mods.Value)
|
||||
Alpha = 0,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
new FillFlowContainer<PlayerSettingsGroup>
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Margin = new MarginPadding(25),
|
||||
Children = new PlayerSettingsGroup[]
|
||||
{
|
||||
Alpha = 0,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
new FillFlowContainer<PlayerSettingsGroup>
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Margin = new MarginPadding(25),
|
||||
Children = new PlayerSettingsGroup[]
|
||||
{
|
||||
VisualSettings = new VisualSettings(),
|
||||
new InputSettings()
|
||||
}
|
||||
VisualSettings = new VisualSettings(),
|
||||
new InputSettings()
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
loadNewPlayer();
|
||||
}
|
||||
@ -132,6 +132,9 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private void contentOut()
|
||||
{
|
||||
// Ensure the logo is no longer tracking before we scale the content
|
||||
content.StopTracking();
|
||||
|
||||
content.ScaleTo(0.7f, 300, Easing.InQuint);
|
||||
content.FadeOut(250);
|
||||
}
|
||||
@ -153,11 +156,23 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
base.LogoArriving(logo, resuming);
|
||||
|
||||
logo.ScaleTo(new Vector2(0.15f), 300, Easing.In);
|
||||
logo.MoveTo(new Vector2(0.5f), 300, Easing.In);
|
||||
const double duration = 300;
|
||||
|
||||
if (!resuming)
|
||||
{
|
||||
logo.MoveTo(new Vector2(0.5f), duration, Easing.In);
|
||||
}
|
||||
|
||||
logo.ScaleTo(new Vector2(0.15f), duration, Easing.In);
|
||||
logo.FadeIn(350);
|
||||
|
||||
logo.Delay(resuming ? 0 : 500).MoveToOffset(new Vector2(0, -0.24f), 500, Easing.InOutExpo);
|
||||
Scheduler.AddDelayed(() => { content.StartTracking(logo, resuming ? 0 : 500, Easing.InOutExpo); }, resuming ? 0 : 500);
|
||||
}
|
||||
|
||||
protected override void LogoExiting(OsuLogo logo)
|
||||
{
|
||||
base.LogoExiting(logo);
|
||||
content.StopTracking();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -169,7 +184,7 @@ namespace osu.Game.Screens.Play
|
||||
private ScheduledDelegate pushDebounce;
|
||||
protected VisualSettings VisualSettings;
|
||||
|
||||
// Hhere because IsHovered will not update unless we do so.
|
||||
// Here because IsHovered will not update unless we do so.
|
||||
public override bool HandlePositionalInput => true;
|
||||
|
||||
private bool readyForPush => player.LoadState == LoadState.Ready && IsHovered && GetContainingInputManager()?.DraggedDrawable == null;
|
||||
@ -305,6 +320,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private readonly WorkingBeatmap beatmap;
|
||||
private readonly IReadOnlyList<Mod> mods;
|
||||
private readonly Drawable facade;
|
||||
private LoadingAnimation loading;
|
||||
private Sprite backgroundSprite;
|
||||
private ModDisplay modDisplay;
|
||||
@ -326,10 +342,11 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
}
|
||||
|
||||
public BeatmapMetadataDisplay(WorkingBeatmap beatmap, IReadOnlyList<Mod> mods)
|
||||
public BeatmapMetadataDisplay(WorkingBeatmap beatmap, IReadOnlyList<Mod> mods, Drawable facade)
|
||||
{
|
||||
this.beatmap = beatmap;
|
||||
this.mods = mods;
|
||||
this.facade = facade;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -346,14 +363,20 @@ namespace osu.Game.Screens.Play
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
Children = new[]
|
||||
{
|
||||
facade.With(d =>
|
||||
{
|
||||
d.Anchor = Anchor.TopCentre;
|
||||
d.Origin = Anchor.TopCentre;
|
||||
}),
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = new LocalisedString((metadata.TitleUnicode, metadata.Title)),
|
||||
Font = OsuFont.GetFont(size: 36, italics: true),
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Margin = new MarginPadding { Top = 15 },
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
|
Reference in New Issue
Block a user