mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update framework and add rudimentary fading to song select screen.
This commit is contained in:
Submodule osu-framework updated: a4f3010768...8afa4fa7ae
@ -27,16 +27,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
public override string Description => @"Showing hitobjects and what not.";
|
public override string Description => @"Showing hitobjects and what not.";
|
||||||
|
|
||||||
FramedClock localClock;
|
|
||||||
|
|
||||||
protected override IFrameBasedClock Clock => localClock;
|
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
//ensure we are at offset 0
|
//ensure we are at offset 0
|
||||||
localClock = new FramedClock();
|
Clock = new FramedClock();
|
||||||
|
|
||||||
List<HitObject> objects = new List<HitObject>();
|
List<HitObject> objects = new List<HitObject>();
|
||||||
|
|
||||||
@ -93,7 +89,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
localClock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,21 +19,17 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
public override string Name => @"Hit Objects";
|
public override string Name => @"Hit Objects";
|
||||||
|
|
||||||
IFrameBasedClock ourClock;
|
|
||||||
|
|
||||||
protected override IFrameBasedClock Clock => ourClock;
|
|
||||||
|
|
||||||
public TestCaseHitObjects()
|
public TestCaseHitObjects()
|
||||||
{
|
{
|
||||||
var swClock = new StopwatchClock(true) { Rate = 1 };
|
var swClock = new StopwatchClock(true) { Rate = 1 };
|
||||||
ourClock = new FramedClock(swClock);
|
Clock = new FramedClock(swClock);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
ourClock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
|
|
||||||
Container approachContainer = new Container { Depth = float.MaxValue, };
|
Container approachContainer = new Container { Depth = float.MaxValue, };
|
||||||
|
|
||||||
@ -45,7 +41,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
var h = new HitCircle
|
var h = new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = ourClock.CurrentTime + 1000 + i * 80,
|
StartTime = Clock.CurrentTime + 1000 + i * 80,
|
||||||
Position = new Vector2((i - count / 2) * 14),
|
Position = new Vector2((i - count / 2) * 14),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -65,7 +61,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
ourClock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,20 +13,17 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
public override string Name => @"Music Controller";
|
public override string Name => @"Music Controller";
|
||||||
public override string Description => @"Tests music controller ui.";
|
public override string Description => @"Tests music controller ui.";
|
||||||
|
|
||||||
IFrameBasedClock ourClock;
|
|
||||||
protected override IFrameBasedClock Clock => ourClock;
|
|
||||||
|
|
||||||
protected MusicController mc;
|
protected MusicController mc;
|
||||||
|
|
||||||
public TestCaseMusicController()
|
public TestCaseMusicController()
|
||||||
{
|
{
|
||||||
ourClock = new FramedClock();
|
Clock = new FramedClock();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
ourClock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
mc = new MusicController
|
mc = new MusicController
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -39,7 +36,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
ourClock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,6 @@ using osu.Framework.Timing;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework;
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Modes.Osu.Objects;
|
using osu.Game.Modes.Osu.Objects;
|
||||||
@ -24,16 +22,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
public override string Description => @"Showing everything to play the game.";
|
public override string Description => @"Showing everything to play the game.";
|
||||||
|
|
||||||
FramedClock localClock;
|
|
||||||
|
|
||||||
protected override IFrameBasedClock Clock => localClock;
|
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
//ensure we are at offset 0
|
//ensure we are at offset 0
|
||||||
localClock = new FramedClock();
|
Clock = new FramedClock();
|
||||||
|
|
||||||
var objects = new List<HitObject>();
|
var objects = new List<HitObject>();
|
||||||
|
|
||||||
@ -75,7 +69,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
localClock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,7 @@ namespace osu.Game.Screens.Play
|
|||||||
},
|
},
|
||||||
wedgedContainer = new Container
|
wedgedContainer = new Container
|
||||||
{
|
{
|
||||||
|
Alpha = 0,
|
||||||
Position = wedged_container_start_position,
|
Position = wedged_container_start_position,
|
||||||
Size = wedged_container_size,
|
Size = wedged_container_size,
|
||||||
Margin = new MarginPadding { Top = 20, Right = 20, },
|
Margin = new MarginPadding { Top = 20, Right = 20, },
|
||||||
@ -179,17 +180,31 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
ensurePlayingSelected();
|
ensurePlayingSelected();
|
||||||
backgroundWedgesContainer.FadeInFromZero(250);
|
|
||||||
|
|
||||||
changeBackground(Beatmap);
|
changeBackground(Beatmap);
|
||||||
|
|
||||||
|
Content.FadeInFromZero(250);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnResuming(GameMode last)
|
protected override void OnResuming(GameMode last)
|
||||||
{
|
{
|
||||||
changeBackground(Beatmap);
|
changeBackground(Beatmap);
|
||||||
|
|
||||||
ensurePlayingSelected();
|
ensurePlayingSelected();
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
|
|
||||||
|
Content.FadeIn(250);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnSuspending(GameMode next)
|
||||||
|
{
|
||||||
|
Content.FadeOut(250);
|
||||||
|
base.OnSuspending(next);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnExiting(GameMode next)
|
||||||
|
{
|
||||||
|
Content.FadeOut(100);
|
||||||
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
@ -232,6 +247,8 @@ namespace osu.Game.Screens.Play
|
|||||||
oldWedgedBeatmapInfo.Expire();
|
oldWedgedBeatmapInfo.Expire();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wedgedContainer.FadeIn(250);
|
||||||
|
|
||||||
BeatmapSetInfo beatmapSetInfo = beatmap.BeatmapSetInfo;
|
BeatmapSetInfo beatmapSetInfo = beatmap.BeatmapSetInfo;
|
||||||
BeatmapInfo beatmapInfo = beatmap.BeatmapInfo;
|
BeatmapInfo beatmapInfo = beatmap.BeatmapInfo;
|
||||||
wedgedContainer.Add(wedgedBeatmapInfo = new BufferedContainer
|
wedgedContainer.Add(wedgedBeatmapInfo = new BufferedContainer
|
||||||
@ -252,7 +269,7 @@ namespace osu.Game.Screens.Play
|
|||||||
},
|
},
|
||||||
// We use a container, such that we can set the colour gradient to go across the
|
// We use a container, such that we can set the colour gradient to go across the
|
||||||
// vertices of the masked container instead of the vertices of the (larger) sprite.
|
// vertices of the masked container instead of the vertices of the (larger) sprite.
|
||||||
new Container
|
beatmap.Background == null ? new Container() : new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
ColourInfo = ColourInfo.GradientVertical(Color4.White, new Color4(1f, 1f, 1f, 0.3f)),
|
ColourInfo = ColourInfo.GradientVertical(Color4.White, new Color4(1f, 1f, 1f, 0.3f)),
|
||||||
|
@ -32,10 +32,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public BeatmapInfo BeatmapInfo;
|
public BeatmapInfo BeatmapInfo;
|
||||||
|
|
||||||
public PlayMode PreferredPlayMode;
|
public PlayMode PreferredPlayMode;
|
||||||
|
|
||||||
protected override IFrameBasedClock Clock => playerClock;
|
|
||||||
|
|
||||||
private InterpolatingFramedClock playerClock;
|
|
||||||
private IAdjustableClock sourceClock;
|
private IAdjustableClock sourceClock;
|
||||||
|
|
||||||
private Ruleset ruleset;
|
private Ruleset ruleset;
|
||||||
@ -64,7 +61,7 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceClock = (IAdjustableClock)track ?? new StopwatchClock();
|
sourceClock = (IAdjustableClock)track ?? new StopwatchClock();
|
||||||
playerClock = new InterpolatingFramedClock(sourceClock);
|
Clock = new InterpolatingFramedClock(sourceClock);
|
||||||
|
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
@ -118,7 +115,7 @@ namespace osu.Game.Screens.Play
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
playerClock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
class PlayerInputManager : UserInputManager
|
class PlayerInputManager : UserInputManager
|
||||||
|
Reference in New Issue
Block a user