mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Merge remote-tracking branch 'upstream/master' into profile-overlay-visual
This commit is contained in:
commit
0168b7eb88
@ -1 +1 @@
|
|||||||
Subproject commit 3c074a0981844fbaa9f2ecbf879c542f07e2b94d
|
Subproject commit c95b9350edb6305cfefdf08f902f6f73d336736b
|
@ -18,9 +18,12 @@ namespace osu.Desktop
|
|||||||
{
|
{
|
||||||
internal class OsuGameDesktop : OsuGame
|
internal class OsuGameDesktop : OsuGame
|
||||||
{
|
{
|
||||||
|
private readonly bool noVersionOverlay;
|
||||||
|
|
||||||
public OsuGameDesktop(string[] args = null)
|
public OsuGameDesktop(string[] args = null)
|
||||||
: base(args)
|
: base(args)
|
||||||
{
|
{
|
||||||
|
noVersionOverlay = args?.Any(a => a == "--no-version-overlay") ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Storage GetStorageForStableInstall()
|
public override Storage GetStorageForStableInstall()
|
||||||
@ -79,11 +82,14 @@ namespace osu.Desktop
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
|
if (!noVersionOverlay)
|
||||||
{
|
{
|
||||||
Add(v);
|
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
|
||||||
v.State = Visibility.Visible;
|
{
|
||||||
});
|
Add(v);
|
||||||
|
v.State = Visibility.Visible;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetHost(GameHost host)
|
public override void SetHost(GameHost host)
|
||||||
|
@ -94,7 +94,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
switch (State)
|
switch (State.Value)
|
||||||
{
|
{
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
AccentColour = Color4.Green;
|
AccentColour = Color4.Green;
|
||||||
|
@ -57,8 +57,10 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
this.ScaleTo(2f, 600, Easing.OutQuint).FadeOut(500).Expire();
|
this.ScaleTo(2f, 600, Easing.OutQuint).FadeOut(500);
|
||||||
inner.FadeOut(250);
|
inner.FadeOut(250);
|
||||||
|
|
||||||
|
Expire(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
{
|
{
|
||||||
private const float width = 8;
|
private const float width = 8;
|
||||||
|
|
||||||
|
public override bool RemoveWhenNotAlive => false;
|
||||||
|
|
||||||
public FollowPoint()
|
public FollowPoint()
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
@ -52,9 +52,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool RemoveCompletedTransforms => false;
|
||||||
|
|
||||||
private void update()
|
private void update()
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
|
|
||||||
if (hitObjects == null)
|
if (hitObjects == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -58,6 +58,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
},
|
},
|
||||||
ApproachCircle = new ApproachCircle
|
ApproachCircle = new ApproachCircle
|
||||||
{
|
{
|
||||||
|
Alpha = 0,
|
||||||
|
Scale = new Vector2(4),
|
||||||
Colour = AccentColour,
|
Colour = AccentColour,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -82,21 +84,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateInitialState()
|
|
||||||
{
|
|
||||||
base.UpdateInitialState();
|
|
||||||
|
|
||||||
// sane defaults
|
|
||||||
ring.Show();
|
|
||||||
circle.Show();
|
|
||||||
number.Show();
|
|
||||||
glow.Show();
|
|
||||||
|
|
||||||
ApproachCircle.Hide();
|
|
||||||
ApproachCircle.ScaleTo(new Vector2(4));
|
|
||||||
explode.Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void UpdatePreemptState()
|
protected override void UpdatePreemptState()
|
||||||
{
|
{
|
||||||
base.UpdatePreemptState();
|
base.UpdatePreemptState();
|
||||||
|
@ -23,12 +23,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected sealed override void UpdateState(ArmedState state)
|
protected sealed override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
FinishTransforms();
|
double transformTime = HitObject.StartTime - TIME_PREEMPT;
|
||||||
|
|
||||||
using (BeginAbsoluteSequence(HitObject.StartTime - TIME_PREEMPT, true))
|
base.ApplyTransformsAt(transformTime, true);
|
||||||
|
base.ClearTransformsAfter(transformTime, true);
|
||||||
|
|
||||||
|
using (BeginAbsoluteSequence(transformTime, true))
|
||||||
{
|
{
|
||||||
UpdateInitialState();
|
|
||||||
|
|
||||||
UpdatePreemptState();
|
UpdatePreemptState();
|
||||||
|
|
||||||
using (BeginDelayedSequence(TIME_PREEMPT + (Judgements.FirstOrDefault()?.TimeOffset ?? 0), true))
|
using (BeginDelayedSequence(TIME_PREEMPT + (Judgements.FirstOrDefault()?.TimeOffset ?? 0), true))
|
||||||
@ -36,11 +37,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void UpdateInitialState()
|
|
||||||
{
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void UpdatePreemptState()
|
protected virtual void UpdatePreemptState()
|
||||||
{
|
{
|
||||||
this.FadeIn(TIME_FADEIN);
|
this.FadeIn(TIME_FADEIN);
|
||||||
@ -50,6 +46,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Todo: At some point we need to move these to DrawableHitObject after ensuring that all other Rulesets apply
|
||||||
|
// transforms in the same way and don't rely on them not being cleared
|
||||||
|
public override void ClearTransformsAfter(double time, bool propagateChildren = false, string targetMember = null) { }
|
||||||
|
public override void ApplyTransformsAt(double time, bool propagateChildren = false) { }
|
||||||
|
|
||||||
private OsuInputManager osuActionInputManager;
|
private OsuInputManager osuActionInputManager;
|
||||||
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
|
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
public double FadeInTime;
|
public double FadeInTime;
|
||||||
public double FadeOutTime;
|
public double FadeOutTime;
|
||||||
|
|
||||||
public override bool RemoveWhenNotAlive => false;
|
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider)
|
||||||
|
: base(repeatPoint)
|
||||||
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider) : base(repeatPoint)
|
|
||||||
{
|
{
|
||||||
this.repeatPoint = repeatPoint;
|
this.repeatPoint = repeatPoint;
|
||||||
this.drawableSlider = drawableSlider;
|
this.drawableSlider = drawableSlider;
|
||||||
@ -28,6 +27,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Blending = BlendingMode.Additive;
|
Blending = BlendingMode.Additive;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
Scale = new Vector2(0.5f);
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -51,12 +51,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
var animIn = Math.Min(150, repeatPoint.StartTime - FadeInTime);
|
var animIn = Math.Min(150, repeatPoint.StartTime - FadeInTime);
|
||||||
|
|
||||||
this.Animate(
|
this.FadeIn(animIn).ScaleTo(1.2f, animIn)
|
||||||
d => d.FadeIn(animIn),
|
.Then()
|
||||||
d => d.ScaleTo(0.5f).ScaleTo(1.2f, animIn)
|
.ScaleTo(1, 150, Easing.Out);
|
||||||
).Then(
|
|
||||||
d => d.ScaleTo(1, 150, Easing.Out)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateCurrentState(ArmedState state)
|
protected override void UpdateCurrentState(ArmedState state)
|
||||||
|
@ -43,7 +43,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ball = new SliderBall(s)
|
ball = new SliderBall(s)
|
||||||
{
|
{
|
||||||
Scale = new Vector2(s.Scale),
|
Scale = new Vector2(s.Scale),
|
||||||
AccentColour = AccentColour
|
AccentColour = AccentColour,
|
||||||
|
AlwaysPresent = true,
|
||||||
|
Alpha = 0
|
||||||
},
|
},
|
||||||
initialCircle = new DrawableHitCircle(new HitCircle
|
initialCircle = new DrawableHitCircle(new HitCircle
|
||||||
{
|
{
|
||||||
@ -148,16 +150,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateInitialState()
|
|
||||||
{
|
|
||||||
base.UpdateInitialState();
|
|
||||||
body.Alpha = 1;
|
|
||||||
|
|
||||||
//we need to be present to handle input events. note that we still don't get enough events (we don't get a position if the mouse hasn't moved since the slider appeared).
|
|
||||||
ball.AlwaysPresent = true;
|
|
||||||
ball.Alpha = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void UpdateCurrentState(ArmedState state)
|
protected override void UpdateCurrentState(ArmedState state)
|
||||||
{
|
{
|
||||||
ball.FadeIn();
|
ball.FadeIn();
|
||||||
|
@ -20,8 +20,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
public bool Tracking;
|
public bool Tracking;
|
||||||
|
|
||||||
public override bool RemoveWhenNotAlive => false;
|
|
||||||
|
|
||||||
public override bool DisplayJudgement => false;
|
public override bool DisplayJudgement => false;
|
||||||
|
|
||||||
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)
|
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)
|
||||||
|
@ -101,14 +101,21 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
// If the current time is between the start and end of the slider, we should track mouse input regardless of the cursor position.
|
// If the current time is between the start and end of the slider, we should track mouse input regardless of the cursor position.
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => canCurrentlyTrack || base.ReceiveMouseInputAt(screenSpacePos);
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => canCurrentlyTrack || base.ReceiveMouseInputAt(screenSpacePos);
|
||||||
|
|
||||||
|
public override void ClearTransforms(bool propagateChildren = false, string targetMember = null)
|
||||||
|
{
|
||||||
|
// Consider the case of rewinding - children's transforms are handled internally, so propagating down
|
||||||
|
// any further will cause weirdness with the Tracking bool below. Let's not propagate further at this point.
|
||||||
|
base.ClearTransforms(false, targetMember);
|
||||||
|
}
|
||||||
|
|
||||||
private bool tracking;
|
private bool tracking;
|
||||||
public bool Tracking
|
public bool Tracking
|
||||||
{
|
{
|
||||||
get { return tracking; }
|
get { return tracking; }
|
||||||
private set
|
private set
|
||||||
{
|
{
|
||||||
if (value == tracking) return;
|
if (value == tracking)
|
||||||
|
return;
|
||||||
tracking = value;
|
tracking = value;
|
||||||
|
|
||||||
follow.ScaleTo(tracking ? 2.8f : 1, 300, Easing.OutQuint);
|
follow.ScaleTo(tracking ? 2.8f : 1, 300, Easing.OutQuint);
|
||||||
@ -123,8 +130,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
// Make sure to use the base version of ReceiveMouseInputAt so that we correctly check the position.
|
// Make sure to use the base version of ReceiveMouseInputAt so that we correctly check the position.
|
||||||
if (Time.Current < slider.EndTime)
|
Tracking = canCurrentlyTrack
|
||||||
Tracking = canCurrentlyTrack && lastState != null && base.ReceiveMouseInputAt(lastState.Mouse.NativeState.Position) && ((Parent as DrawableSlider)?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
|
&& lastState != null
|
||||||
|
&& base.ReceiveMouseInputAt(lastState.Mouse.NativeState.Position)
|
||||||
|
&& ((Parent as DrawableSlider)?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateProgress(double progress, int repeat)
|
public void UpdateProgress(double progress, int repeat)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -61,6 +62,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
|
|
||||||
public void SetRotation(float currentRotation)
|
public void SetRotation(float currentRotation)
|
||||||
{
|
{
|
||||||
|
// If we've gone back in time, it's fine to work with a fresh set of records for now
|
||||||
|
if (records.Count > 0 && Time.Current < records.Last().Time)
|
||||||
|
records.Clear();
|
||||||
|
|
||||||
if (records.Count > 0)
|
if (records.Count > 0)
|
||||||
{
|
{
|
||||||
var record = records.Peek();
|
var record = records.Peek();
|
||||||
|
@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
h.Depth = depth++;
|
h.Depth = depth++;
|
||||||
|
|
||||||
if (auto)
|
if (auto)
|
||||||
h.State = ArmedState.Hit;
|
h.State.Value = ArmedState.Hit;
|
||||||
|
|
||||||
playfieldContainer.Add(h);
|
playfieldContainer.Add(h);
|
||||||
var proxyable = h as IDrawableHitObjectWithProxiedApproach;
|
var proxyable = h as IDrawableHitObjectWithProxiedApproach;
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Judgements
|
namespace osu.Game.Rulesets.Taiko.Judgements
|
||||||
{
|
{
|
||||||
public class TaikoStrongHitJudgement : TaikoJudgement
|
public class TaikoStrongHitJudgement : TaikoJudgement
|
||||||
@ -11,9 +9,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
|
|
||||||
public TaikoStrongHitJudgement()
|
public TaikoStrongHitJudgement()
|
||||||
{
|
{
|
||||||
base.Result = HitResult.Perfect;
|
Final = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public new HitResult Result => base.Result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected abstract TaikoAction[] HitActions { get; }
|
protected abstract TaikoAction[] HitActions { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a second hit is allowed to be processed. This occurs once this hit object has been hit successfully.
|
||||||
|
/// </summary>
|
||||||
|
protected bool SecondHitAllowed { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the last key pressed is a valid hit key.
|
/// Whether the last key pressed is a valid hit key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -45,7 +50,15 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
if (!validKeyPressed)
|
if (!validKeyPressed)
|
||||||
AddJudgement(new TaikoJudgement { Result = HitResult.Miss });
|
AddJudgement(new TaikoJudgement { Result = HitResult.Miss });
|
||||||
else if (hitOffset < HitObject.HitWindowGood)
|
else if (hitOffset < HitObject.HitWindowGood)
|
||||||
AddJudgement(new TaikoJudgement { Result = hitOffset < HitObject.HitWindowGreat ? HitResult.Great : HitResult.Good });
|
{
|
||||||
|
AddJudgement(new TaikoJudgement
|
||||||
|
{
|
||||||
|
Result = hitOffset < HitObject.HitWindowGreat ? HitResult.Great : HitResult.Good,
|
||||||
|
Final = !HitObject.IsStrong
|
||||||
|
});
|
||||||
|
|
||||||
|
SecondHitAllowed = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
AddJudgement(new TaikoJudgement { Result = HitResult.Miss });
|
AddJudgement(new TaikoJudgement { Result = HitResult.Miss });
|
||||||
}
|
}
|
||||||
@ -72,7 +85,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
var offset = !AllJudged ? 0 : Time.Current - HitObject.StartTime;
|
var offset = !AllJudged ? 0 : Time.Current - HitObject.StartTime;
|
||||||
using (BeginDelayedSequence(HitObject.StartTime - Time.Current + offset, true))
|
using (BeginDelayedSequence(HitObject.StartTime - Time.Current + offset, true))
|
||||||
{
|
{
|
||||||
switch (State)
|
switch (State.Value)
|
||||||
{
|
{
|
||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
this.Delay(HitObject.HitWindowMiss).Expire();
|
this.Delay(HitObject.HitWindowMiss).Expire();
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Taiko.Judgements;
|
using osu.Game.Rulesets.Taiko.Judgements;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||||
@ -24,27 +25,25 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool processedSecondHit;
|
|
||||||
public override bool AllJudged => processedSecondHit && base.AllJudged;
|
|
||||||
|
|
||||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||||
{
|
{
|
||||||
if (!base.AllJudged)
|
if (!SecondHitAllowed)
|
||||||
{
|
{
|
||||||
base.CheckForJudgements(userTriggered, timeOffset);
|
base.CheckForJudgements(userTriggered, timeOffset);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!userTriggered)
|
if (!userTriggered)
|
||||||
|
{
|
||||||
|
if (timeOffset > second_hit_window)
|
||||||
|
AddJudgement(new TaikoStrongHitJudgement { Result = HitResult.Miss });
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If we get here, we're assured that the key pressed is the correct secondary key
|
// If we get here, we're assured that the key pressed is the correct secondary key
|
||||||
|
|
||||||
if (Math.Abs(firstHitTime - Time.Current) < second_hit_window)
|
if (Math.Abs(firstHitTime - Time.Current) < second_hit_window)
|
||||||
{
|
AddJudgement(new TaikoStrongHitJudgement { Result = HitResult.Great });
|
||||||
AddJudgement(new TaikoStrongHitJudgement());
|
|
||||||
processedSecondHit = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool OnReleased(TaikoAction action)
|
public override bool OnReleased(TaikoAction action)
|
||||||
@ -56,8 +55,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
|
|
||||||
public override bool OnPressed(TaikoAction action)
|
public override bool OnPressed(TaikoAction action)
|
||||||
{
|
{
|
||||||
|
if (AllJudged)
|
||||||
|
return false;
|
||||||
|
|
||||||
// Check if we've handled the first key
|
// Check if we've handled the first key
|
||||||
if (!base.AllJudged)
|
if (!SecondHitAllowed)
|
||||||
{
|
{
|
||||||
// First key hasn't been handled yet, attempt to handle it
|
// First key hasn't been handled yet, attempt to handle it
|
||||||
bool handled = base.OnPressed(action);
|
bool handled = base.OnPressed(action);
|
||||||
@ -72,10 +74,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we've already hit the second key, don't handle this object any further
|
|
||||||
if (processedSecondHit)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Don't handle represses of the first key
|
// Don't handle represses of the first key
|
||||||
if (firstHitAction == action)
|
if (firstHitAction == action)
|
||||||
return false;
|
return false;
|
||||||
|
@ -244,7 +244,12 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
if (judgedObject.X >= -0.05f && judgedObject is DrawableHit)
|
if (judgedObject.X >= -0.05f && judgedObject is DrawableHit)
|
||||||
{
|
{
|
||||||
// If we're far enough away from the left stage, we should bring outselves in front of it
|
// If we're far enough away from the left stage, we should bring outselves in front of it
|
||||||
topLevelHitContainer.Add(judgedObject.CreateProxy());
|
// Todo: The following try-catch is temporary for replay rewinding support
|
||||||
|
try
|
||||||
|
{
|
||||||
|
topLevelHitContainer.Add(judgedObject.CreateProxy());
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
hitExplosionContainer.Add(new HitExplosion(judgedObject, isRim));
|
hitExplosionContainer.Add(new HitExplosion(judgedObject, isRim));
|
||||||
|
52
osu.Game.Tests/Visual/TestCaseIntroSequence.cs
Normal file
52
osu.Game.Tests/Visual/TestCaseIntroSequence.cs
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Timing;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
public class TestCaseIntroSequence : OsuTestCase
|
||||||
|
{
|
||||||
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
|
{
|
||||||
|
typeof(OsuLogo),
|
||||||
|
};
|
||||||
|
|
||||||
|
public TestCaseIntroSequence()
|
||||||
|
{
|
||||||
|
OsuLogo logo;
|
||||||
|
|
||||||
|
var rateAdjustClock = new StopwatchClock(true);
|
||||||
|
var framedClock = new FramedClock(rateAdjustClock);
|
||||||
|
framedClock.ProcessFrame();
|
||||||
|
|
||||||
|
Add(new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Clock = framedClock,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black,
|
||||||
|
},
|
||||||
|
logo = new OsuLogo
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep(@"Restart", logo.PlayIntro);
|
||||||
|
AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
39
osu.Game.Tests/Visual/TestCaseOsuGame.cs
Normal file
39
osu.Game.Tests/Visual/TestCaseOsuGame.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Timing;
|
||||||
|
using osu.Game.Screens;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
public class TestCaseOsuGame : OsuTestCase
|
||||||
|
{
|
||||||
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
|
{
|
||||||
|
typeof(OsuLogo),
|
||||||
|
};
|
||||||
|
|
||||||
|
public TestCaseOsuGame()
|
||||||
|
{
|
||||||
|
var rateAdjustClock = new StopwatchClock(true);
|
||||||
|
var framedClock = new FramedClock(rateAdjustClock);
|
||||||
|
framedClock.ProcessFrame();
|
||||||
|
|
||||||
|
Add(new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black,
|
||||||
|
});
|
||||||
|
|
||||||
|
Add(new Loader());
|
||||||
|
|
||||||
|
AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play.HUD;
|
||||||
using osu.Game.Screens.Play.ReplaySettings;
|
using osu.Game.Screens.Play.ReplaySettings;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
|
@ -110,6 +110,7 @@
|
|||||||
<Compile Include="Visual\TestCaseGamefield.cs" />
|
<Compile Include="Visual\TestCaseGamefield.cs" />
|
||||||
<Compile Include="Visual\TestCaseGraph.cs" />
|
<Compile Include="Visual\TestCaseGraph.cs" />
|
||||||
<Compile Include="Visual\TestCaseIconButton.cs" />
|
<Compile Include="Visual\TestCaseIconButton.cs" />
|
||||||
|
<Compile Include="Visual\TestCaseIntroSequence.cs" />
|
||||||
<Compile Include="Visual\TestCaseKeyConfiguration.cs" />
|
<Compile Include="Visual\TestCaseKeyConfiguration.cs" />
|
||||||
<Compile Include="Visual\TestCaseKeyCounter.cs" />
|
<Compile Include="Visual\TestCaseKeyCounter.cs" />
|
||||||
<Compile Include="Visual\TestCaseLeaderboard.cs" />
|
<Compile Include="Visual\TestCaseLeaderboard.cs" />
|
||||||
@ -121,6 +122,7 @@
|
|||||||
<Compile Include="Visual\TestCaseNotificationOverlay.cs" />
|
<Compile Include="Visual\TestCaseNotificationOverlay.cs" />
|
||||||
<Compile Include="Visual\TestCaseOnScreenDisplay.cs" />
|
<Compile Include="Visual\TestCaseOnScreenDisplay.cs" />
|
||||||
<Compile Include="Visual\TestCaseAllPlayers.cs" />
|
<Compile Include="Visual\TestCaseAllPlayers.cs" />
|
||||||
|
<Compile Include="Visual\TestCaseOsuGame.cs" />
|
||||||
<Compile Include="Visual\TestCasePlaySongSelect.cs" />
|
<Compile Include="Visual\TestCasePlaySongSelect.cs" />
|
||||||
<Compile Include="Visual\TestCaseReplay.cs" />
|
<Compile Include="Visual\TestCaseReplay.cs" />
|
||||||
<Compile Include="Visual\TestCaseReplaySettingsOverlay.cs" />
|
<Compile Include="Visual\TestCaseReplaySettingsOverlay.cs" />
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Lists;
|
using osu.Framework.Lists;
|
||||||
@ -85,6 +86,9 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
private T binarySearch<T>(SortedList<T> list, double time, T prePoint = null)
|
private T binarySearch<T>(SortedList<T> list, double time, T prePoint = null)
|
||||||
where T : ControlPoint, new()
|
where T : ControlPoint, new()
|
||||||
{
|
{
|
||||||
|
if (list == null)
|
||||||
|
throw new ArgumentNullException(nameof(list));
|
||||||
|
|
||||||
if (list.Count == 0)
|
if (list.Count == 0)
|
||||||
return new T();
|
return new T();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
|
||||||
@ -12,6 +13,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
public BeatmapBackgroundSprite(WorkingBeatmap working)
|
public BeatmapBackgroundSprite(WorkingBeatmap working)
|
||||||
{
|
{
|
||||||
|
if (working == null)
|
||||||
|
throw new ArgumentNullException(nameof(working));
|
||||||
|
|
||||||
this.working = working;
|
this.working = working;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,11 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
public BeatmapGroup(BeatmapSetInfo beatmapSet, BeatmapManager manager)
|
public BeatmapGroup(BeatmapSetInfo beatmapSet, BeatmapManager manager)
|
||||||
{
|
{
|
||||||
|
if (beatmapSet == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmapSet));
|
||||||
|
if (manager == null)
|
||||||
|
throw new ArgumentNullException(nameof(manager));
|
||||||
|
|
||||||
BeatmapSet = beatmapSet;
|
BeatmapSet = beatmapSet;
|
||||||
WorkingBeatmap beatmap = manager.GetWorkingBeatmap(BeatmapSet.Beatmaps.FirstOrDefault());
|
WorkingBeatmap beatmap = manager.GetWorkingBeatmap(BeatmapSet.Beatmaps.FirstOrDefault());
|
||||||
|
|
||||||
|
@ -73,6 +73,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
public BeatmapPanel(BeatmapInfo beatmap)
|
public BeatmapPanel(BeatmapInfo beatmap)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
|
||||||
Beatmap = beatmap;
|
Beatmap = beatmap;
|
||||||
Height *= 0.60f;
|
Height *= 0.60f;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
@ -12,6 +13,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
private readonly BeatmapSetInfo set;
|
private readonly BeatmapSetInfo set;
|
||||||
public BeatmapSetCover(BeatmapSetInfo set)
|
public BeatmapSetCover(BeatmapSetInfo set)
|
||||||
{
|
{
|
||||||
|
if (set == null)
|
||||||
|
throw new ArgumentNullException(nameof(set));
|
||||||
|
|
||||||
this.set = set;
|
this.set = set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
public BeatmapSetHeader(WorkingBeatmap beatmap)
|
public BeatmapSetHeader(WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -88,6 +91,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(LocalisationEngine localisation)
|
private void load(LocalisationEngine localisation)
|
||||||
{
|
{
|
||||||
|
if (localisation == null)
|
||||||
|
throw new ArgumentNullException(nameof(localisation));
|
||||||
|
|
||||||
title.Current = localisation.GetUnicodePreference(beatmap.Metadata.TitleUnicode, beatmap.Metadata.Title);
|
title.Current = localisation.GetUnicodePreference(beatmap.Metadata.TitleUnicode, beatmap.Metadata.Title);
|
||||||
artist.Current = localisation.GetUnicodePreference(beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist);
|
artist.Current = localisation.GetUnicodePreference(beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist);
|
||||||
}
|
}
|
||||||
@ -154,6 +160,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
public void AddDifficultyIcons(IEnumerable<BeatmapPanel> panels)
|
public void AddDifficultyIcons(IEnumerable<BeatmapPanel> panels)
|
||||||
{
|
{
|
||||||
|
if (panels == null)
|
||||||
|
throw new ArgumentNullException(nameof(panels));
|
||||||
|
|
||||||
foreach (var p in panels)
|
foreach (var p in panels)
|
||||||
difficultyIcons.Add(new DifficultyIcon(p.Beatmap));
|
difficultyIcons.Add(new DifficultyIcon(p.Beatmap));
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -23,6 +24,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour palette)
|
private void load(OsuColour palette)
|
||||||
{
|
{
|
||||||
|
if (palette == null)
|
||||||
|
throw new ArgumentNullException(nameof(palette));
|
||||||
|
|
||||||
this.palette = palette;
|
this.palette = palette;
|
||||||
AccentColour = getColour(beatmap);
|
AccentColour = getColour(beatmap);
|
||||||
}
|
}
|
||||||
@ -39,6 +43,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
private DifficultyRating getDifficultyRating(BeatmapInfo beatmap)
|
private DifficultyRating getDifficultyRating(BeatmapInfo beatmap)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
|
||||||
var rating = beatmap.StarDifficulty;
|
var rating = beatmap.StarDifficulty;
|
||||||
|
|
||||||
if (rating < 1.5) return DifficultyRating.Easy;
|
if (rating < 1.5) return DifficultyRating.Easy;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -15,6 +16,9 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
public DifficultyIcon(BeatmapInfo beatmap) : base(beatmap)
|
public DifficultyIcon(BeatmapInfo beatmap) : base(beatmap)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
Size = new Vector2(20);
|
Size = new Vector2(20);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
public static BeatmapDecoder GetDecoder(StreamReader stream)
|
public static BeatmapDecoder GetDecoder(StreamReader stream)
|
||||||
{
|
{
|
||||||
|
if (stream == null)
|
||||||
|
throw new ArgumentNullException(nameof(stream));
|
||||||
|
|
||||||
string line;
|
string line;
|
||||||
do { line = stream.ReadLine()?.Trim(); }
|
do { line = stream.ReadLine()?.Trim(); }
|
||||||
while (line != null && line.Length == 0);
|
while (line != null && line.Length == 0);
|
||||||
|
@ -70,6 +70,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleGeneral(Beatmap beatmap, string line)
|
private void handleGeneral(Beatmap beatmap, string line)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
var pair = splitKeyVal(line, ':');
|
var pair = splitKeyVal(line, ':');
|
||||||
|
|
||||||
var metadata = beatmap.BeatmapInfo.Metadata;
|
var metadata = beatmap.BeatmapInfo.Metadata;
|
||||||
@ -129,6 +134,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleEditor(Beatmap beatmap, string line)
|
private void handleEditor(Beatmap beatmap, string line)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
var pair = splitKeyVal(line, ':');
|
var pair = splitKeyVal(line, ':');
|
||||||
|
|
||||||
switch (pair.Key)
|
switch (pair.Key)
|
||||||
@ -153,6 +163,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleMetadata(Beatmap beatmap, string line)
|
private void handleMetadata(Beatmap beatmap, string line)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
var pair = splitKeyVal(line, ':');
|
var pair = splitKeyVal(line, ':');
|
||||||
|
|
||||||
var metadata = beatmap.BeatmapInfo.Metadata;
|
var metadata = beatmap.BeatmapInfo.Metadata;
|
||||||
@ -194,6 +209,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleDifficulty(Beatmap beatmap, string line)
|
private void handleDifficulty(Beatmap beatmap, string line)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
var pair = splitKeyVal(line, ':');
|
var pair = splitKeyVal(line, ':');
|
||||||
|
|
||||||
var difficulty = beatmap.BeatmapInfo.BaseDifficulty;
|
var difficulty = beatmap.BeatmapInfo.BaseDifficulty;
|
||||||
@ -226,6 +246,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
/// <param name="line">The line which may contains variables.</param>
|
/// <param name="line">The line which may contains variables.</param>
|
||||||
private void decodeVariables(ref string line)
|
private void decodeVariables(ref string line)
|
||||||
{
|
{
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
while (line.IndexOf('$') >= 0)
|
while (line.IndexOf('$') >= 0)
|
||||||
{
|
{
|
||||||
string origLine = line;
|
string origLine = line;
|
||||||
@ -244,6 +267,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleEvents(Beatmap beatmap, string line, ref StoryboardSprite storyboardSprite, ref CommandTimelineGroup timelineGroup)
|
private void handleEvents(Beatmap beatmap, string line, ref StoryboardSprite storyboardSprite, ref CommandTimelineGroup timelineGroup)
|
||||||
{
|
{
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
|
||||||
var depth = 0;
|
var depth = 0;
|
||||||
while (line.StartsWith(" ") || line.StartsWith("_"))
|
while (line.StartsWith(" ") || line.StartsWith("_"))
|
||||||
{
|
{
|
||||||
@ -469,6 +497,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleTimingPoints(Beatmap beatmap, string line)
|
private void handleTimingPoints(Beatmap beatmap, string line)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
string[] split = line.Split(',');
|
string[] split = line.Split(',');
|
||||||
|
|
||||||
double time = double.Parse(split[0].Trim(), NumberFormatInfo.InvariantInfo);
|
double time = double.Parse(split[0].Trim(), NumberFormatInfo.InvariantInfo);
|
||||||
@ -555,6 +588,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleColours(Beatmap beatmap, string line, ref bool hasCustomColours)
|
private void handleColours(Beatmap beatmap, string line, ref bool hasCustomColours)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
var pair = splitKeyVal(line, ':');
|
var pair = splitKeyVal(line, ':');
|
||||||
|
|
||||||
string[] split = pair.Value.Split(',');
|
string[] split = pair.Value.Split(',');
|
||||||
@ -587,6 +625,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleVariables(string line)
|
private void handleVariables(string line)
|
||||||
{
|
{
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
var pair = splitKeyVal(line, '=');
|
var pair = splitKeyVal(line, '=');
|
||||||
variables[pair.Key] = pair.Value;
|
variables[pair.Key] = pair.Value;
|
||||||
}
|
}
|
||||||
@ -603,6 +644,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected override void ParseFile(StreamReader stream, Beatmap beatmap)
|
protected override void ParseFile(StreamReader stream, Beatmap beatmap)
|
||||||
{
|
{
|
||||||
|
if (beatmap == null)
|
||||||
|
throw new ArgumentNullException(nameof(beatmap));
|
||||||
|
if (stream == null)
|
||||||
|
throw new ArgumentNullException(nameof(stream));
|
||||||
|
|
||||||
beatmap.BeatmapInfo.BeatmapVersion = beatmapVersion;
|
beatmap.BeatmapInfo.BeatmapVersion = beatmapVersion;
|
||||||
|
|
||||||
Section section = Section.None;
|
Section section = Section.None;
|
||||||
@ -679,6 +725,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private KeyValuePair<string, string> splitKeyVal(string line, char separator)
|
private KeyValuePair<string, string> splitKeyVal(string line, char separator)
|
||||||
{
|
{
|
||||||
|
if (line == null)
|
||||||
|
throw new ArgumentNullException(nameof(line));
|
||||||
|
|
||||||
var split = line.Trim().Split(new[] { separator }, 2);
|
var split = line.Trim().Split(new[] { separator }, 2);
|
||||||
|
|
||||||
return new KeyValuePair<string, string>
|
return new KeyValuePair<string, string>
|
||||||
|
@ -16,12 +16,12 @@ namespace osu.Game.Configuration
|
|||||||
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
|
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
|
||||||
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
|
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
|
||||||
|
|
||||||
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10);
|
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
||||||
Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10);
|
Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1);
|
||||||
|
|
||||||
Set(OsuSetting.SelectionRandomType, SelectionRandomType.RandomPermutation);
|
Set(OsuSetting.SelectionRandomType, SelectionRandomType.RandomPermutation);
|
||||||
|
|
||||||
Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1);
|
Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1, 0.01);
|
||||||
|
|
||||||
// Online settings
|
// Online settings
|
||||||
Set(OsuSetting.Username, string.Empty);
|
Set(OsuSetting.Username, string.Empty);
|
||||||
@ -41,11 +41,11 @@ namespace osu.Game.Configuration
|
|||||||
Set(OsuSetting.MenuVoice, true);
|
Set(OsuSetting.MenuVoice, true);
|
||||||
Set(OsuSetting.MenuMusic, true);
|
Set(OsuSetting.MenuMusic, true);
|
||||||
|
|
||||||
Set(OsuSetting.AudioOffset, 0, -500.0, 500.0);
|
Set(OsuSetting.AudioOffset, 0, -500.0, 500.0, 1);
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2);
|
Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2, 0.01);
|
||||||
Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2);
|
Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2, 0.01);
|
||||||
Set(OsuSetting.AutoCursorSize, false);
|
Set(OsuSetting.AutoCursorSize, false);
|
||||||
|
|
||||||
Set(OsuSetting.MouseDisableButtons, false);
|
Set(OsuSetting.MouseDisableButtons, false);
|
||||||
@ -63,13 +63,12 @@ namespace osu.Game.Configuration
|
|||||||
Set(OsuSetting.SnakingOutSliders, true);
|
Set(OsuSetting.SnakingOutSliders, true);
|
||||||
|
|
||||||
// Gameplay
|
// Gameplay
|
||||||
Set(OsuSetting.DimLevel, 0.3, 0, 1);
|
Set(OsuSetting.DimLevel, 0.3, 0, 1, 0.01);
|
||||||
|
|
||||||
Set(OsuSetting.ShowInterface, true);
|
Set(OsuSetting.ShowInterface, true);
|
||||||
Set(OsuSetting.KeyOverlay, false);
|
Set(OsuSetting.KeyOverlay, false);
|
||||||
|
|
||||||
Set(OsuSetting.FloatingComments, false);
|
Set(OsuSetting.FloatingComments, false);
|
||||||
Set(OsuSetting.PlaybackSpeed, 1.0, 0.5f, 2);
|
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||||
@ -93,7 +92,6 @@ namespace osu.Game.Configuration
|
|||||||
ShowStoryboard,
|
ShowStoryboard,
|
||||||
KeyOverlay,
|
KeyOverlay,
|
||||||
FloatingComments,
|
FloatingComments,
|
||||||
PlaybackSpeed,
|
|
||||||
ShowInterface,
|
ShowInterface,
|
||||||
MouseDisableButtons,
|
MouseDisableButtons,
|
||||||
MouseDisableWheel,
|
MouseDisableWheel,
|
||||||
|
@ -57,11 +57,6 @@ namespace osu.Game.Graphics
|
|||||||
private void load(FontStore store)
|
private void load(FontStore store)
|
||||||
{
|
{
|
||||||
this.store = store;
|
this.store = store;
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
updateTexture();
|
updateTexture();
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Graphics.Transforms;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Sprites
|
namespace osu.Game.Graphics.Sprites
|
||||||
{
|
{
|
||||||
@ -40,4 +41,23 @@ namespace osu.Game.Graphics.Sprites
|
|||||||
return base.CreateFallbackCharacterDrawable();
|
return base.CreateFallbackCharacterDrawable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class OsuSpriteTextTransformExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sets <see cref="OsuSpriteText.Text"/> to a new value after a duration.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="TransformSequence{T}"/> to which further transforms can be added.</returns>
|
||||||
|
public static TransformSequence<T> TransformTextTo<T>(this T spriteText, string newText, double duration = 0, Easing easing = Easing.None)
|
||||||
|
where T : OsuSpriteText
|
||||||
|
=> spriteText.TransformTo(nameof(OsuSpriteText.Text), newText, duration, easing);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets <see cref="OsuSpriteText.Text"/> to a new value after a duration.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="TransformSequence{T}"/> to which further transforms can be added.</returns>
|
||||||
|
public static TransformSequence<T> TransformTextTo<T>(this TransformSequence<T> t, string newText, double duration = 0, Easing easing = Easing.None)
|
||||||
|
where T : OsuSpriteText
|
||||||
|
=> t.Append(o => o.TransformTextTo(newText, duration, easing));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,9 @@ namespace osu.Game.Input.Bindings
|
|||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
store.KeyBindingChanged -= ReloadMappings;
|
|
||||||
|
if (store != null)
|
||||||
|
store.KeyBindingChanged -= ReloadMappings;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ReloadMappings() => KeyBindings = store.Query(ruleset?.ID, variant).ToList();
|
protected override void ReloadMappings() => KeyBindings = store.Query(ruleset?.ID, variant).ToList();
|
||||||
|
31
osu.Game/Online/API/Requests/GetUserBeatmapsRequest.cs
Normal file
31
osu.Game/Online/API/Requests/GetUserBeatmapsRequest.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using Humanizer;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace osu.Game.Online.API.Requests
|
||||||
|
{
|
||||||
|
public class GetUserBeatmapsRequest : APIRequest<List<GetBeatmapSetsResponse>>
|
||||||
|
{
|
||||||
|
private readonly long userId;
|
||||||
|
private readonly int offset;
|
||||||
|
private readonly BeatmapSetType type;
|
||||||
|
|
||||||
|
public GetUserBeatmapsRequest(long userId, BeatmapSetType type, int offset = 0)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
this.offset = offset;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string Target => $@"users/{userId}/beatmapsets/{type.ToString().Underscore()}?offset={offset}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum BeatmapSetType
|
||||||
|
{
|
||||||
|
MostPlayed,
|
||||||
|
Favourite,
|
||||||
|
RankedAndApproved
|
||||||
|
}
|
||||||
|
}
|
@ -29,7 +29,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
if (value == beatmap) return;
|
if (value == beatmap) return;
|
||||||
beatmap = value;
|
beatmap = value;
|
||||||
|
|
||||||
var rate = (float)beatmap.OnlineInfo.PassCount / beatmap.OnlineInfo.PlayCount;
|
int passCount = beatmap.OnlineInfo.PassCount;
|
||||||
|
int playCount = beatmap.OnlineInfo.PlayCount;
|
||||||
|
|
||||||
|
var rate = playCount != 0 ? (float)passCount / playCount : 0;
|
||||||
successPercent.Text = rate.ToString("P0");
|
successPercent.Text = rate.ToString("P0");
|
||||||
successRate.Length = rate;
|
successRate.Length = rate;
|
||||||
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);
|
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -33,6 +32,9 @@ namespace osu.Game.Overlays.Profile
|
|||||||
{
|
{
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
|
||||||
|
int[] userRanks = user.RankHistory?.Data ?? new[] { user.Statistics.Rank };
|
||||||
|
ranks = userRanks.SkipWhile(x => x == 0).ToArray();
|
||||||
|
|
||||||
Padding = new MarginPadding { Vertical = padding };
|
Padding = new MarginPadding { Vertical = padding };
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -58,19 +60,21 @@ namespace osu.Game.Overlays.Profile
|
|||||||
Font = @"Exo2.0-RegularItalic",
|
Font = @"Exo2.0-RegularItalic",
|
||||||
TextSize = secondary_textsize
|
TextSize = secondary_textsize
|
||||||
},
|
},
|
||||||
graph = new RankChartLineGraph
|
};
|
||||||
|
|
||||||
|
if (ranks.Length > 0)
|
||||||
|
{
|
||||||
|
Add(graph = new RankChartLineGraph
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.BottomCentre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Y = -secondary_textsize,
|
Y = -secondary_textsize,
|
||||||
DefaultValueCount = 90,
|
DefaultValueCount = ranks.Length,
|
||||||
BallRelease = updateRankTexts,
|
});
|
||||||
BallMove = showHistoryRankTexts
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ranks = user.RankHistory?.Data ?? new[] { user.Statistics.Rank };
|
graph.OnBallMove += showHistoryRankTexts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateRankTexts()
|
private void updateRankTexts()
|
||||||
@ -82,7 +86,8 @@ namespace osu.Game.Overlays.Profile
|
|||||||
|
|
||||||
private void showHistoryRankTexts(int dayIndex)
|
private void showHistoryRankTexts(int dayIndex)
|
||||||
{
|
{
|
||||||
rankText.Text = ranks[dayIndex] > 0 ? $"#{ranks[dayIndex]:#,0}" : "no rank";
|
rankText.Text = $"#{ranks[dayIndex]:#,0}";
|
||||||
|
dayIndex++;
|
||||||
relativeText.Text = dayIndex == ranks.Length ? "Now" : $"{ranks.Length - dayIndex} days ago";
|
relativeText.Text = dayIndex == ranks.Length ? "Now" : $"{ranks.Length - dayIndex} days ago";
|
||||||
//plural should be handled in a general way
|
//plural should be handled in a general way
|
||||||
}
|
}
|
||||||
@ -90,14 +95,15 @@ namespace osu.Game.Overlays.Profile
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
graph.Colour = colours.Yellow;
|
if (graph != null)
|
||||||
|
|
||||||
if (user.Statistics.Rank > 0)
|
|
||||||
{
|
{
|
||||||
|
graph.Colour = colours.Yellow;
|
||||||
// use logarithmic coordinates
|
// use logarithmic coordinates
|
||||||
graph.Values = ranks.Select(x => -(float)Math.Log(x));
|
graph.Values = ranks.Select(x => -(float)Math.Log(x));
|
||||||
graph.ResetBall();
|
graph.SetStaticBallPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateRankTexts();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
|
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
|
||||||
@ -110,67 +116,78 @@ namespace osu.Game.Overlays.Profile
|
|||||||
return base.Invalidate(invalidation, source, shallPropagate);
|
return base.Invalidate(invalidation, source, shallPropagate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnHover(InputState state)
|
||||||
|
{
|
||||||
|
graph?.UpdateBallPosition(state.Mouse.Position.X);
|
||||||
|
graph?.ShowBall();
|
||||||
|
return base.OnHover(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseMove(InputState state)
|
||||||
|
{
|
||||||
|
graph?.UpdateBallPosition(state.Mouse.Position.X);
|
||||||
|
return base.OnMouseMove(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(InputState state)
|
||||||
|
{
|
||||||
|
if (graph != null)
|
||||||
|
{
|
||||||
|
graph.HideBall();
|
||||||
|
updateRankTexts();
|
||||||
|
}
|
||||||
|
base.OnHoverLost(state);
|
||||||
|
}
|
||||||
|
|
||||||
private class RankChartLineGraph : LineGraph
|
private class RankChartLineGraph : LineGraph
|
||||||
{
|
{
|
||||||
private readonly CircularContainer ball;
|
private const double fade_duration = 200;
|
||||||
private bool ballShown;
|
|
||||||
|
|
||||||
private const double transform_duration = 100;
|
private readonly CircularContainer staticBall;
|
||||||
|
private readonly CircularContainer movingBall;
|
||||||
|
|
||||||
public Action<int> BallMove;
|
public Action<int> OnBallMove;
|
||||||
public Action BallRelease;
|
|
||||||
|
|
||||||
public RankChartLineGraph()
|
public RankChartLineGraph()
|
||||||
{
|
{
|
||||||
Add(ball = new CircularContainer
|
Add(staticBall = new CircularContainer
|
||||||
{
|
{
|
||||||
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(8),
|
Size = new Vector2(8),
|
||||||
Masking = true,
|
Masking = true,
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Alpha = 0,
|
|
||||||
RelativePositionAxes = Axes.Both,
|
RelativePositionAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||||
{
|
});
|
||||||
new Box { RelativeSizeAxes = Axes.Both }
|
Add(movingBall = new CircularContainer
|
||||||
}
|
{
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Size = new Vector2(8),
|
||||||
|
Alpha = 0,
|
||||||
|
Masking = true,
|
||||||
|
RelativePositionAxes = Axes.Both,
|
||||||
|
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetBall()
|
public void SetStaticBallPosition() => staticBall.Position = new Vector2(1, GetYPosition(Values.Last()));
|
||||||
|
|
||||||
|
public void UpdateBallPosition(float mouseXPosition)
|
||||||
{
|
{
|
||||||
ball.MoveTo(new Vector2(1, GetYPosition(Values.Last())), ballShown ? transform_duration : 0, Easing.OutQuint);
|
int index = calculateIndex(mouseXPosition);
|
||||||
ball.Show();
|
movingBall.Position = calculateBallPosition(index);
|
||||||
BallRelease();
|
OnBallMove.Invoke(index);
|
||||||
ballShown = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseMove(InputState state)
|
public void ShowBall() => movingBall.FadeIn(fade_duration);
|
||||||
{
|
|
||||||
if (ballShown)
|
|
||||||
{
|
|
||||||
var values = (IList<float>)Values;
|
|
||||||
var position = ToLocalSpace(state.Mouse.NativeState.Position);
|
|
||||||
int count = Math.Max(values.Count, DefaultValueCount);
|
|
||||||
int index = (int)Math.Round(position.X / DrawWidth * (count - 1));
|
|
||||||
if (index >= count - values.Count)
|
|
||||||
{
|
|
||||||
int i = index + values.Count - count;
|
|
||||||
float y = GetYPosition(values[i]);
|
|
||||||
if (Math.Abs(y * DrawHeight - position.Y) <= 8f)
|
|
||||||
{
|
|
||||||
ball.MoveTo(new Vector2(index / (float)(count - 1), y), transform_duration, Easing.OutQuint);
|
|
||||||
BallMove(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return base.OnMouseMove(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
public void HideBall() => movingBall.FadeOut(fade_duration);
|
||||||
|
|
||||||
|
private int calculateIndex(float mouseXPosition) => (int)Math.Round(mouseXPosition / DrawWidth * (DefaultValueCount - 1));
|
||||||
|
|
||||||
|
private Vector2 calculateBallPosition(int index)
|
||||||
{
|
{
|
||||||
if (ballShown)
|
float y = GetYPosition(Values.ElementAt(index));
|
||||||
ResetBall();
|
return new Vector2(index / (float)(DefaultValueCount - 1), y);
|
||||||
base.OnHoverLost(state);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,79 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using OpenTK;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Online.API.Requests;
|
||||||
|
using osu.Game.Overlays.Direct;
|
||||||
|
using osu.Game.Users;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||||
|
{
|
||||||
|
public class PaginatedBeatmapContainer : PaginatedContainer
|
||||||
|
{
|
||||||
|
private const float panel_padding = 10f;
|
||||||
|
|
||||||
|
private readonly BeatmapSetType type;
|
||||||
|
|
||||||
|
private DirectPanel playing;
|
||||||
|
|
||||||
|
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user, string header, string missing)
|
||||||
|
: base(user, header, missing)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
|
||||||
|
ItemsPerPage = 6;
|
||||||
|
|
||||||
|
ItemsContainer.Spacing = new Vector2(panel_padding);
|
||||||
|
ItemsContainer.Margin = new MarginPadding { Bottom = panel_padding };
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void ShowMore()
|
||||||
|
{
|
||||||
|
base.ShowMore();
|
||||||
|
|
||||||
|
var req = new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
|
||||||
|
|
||||||
|
req.Success += sets =>
|
||||||
|
{
|
||||||
|
ShowMoreButton.FadeTo(sets.Count == ItemsPerPage ? 1 : 0);
|
||||||
|
ShowMoreLoading.Hide();
|
||||||
|
|
||||||
|
if (!sets.Any())
|
||||||
|
{
|
||||||
|
MissingText.Show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var s in sets)
|
||||||
|
{
|
||||||
|
if (!s.OnlineBeatmapSetID.HasValue)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var subReq = new GetBeatmapSetRequest(s.OnlineBeatmapSetID.Value);
|
||||||
|
subReq.Success += b =>
|
||||||
|
{
|
||||||
|
var panel = new DirectGridPanel(b.ToBeatmapSet(Rulesets)) { Width = 400 };
|
||||||
|
ItemsContainer.Add(panel);
|
||||||
|
|
||||||
|
panel.PreviewPlaying.ValueChanged += newValue =>
|
||||||
|
{
|
||||||
|
if (newValue)
|
||||||
|
{
|
||||||
|
if (playing != null && playing != panel)
|
||||||
|
playing.PreviewPlaying.Value = false;
|
||||||
|
playing = panel;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
Api.Queue(subReq);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Api.Queue(req);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,9 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Online.API.Requests;
|
||||||
|
using osu.Game.Overlays.Profile.Sections.Beatmaps;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections
|
namespace osu.Game.Overlays.Profile.Sections
|
||||||
{
|
{
|
||||||
public class BeatmapsSection : ProfileSection
|
public class BeatmapsSection : ProfileSection
|
||||||
@ -8,5 +11,14 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
public override string Title => "Beatmaps";
|
public override string Title => "Beatmaps";
|
||||||
|
|
||||||
public override string Identifier => "beatmaps";
|
public override string Identifier => "beatmaps";
|
||||||
|
|
||||||
|
public BeatmapsSection()
|
||||||
|
{
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new PaginatedBeatmapContainer(BeatmapSetType.Favourite, User, "Favourite Beatmaps", "None... yet."),
|
||||||
|
new PaginatedBeatmapContainer(BeatmapSetType.RankedAndApproved, User, "Ranked & Approved Beatmaps", "None... yet."),
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
|
|
||||||
public HistoricalSection()
|
public HistoricalSection()
|
||||||
{
|
{
|
||||||
Child = new PaginatedScoreContainer(ScoreType.Recent, User, "Recent Plays (24h)");
|
Child = new PaginatedScoreContainer(ScoreType.Recent, User, "Recent Plays (24h)", "No performance records. :(");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
109
osu.Game/Overlays/Profile/Sections/PaginatedContainer.cs
Normal file
109
osu.Game/Overlays/Profile/Sections/PaginatedContainer.cs
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using OpenTK;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Profile.Sections
|
||||||
|
{
|
||||||
|
public class PaginatedContainer : FillFlowContainer
|
||||||
|
{
|
||||||
|
protected readonly FillFlowContainer ItemsContainer;
|
||||||
|
protected readonly OsuHoverContainer ShowMoreButton;
|
||||||
|
protected readonly LoadingAnimation ShowMoreLoading;
|
||||||
|
protected readonly OsuSpriteText MissingText;
|
||||||
|
|
||||||
|
protected int VisiblePages;
|
||||||
|
protected int ItemsPerPage;
|
||||||
|
|
||||||
|
protected readonly Bindable<User> User = new Bindable<User>();
|
||||||
|
|
||||||
|
protected APIAccess Api;
|
||||||
|
protected RulesetStore Rulesets;
|
||||||
|
|
||||||
|
public PaginatedContainer(Bindable<User> user, string header, string missing)
|
||||||
|
{
|
||||||
|
User.BindTo(user);
|
||||||
|
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
AutoSizeAxes = Axes.Y;
|
||||||
|
Direction = FillDirection.Vertical;
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
TextSize = 15,
|
||||||
|
Text = header,
|
||||||
|
Font = "Exo2.0-RegularItalic",
|
||||||
|
Margin = new MarginPadding { Top = 10, Bottom = 10 },
|
||||||
|
},
|
||||||
|
ItemsContainer = new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
},
|
||||||
|
ShowMoreButton = new OsuHoverContainer
|
||||||
|
{
|
||||||
|
Alpha = 0,
|
||||||
|
Action = ShowMore,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Child = new OsuSpriteText
|
||||||
|
{
|
||||||
|
TextSize = 14,
|
||||||
|
Text = "show more",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ShowMoreLoading = new LoadingAnimation
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Size = new Vector2(14),
|
||||||
|
},
|
||||||
|
MissingText = new OsuSpriteText
|
||||||
|
{
|
||||||
|
TextSize = 14,
|
||||||
|
Text = missing,
|
||||||
|
Alpha = 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(APIAccess api, RulesetStore rulesets)
|
||||||
|
{
|
||||||
|
Api = api;
|
||||||
|
Rulesets = rulesets;
|
||||||
|
|
||||||
|
User.ValueChanged += onUserChanged;
|
||||||
|
User.TriggerChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onUserChanged(User newUser)
|
||||||
|
{
|
||||||
|
VisiblePages = 0;
|
||||||
|
ItemsContainer.Clear();
|
||||||
|
ShowMoreButton.Hide();
|
||||||
|
|
||||||
|
if (newUser != null)
|
||||||
|
ShowMore();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void ShowMore()
|
||||||
|
{
|
||||||
|
ShowMoreLoading.Show();
|
||||||
|
ShowMoreButton.Hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,130 +1,53 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Containers;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Game.Online.API;
|
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Rulesets;
|
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections.Ranks
|
namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||||
{
|
{
|
||||||
public class PaginatedScoreContainer : FillFlowContainer
|
public class PaginatedScoreContainer : PaginatedContainer
|
||||||
{
|
{
|
||||||
private readonly FillFlowContainer<DrawableScore> scoreContainer;
|
|
||||||
private readonly OsuSpriteText missing;
|
|
||||||
private readonly OsuHoverContainer showMoreButton;
|
|
||||||
private readonly LoadingAnimation showMoreLoading;
|
|
||||||
|
|
||||||
private readonly bool includeWeight;
|
private readonly bool includeWeight;
|
||||||
private readonly ScoreType type;
|
private readonly ScoreType type;
|
||||||
private int visiblePages;
|
|
||||||
|
|
||||||
private readonly Bindable<User> user = new Bindable<User>();
|
public PaginatedScoreContainer(ScoreType type, Bindable<User> user, string header, string missing, bool includeWeight = false)
|
||||||
|
: base(user, header, missing)
|
||||||
private RulesetStore rulesets;
|
|
||||||
private APIAccess api;
|
|
||||||
|
|
||||||
public PaginatedScoreContainer(ScoreType type, Bindable<User> user, string header, bool includeWeight = false)
|
|
||||||
{
|
{
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.includeWeight = includeWeight;
|
this.includeWeight = includeWeight;
|
||||||
this.user.BindTo(user);
|
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
ItemsPerPage = 5;
|
||||||
AutoSizeAxes = Axes.Y;
|
|
||||||
Direction = FillDirection.Vertical;
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
ItemsContainer.Direction = FillDirection.Vertical;
|
||||||
{
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
TextSize = 15,
|
|
||||||
Text = header,
|
|
||||||
Font = "Exo2.0-RegularItalic",
|
|
||||||
Margin = new MarginPadding { Top = 10, Bottom = 10 },
|
|
||||||
},
|
|
||||||
scoreContainer = new FillFlowContainer<DrawableScore>
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
},
|
|
||||||
showMoreButton = new OsuHoverContainer
|
|
||||||
{
|
|
||||||
Alpha = 0,
|
|
||||||
Action = showMore,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Child = new OsuSpriteText
|
|
||||||
{
|
|
||||||
TextSize = 14,
|
|
||||||
Text = "show more",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showMoreLoading = new LoadingAnimation
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Size = new Vector2(14),
|
|
||||||
},
|
|
||||||
missing = new OsuSpriteText
|
|
||||||
{
|
|
||||||
TextSize = 14,
|
|
||||||
Text = type == ScoreType.Recent ? "No performance records. :(" : "No awesome performance records yet. :(",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
protected override void ShowMore()
|
||||||
private void load(APIAccess api, RulesetStore rulesets)
|
|
||||||
{
|
{
|
||||||
this.api = api;
|
base.ShowMore();
|
||||||
this.rulesets = rulesets;
|
|
||||||
|
|
||||||
user.ValueChanged += user_ValueChanged;
|
var req = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
|
||||||
user.TriggerChange();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void user_ValueChanged(User newUser)
|
|
||||||
{
|
|
||||||
visiblePages = 0;
|
|
||||||
scoreContainer.Clear();
|
|
||||||
showMoreButton.Hide();
|
|
||||||
missing.Show();
|
|
||||||
|
|
||||||
if (newUser != null)
|
|
||||||
showMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showMore()
|
|
||||||
{
|
|
||||||
var req = new GetUserScoresRequest(user.Value.Id, type, visiblePages++ * 5);
|
|
||||||
|
|
||||||
showMoreLoading.Show();
|
|
||||||
showMoreButton.Hide();
|
|
||||||
|
|
||||||
req.Success += scores =>
|
req.Success += scores =>
|
||||||
{
|
{
|
||||||
foreach (var s in scores)
|
foreach (var s in scores)
|
||||||
s.ApplyRuleset(rulesets.GetRuleset(s.OnlineRulesetID));
|
s.ApplyRuleset(Rulesets.GetRuleset(s.OnlineRulesetID));
|
||||||
|
|
||||||
showMoreButton.FadeTo(scores.Count == 5 ? 1 : 0);
|
ShowMoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0);
|
||||||
showMoreLoading.Hide();
|
ShowMoreLoading.Hide();
|
||||||
|
|
||||||
if (!scores.Any()) return;
|
if (!scores.Any())
|
||||||
|
{
|
||||||
|
MissingText.Show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
missing.Hide();
|
MissingText.Hide();
|
||||||
|
|
||||||
foreach (OnlineScore score in scores)
|
foreach (OnlineScore score in scores)
|
||||||
{
|
{
|
||||||
@ -133,18 +56,18 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
drawableScore = new DrawablePerformanceScore(score, includeWeight ? Math.Pow(0.95, scoreContainer.Count) : (double?)null);
|
drawableScore = new DrawablePerformanceScore(score, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null);
|
||||||
break;
|
break;
|
||||||
case ScoreType.Recent:
|
case ScoreType.Recent:
|
||||||
drawableScore = new DrawableTotalScore(score);
|
drawableScore = new DrawableTotalScore(score);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
scoreContainer.Add(drawableScore);
|
ItemsContainer.Add(drawableScore);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
api.Queue(req);
|
Api.Queue(req);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,8 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
{
|
{
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new PaginatedScoreContainer(ScoreType.Best, User, "Best Performance", true),
|
new PaginatedScoreContainer(ScoreType.Best, User, "Best Performance", "No performance records. :(", true),
|
||||||
new PaginatedScoreContainer(ScoreType.Firsts, User, "First Place Ranks"),
|
new PaginatedScoreContainer(ScoreType.Firsts, User, "First Place Ranks", "No awesome performance records yet. :("),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ namespace osu.Game.Overlays
|
|||||||
new RanksSection(),
|
new RanksSection(),
|
||||||
//new MedalsSection(),
|
//new MedalsSection(),
|
||||||
new HistoricalSection(),
|
new HistoricalSection(),
|
||||||
//new BeatmapsSection(),
|
new BeatmapsSection(),
|
||||||
//new KudosuSection()
|
//new KudosuSection()
|
||||||
};
|
};
|
||||||
tabs = new ProfileTabControl
|
tabs = new ProfileTabControl
|
||||||
|
@ -83,7 +83,7 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire();
|
Expire(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,26 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual HitResult MaxResult => HitResult.Perfect;
|
public virtual HitResult MaxResult => HitResult.Perfect;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The combo prior to this judgement occurring.
|
||||||
|
/// </summary>
|
||||||
|
internal int ComboAtJudgement;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The highest combo achieved prior to this judgement occurring.
|
||||||
|
/// </summary>
|
||||||
|
internal int HighestComboAtJudgement;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a successful hit occurred.
|
||||||
|
/// </summary>
|
||||||
public bool IsHit => Result > HitResult.Miss;
|
public bool IsHit => Result > HitResult.Miss;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this judgement is the final judgement for the hit object.
|
||||||
|
/// </summary>
|
||||||
|
public bool Final = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The offset from a perfect hit at which this judgement occurred.
|
/// The offset from a perfect hit at which this judgement occurred.
|
||||||
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.
|
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.
|
||||||
|
@ -13,6 +13,7 @@ using OpenTK.Graphics;
|
|||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Objects.Drawables
|
namespace osu.Game.Rulesets.Objects.Drawables
|
||||||
{
|
{
|
||||||
@ -30,6 +31,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool DisplayJudgement => true;
|
public virtual bool DisplayJudgement => true;
|
||||||
|
|
||||||
|
public override bool RemoveCompletedTransforms => false;
|
||||||
|
public override bool RemoveWhenNotAlive => false;
|
||||||
|
|
||||||
protected DrawableHitObject(HitObject hitObject)
|
protected DrawableHitObject(HitObject hitObject)
|
||||||
{
|
{
|
||||||
HitObject = hitObject;
|
HitObject = hitObject;
|
||||||
@ -40,6 +44,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
where TObject : HitObject
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
public event Action<DrawableHitObject, Judgement> OnJudgement;
|
public event Action<DrawableHitObject, Judgement> OnJudgement;
|
||||||
|
public event Action<DrawableHitObject, Judgement> OnJudgementRemoved;
|
||||||
|
|
||||||
public new readonly TObject HitObject;
|
public new readonly TObject HitObject;
|
||||||
|
|
||||||
@ -56,31 +61,42 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
|
|
||||||
protected List<SampleChannel> Samples = new List<SampleChannel>();
|
protected List<SampleChannel> Samples = new List<SampleChannel>();
|
||||||
|
|
||||||
|
public readonly Bindable<ArmedState> State = new Bindable<ArmedState>();
|
||||||
|
|
||||||
protected DrawableHitObject(TObject hitObject)
|
protected DrawableHitObject(TObject hitObject)
|
||||||
: base(hitObject)
|
: base(hitObject)
|
||||||
{
|
{
|
||||||
HitObject = hitObject;
|
HitObject = hitObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArmedState state;
|
[BackgroundDependencyLoader]
|
||||||
public ArmedState State
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
get { return state; }
|
foreach (SampleInfo sample in HitObject.Samples)
|
||||||
|
|
||||||
set
|
|
||||||
{
|
{
|
||||||
if (state == value)
|
SampleChannel channel = audio.Sample.Get($@"Gameplay/{sample.Bank}-{sample.Name}");
|
||||||
return;
|
|
||||||
state = value;
|
|
||||||
|
|
||||||
if (!IsLoaded)
|
if (channel == null)
|
||||||
return;
|
continue;
|
||||||
|
|
||||||
|
channel.Volume.Value = sample.Volume;
|
||||||
|
Samples.Add(channel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
State.ValueChanged += state =>
|
||||||
|
{
|
||||||
UpdateState(state);
|
UpdateState(state);
|
||||||
|
|
||||||
if (State == ArmedState.Hit)
|
if (State == ArmedState.Hit)
|
||||||
PlaySamples();
|
PlaySamples();
|
||||||
}
|
};
|
||||||
|
|
||||||
|
State.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void PlaySamples()
|
protected void PlaySamples()
|
||||||
@ -88,21 +104,13 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
Samples.ForEach(s => s?.Play());
|
Samples.ForEach(s => s?.Play());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
//force application of the state that was set before we loaded.
|
|
||||||
UpdateState(State);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool hasJudgementResult;
|
|
||||||
private bool judgementOccurred;
|
private bool judgementOccurred;
|
||||||
|
private bool judgementFinalized => judgements.LastOrDefault()?.Final == true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been judged.
|
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been judged.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool AllJudged => (!ProvidesJudgement || hasJudgementResult) && (NestedHitObjects?.All(h => h.AllJudged) ?? true);
|
public bool AllJudged => (!ProvidesJudgement || judgementFinalized) && (NestedHitObjects?.All(h => h.AllJudged) ?? true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Notifies that a new judgement has occurred for this <see cref="DrawableHitObject"/>.
|
/// Notifies that a new judgement has occurred for this <see cref="DrawableHitObject"/>.
|
||||||
@ -110,7 +118,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// <param name="judgement">The <see cref="Judgement"/>.</param>
|
/// <param name="judgement">The <see cref="Judgement"/>.</param>
|
||||||
protected void AddJudgement(Judgement judgement)
|
protected void AddJudgement(Judgement judgement)
|
||||||
{
|
{
|
||||||
hasJudgementResult = judgement.Result >= HitResult.Miss;
|
|
||||||
judgementOccurred = true;
|
judgementOccurred = true;
|
||||||
|
|
||||||
// Ensure that the judgement is given a valid time offset, because this may not get set by the caller
|
// Ensure that the judgement is given a valid time offset, because this may not get set by the caller
|
||||||
@ -124,10 +131,10 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
case HitResult.None:
|
case HitResult.None:
|
||||||
break;
|
break;
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
State = ArmedState.Miss;
|
State.Value = ArmedState.Miss;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
State = ArmedState.Hit;
|
State.Value = ArmedState.Hit;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +159,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
judgementOccurred |= d.UpdateJudgement(userTriggered);
|
judgementOccurred |= d.UpdateJudgement(userTriggered);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ProvidesJudgement || hasJudgementResult || judgementOccurred)
|
if (!ProvidesJudgement || judgementFinalized || judgementOccurred)
|
||||||
return judgementOccurred;
|
return judgementOccurred;
|
||||||
|
|
||||||
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||||
@ -170,6 +177,25 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// implies that this check occurred after the end time of <see cref="HitObject"/>. </param>
|
/// implies that this check occurred after the end time of <see cref="HitObject"/>. </param>
|
||||||
protected virtual void CheckForJudgements(bool userTriggered, double timeOffset) { }
|
protected virtual void CheckForJudgements(bool userTriggered, double timeOffset) { }
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
|
||||||
|
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||||
|
|
||||||
|
while (judgements.Count > 0)
|
||||||
|
{
|
||||||
|
var lastJudgement = judgements[judgements.Count - 1];
|
||||||
|
if (lastJudgement.TimeOffset + endTime <= Time.Current)
|
||||||
|
break;
|
||||||
|
|
||||||
|
judgements.RemoveAt(judgements.Count - 1);
|
||||||
|
State.Value = ArmedState.Idle;
|
||||||
|
|
||||||
|
OnJudgementRemoved?.Invoke(this, lastJudgement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
protected override void UpdateAfterChildren()
|
||||||
{
|
{
|
||||||
base.UpdateAfterChildren();
|
base.UpdateAfterChildren();
|
||||||
@ -177,21 +203,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
UpdateJudgement(false);
|
UpdateJudgement(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(AudioManager audio)
|
|
||||||
{
|
|
||||||
foreach (SampleInfo sample in HitObject.Samples)
|
|
||||||
{
|
|
||||||
SampleChannel channel = audio.Sample.Get($@"Gameplay/{sample.Bank}-{sample.Name}");
|
|
||||||
|
|
||||||
if (channel == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
channel.Volume.Value = sample.Volume;
|
|
||||||
Samples.Add(channel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<DrawableHitObject<TObject>> nestedHitObjects;
|
private List<DrawableHitObject<TObject>> nestedHitObjects;
|
||||||
protected IEnumerable<DrawableHitObject<TObject>> NestedHitObjects => nestedHitObjects;
|
protected IEnumerable<DrawableHitObject<TObject>> NestedHitObjects => nestedHitObjects;
|
||||||
|
|
||||||
@ -201,6 +212,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
nestedHitObjects = new List<DrawableHitObject<TObject>>();
|
nestedHitObjects = new List<DrawableHitObject<TObject>>();
|
||||||
|
|
||||||
h.OnJudgement += (d, j) => OnJudgement?.Invoke(d, j);
|
h.OnJudgement += (d, j) => OnJudgement?.Invoke(d, j);
|
||||||
|
h.OnJudgementRemoved += (d, j) => OnJudgementRemoved?.Invoke(d, j);
|
||||||
nestedHitObjects.Add(h);
|
nestedHitObjects.Add(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,13 @@ namespace osu.Game.Rulesets.Replays
|
|||||||
{
|
{
|
||||||
//if we changed frames, we want to execute once *exactly* on the frame's time.
|
//if we changed frames, we want to execute once *exactly* on the frame's time.
|
||||||
if (currentDirection == time.CompareTo(NextFrame.Time) && advanceFrame())
|
if (currentDirection == time.CompareTo(NextFrame.Time) && advanceFrame())
|
||||||
|
{
|
||||||
|
// If going backwards, we need to execute once _before_ the frame time to reverse any judgements
|
||||||
|
// that would occur as a result of this frame in forward playback
|
||||||
|
if (currentDirection == -1)
|
||||||
|
return currentTime = CurrentFrame.Time - 1;
|
||||||
return currentTime = CurrentFrame.Time;
|
return currentTime = CurrentFrame.Time;
|
||||||
|
}
|
||||||
|
|
||||||
//if we didn't change frames, we need to ensure we are allowed to run frames in between, else return null.
|
//if we didn't change frames, we need to ensure we are allowed to run frames in between, else return null.
|
||||||
if (inImportantSection)
|
if (inImportantSection)
|
||||||
|
@ -174,6 +174,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
private double maxBaseScore;
|
private double maxBaseScore;
|
||||||
private double rollingMaxBaseScore;
|
private double rollingMaxBaseScore;
|
||||||
private double baseScore;
|
private double baseScore;
|
||||||
|
private double bonusScore;
|
||||||
|
|
||||||
protected ScoreProcessor()
|
protected ScoreProcessor()
|
||||||
{
|
{
|
||||||
@ -184,6 +185,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
Debug.Assert(base_portion + combo_portion == 1.0);
|
Debug.Assert(base_portion + combo_portion == 1.0);
|
||||||
|
|
||||||
rulesetContainer.OnJudgement += AddJudgement;
|
rulesetContainer.OnJudgement += AddJudgement;
|
||||||
|
rulesetContainer.OnJudgementRemoved += RemoveJudgement;
|
||||||
|
|
||||||
SimulateAutoplay(rulesetContainer.Beatmap);
|
SimulateAutoplay(rulesetContainer.Beatmap);
|
||||||
Reset(true);
|
Reset(true);
|
||||||
@ -212,14 +214,26 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
protected void AddJudgement(Judgement judgement)
|
protected void AddJudgement(Judgement judgement)
|
||||||
{
|
{
|
||||||
OnNewJudgement(judgement);
|
OnNewJudgement(judgement);
|
||||||
NotifyNewJudgement(judgement);
|
updateScore();
|
||||||
|
|
||||||
|
NotifyNewJudgement(judgement);
|
||||||
UpdateFailed();
|
UpdateFailed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void RemoveJudgement(Judgement judgement)
|
||||||
|
{
|
||||||
|
OnJudgementRemoved(judgement);
|
||||||
|
updateScore();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Applies a judgement.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="judgement">The judgement to apply/</param>
|
||||||
protected virtual void OnNewJudgement(Judgement judgement)
|
protected virtual void OnNewJudgement(Judgement judgement)
|
||||||
{
|
{
|
||||||
double bonusScore = 0;
|
judgement.ComboAtJudgement = Combo;
|
||||||
|
judgement.HighestComboAtJudgement = HighestCombo;
|
||||||
|
|
||||||
if (judgement.AffectsCombo)
|
if (judgement.AffectsCombo)
|
||||||
{
|
{
|
||||||
@ -242,7 +256,30 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
}
|
}
|
||||||
else if (judgement.IsHit)
|
else if (judgement.IsHit)
|
||||||
bonusScore += judgement.NumericResult;
|
bonusScore += judgement.NumericResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a judgement. This should reverse everything in <see cref="OnNewJudgement(Judgement)"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="judgement">The judgement to remove.</param>
|
||||||
|
protected virtual void OnJudgementRemoved(Judgement judgement)
|
||||||
|
{
|
||||||
|
Combo.Value = judgement.ComboAtJudgement;
|
||||||
|
HighestCombo.Value = judgement.HighestComboAtJudgement;
|
||||||
|
|
||||||
|
if (judgement.AffectsCombo)
|
||||||
|
{
|
||||||
|
baseScore -= judgement.NumericResult;
|
||||||
|
rollingMaxBaseScore -= judgement.MaxNumericResult;
|
||||||
|
|
||||||
|
Hits--;
|
||||||
|
}
|
||||||
|
else if (judgement.IsHit)
|
||||||
|
bonusScore -= judgement.NumericResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateScore()
|
||||||
|
{
|
||||||
if (rollingMaxBaseScore != 0)
|
if (rollingMaxBaseScore != 0)
|
||||||
Accuracy.Value = baseScore / rollingMaxBaseScore;
|
Accuracy.Value = baseScore / rollingMaxBaseScore;
|
||||||
|
|
||||||
@ -271,6 +308,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
Hits = 0;
|
Hits = 0;
|
||||||
baseScore = 0;
|
baseScore = 0;
|
||||||
rollingMaxBaseScore = 0;
|
rollingMaxBaseScore = 0;
|
||||||
|
bonusScore = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +104,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
where TObject : HitObject
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
public event Action<Judgement> OnJudgement;
|
public event Action<Judgement> OnJudgement;
|
||||||
|
public event Action<Judgement> OnJudgementRemoved;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Beatmap
|
/// The Beatmap
|
||||||
@ -241,6 +242,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
OnJudgement?.Invoke(j);
|
OnJudgement?.Invoke(j);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
drawableObject.OnJudgementRemoved += (d, j) => OnJudgementRemoved?.Invoke(j);
|
||||||
|
|
||||||
Playfield.Add(drawableObject);
|
Playfield.Add(drawableObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
#region Clock control
|
#region Clock control
|
||||||
|
|
||||||
|
protected override bool ShouldProcessClock => false; // We handle processing the clock ourselves
|
||||||
|
|
||||||
private ManualClock clock;
|
private ManualClock clock;
|
||||||
private IFrameBasedClock parentClock;
|
private IFrameBasedClock parentClock;
|
||||||
|
|
||||||
@ -151,6 +153,12 @@ namespace osu.Game.Rulesets.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
requireMoreUpdateLoops = clock.CurrentTime != parentClock.CurrentTime;
|
requireMoreUpdateLoops = clock.CurrentTime != parentClock.CurrentTime;
|
||||||
|
|
||||||
|
// The manual clock time has changed in the above code. The framed clock now needs to be updated
|
||||||
|
// to ensure that the its time is valid for our children before input is processed
|
||||||
|
Clock.ProcessFrame();
|
||||||
|
|
||||||
|
// Process input
|
||||||
base.Update();
|
base.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,12 +2,17 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
|
using OpenTK;
|
||||||
|
using osu.Framework.Screens;
|
||||||
|
|
||||||
namespace osu.Game.Screens
|
namespace osu.Game.Screens
|
||||||
{
|
{
|
||||||
internal class Loader : OsuScreen
|
public class Loader : OsuScreen
|
||||||
{
|
{
|
||||||
|
private bool showDisclaimer;
|
||||||
|
|
||||||
public override bool ShowOverlays => false;
|
public override bool ShowOverlays => false;
|
||||||
|
|
||||||
public Loader()
|
public Loader()
|
||||||
@ -15,13 +20,39 @@ namespace osu.Game.Screens
|
|||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
private void load(OsuGame game)
|
|
||||||
{
|
{
|
||||||
if (game.IsDeployedBuild)
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
|
logo.Triangles = false;
|
||||||
|
logo.Origin = Anchor.BottomRight;
|
||||||
|
logo.Anchor = Anchor.BottomRight;
|
||||||
|
logo.Position = new Vector2(-40);
|
||||||
|
logo.Scale = new Vector2(0.2f);
|
||||||
|
|
||||||
|
logo.FadeInFromZero(5000, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnEntering(Screen last)
|
||||||
|
{
|
||||||
|
base.OnEntering(last);
|
||||||
|
|
||||||
|
if (showDisclaimer)
|
||||||
LoadComponentAsync(new Disclaimer(), d => Push(d));
|
LoadComponentAsync(new Disclaimer(), d => Push(d));
|
||||||
else
|
else
|
||||||
LoadComponentAsync(new Intro(), d => Push(d));
|
LoadComponentAsync(new Intro(), d => Push(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LogoSuspending(OsuLogo logo)
|
||||||
|
{
|
||||||
|
base.LogoSuspending(logo);
|
||||||
|
logo.FadeOut(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuGameBase game)
|
||||||
|
{
|
||||||
|
showDisclaimer = game.IsDeployedBuild;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,12 +39,25 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
//todo: make these non-internal somehow.
|
//todo: make these non-internal somehow.
|
||||||
internal const float BUTTON_AREA_HEIGHT = 100;
|
internal const float BUTTON_AREA_HEIGHT = 100;
|
||||||
|
|
||||||
internal const float BUTTON_WIDTH = 140f;
|
internal const float BUTTON_WIDTH = 140f;
|
||||||
internal const float WEDGE_WIDTH = 20;
|
internal const float WEDGE_WIDTH = 20;
|
||||||
|
|
||||||
public const int EXIT_DELAY = 3000;
|
private OsuLogo logo;
|
||||||
|
|
||||||
|
public void SetOsuLogo(OsuLogo logo)
|
||||||
|
{
|
||||||
|
this.logo = logo;
|
||||||
|
|
||||||
|
if (this.logo != null)
|
||||||
|
{
|
||||||
|
this.logo.Action = onOsuLogo;
|
||||||
|
|
||||||
|
// osuLogo.SizeForFlow relies on loading to be complete.
|
||||||
|
buttonFlow.Position = new Vector2(WEDGE_WIDTH * 2 - (BUTTON_WIDTH + this.logo.SizeForFlow / 4), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private readonly OsuLogo osuLogo;
|
|
||||||
private readonly Drawable iconFacade;
|
private readonly Drawable iconFacade;
|
||||||
private readonly Container buttonArea;
|
private readonly Container buttonArea;
|
||||||
private readonly Box buttonAreaBackground;
|
private readonly Box buttonAreaBackground;
|
||||||
@ -99,12 +112,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
osuLogo = new OsuLogo
|
|
||||||
{
|
|
||||||
Action = onOsuLogo,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
buttonsPlay.Add(new Button(@"solo", @"select-6", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
|
buttonsPlay.Add(new Button(@"solo", @"select-6", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
|
||||||
@ -127,14 +134,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
sampleBack = audio.Sample.Get(@"Menu/select-4");
|
sampleBack = audio.Sample.Get(@"Menu/select-4");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
// osuLogo.SizeForFlow relies on loading to be complete.
|
|
||||||
buttonFlow.Position = new Vector2(WEDGE_WIDTH * 2 - (BUTTON_WIDTH + osuLogo.SizeForFlow / 4), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.Repeat) return false;
|
if (args.Repeat) return false;
|
||||||
@ -142,7 +141,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
switch (args.Key)
|
switch (args.Key)
|
||||||
{
|
{
|
||||||
case Key.Space:
|
case Key.Space:
|
||||||
osuLogo.TriggerOnClick(state);
|
logo?.TriggerOnClick(state);
|
||||||
return true;
|
return true;
|
||||||
case Key.Escape:
|
case Key.Escape:
|
||||||
switch (State)
|
switch (State)
|
||||||
@ -215,24 +214,31 @@ namespace osu.Game.Screens.Menu
|
|||||||
backButton.ContractStyle = 0;
|
backButton.ContractStyle = 0;
|
||||||
settingsButton.ContractStyle = 0;
|
settingsButton.ContractStyle = 0;
|
||||||
|
|
||||||
bool fromInitial = lastState == MenuState.Initial;
|
|
||||||
|
|
||||||
if (state == MenuState.TopLevel)
|
if (state == MenuState.TopLevel)
|
||||||
buttonArea.FinishTransforms(true);
|
buttonArea.FinishTransforms(true);
|
||||||
|
|
||||||
using (buttonArea.BeginDelayedSequence(fromInitial ? 150 : 0, true))
|
using (buttonArea.BeginDelayedSequence(lastState == MenuState.Initial ? 150 : 0, true))
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case MenuState.Exit:
|
case MenuState.Exit:
|
||||||
case MenuState.Initial:
|
case MenuState.Initial:
|
||||||
|
trackingPosition = false;
|
||||||
|
|
||||||
buttonAreaBackground.ScaleTo(Vector2.One, 500, Easing.Out);
|
buttonAreaBackground.ScaleTo(Vector2.One, 500, Easing.Out);
|
||||||
buttonArea.FadeOut(300);
|
buttonArea.FadeOut(300);
|
||||||
|
|
||||||
osuLogo.Delay(150)
|
logo?.Delay(150)
|
||||||
.Schedule(() => toolbar?.Hide())
|
.Schedule(() =>
|
||||||
.ScaleTo(1, 800, Easing.OutExpo)
|
{
|
||||||
.MoveTo(Vector2.Zero, 800, Easing.OutExpo);
|
toolbar?.Hide();
|
||||||
|
|
||||||
|
logo.ClearTransforms(targetMember: nameof(Position));
|
||||||
|
logo.RelativePositionAxes = Axes.Both;
|
||||||
|
|
||||||
|
logo.MoveTo(new Vector2(0.5f), 800, Easing.OutExpo);
|
||||||
|
logo.ScaleTo(1, 800, Easing.OutExpo);
|
||||||
|
});
|
||||||
|
|
||||||
foreach (Button b in buttonsTopLevel)
|
foreach (Button b in buttonsTopLevel)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
@ -240,27 +246,38 @@ namespace osu.Game.Screens.Menu
|
|||||||
foreach (Button b in buttonsPlay)
|
foreach (Button b in buttonsPlay)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
|
|
||||||
if (state == MenuState.Exit)
|
if (state != MenuState.Exit && lastState == MenuState.TopLevel)
|
||||||
{
|
|
||||||
osuLogo.RotateTo(20, EXIT_DELAY * 1.5f);
|
|
||||||
osuLogo.FadeOut(EXIT_DELAY);
|
|
||||||
}
|
|
||||||
else if (lastState == MenuState.TopLevel)
|
|
||||||
sampleBack?.Play();
|
sampleBack?.Play();
|
||||||
break;
|
break;
|
||||||
case MenuState.TopLevel:
|
case MenuState.TopLevel:
|
||||||
buttonAreaBackground.ScaleTo(Vector2.One, 200, Easing.Out);
|
buttonAreaBackground.ScaleTo(Vector2.One, 200, Easing.Out);
|
||||||
|
|
||||||
var sequence = osuLogo
|
logo.ClearTransforms(targetMember: nameof(Position));
|
||||||
.ScaleTo(0.5f, 200, Easing.In)
|
logo.RelativePositionAxes = Axes.None;
|
||||||
.MoveTo(buttonFlow.DrawPosition, 200, Easing.In);
|
|
||||||
|
|
||||||
if (fromInitial && osuLogo.Scale.X > 0.5f)
|
trackingPosition = true;
|
||||||
sequence.OnComplete(o =>
|
|
||||||
{
|
switch (lastState)
|
||||||
o.Impact();
|
{
|
||||||
toolbar?.Show();
|
case MenuState.Initial:
|
||||||
});
|
logo.ScaleTo(0.5f, 200, Easing.In);
|
||||||
|
|
||||||
|
trackingPosition = false;
|
||||||
|
|
||||||
|
logo
|
||||||
|
.MoveTo(iconTrackingPosition, lastState == MenuState.EnteringMode ? 0 : 200, Easing.In)
|
||||||
|
.OnComplete(o =>
|
||||||
|
{
|
||||||
|
trackingPosition = true;
|
||||||
|
|
||||||
|
o.Impact();
|
||||||
|
toolbar?.Show();
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
logo.ScaleTo(0.5f, 200, Easing.OutQuint);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
buttonArea.FadeIn(300);
|
buttonArea.FadeIn(300);
|
||||||
|
|
||||||
@ -280,6 +297,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
case MenuState.EnteringMode:
|
case MenuState.EnteringMode:
|
||||||
buttonAreaBackground.ScaleTo(new Vector2(2, 0), 300, Easing.InSine);
|
buttonAreaBackground.ScaleTo(new Vector2(2, 0), 300, Easing.InSine);
|
||||||
|
|
||||||
|
trackingPosition = true;
|
||||||
|
|
||||||
buttonsTopLevel.ForEach(b => b.ContractStyle = 1);
|
buttonsTopLevel.ForEach(b => b.ContractStyle = 1);
|
||||||
buttonsPlay.ForEach(b => b.ContractStyle = 1);
|
buttonsPlay.ForEach(b => b.ContractStyle = 1);
|
||||||
backButton.ContractStyle = 1;
|
backButton.ContractStyle = 1;
|
||||||
@ -301,15 +320,24 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Vector2 iconTrackingPosition => logo.Parent.ToLocalSpace(iconFacade.ScreenSpaceDrawQuad.Centre);
|
||||||
|
|
||||||
|
private bool trackingPosition;
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
//if (OsuGame.IdleTime > 6000 && State != MenuState.Exit)
|
//if (OsuGame.IdleTime > 6000 && State != MenuState.Exit)
|
||||||
// State = MenuState.Initial;
|
// State = MenuState.Initial;
|
||||||
|
|
||||||
osuLogo.Interactive = Alpha > 0.2f;
|
|
||||||
|
|
||||||
iconFacade.Width = osuLogo.SizeForFlow * 0.5f;
|
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
|
if (logo != null)
|
||||||
|
{
|
||||||
|
if (trackingPosition)
|
||||||
|
logo.Position = iconTrackingPosition;
|
||||||
|
|
||||||
|
iconFacade.Width = logo.SizeForFlow * 0.5f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,13 +14,14 @@ using osu.Game.Beatmaps.IO;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
{
|
{
|
||||||
public class Intro : OsuScreen
|
public class Intro : OsuScreen
|
||||||
{
|
{
|
||||||
private readonly OsuLogo logo;
|
private readonly IntroSequence introSequence;
|
||||||
|
|
||||||
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
|
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
|
||||||
|
|
||||||
@ -39,32 +40,10 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenEmpty();
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenEmpty();
|
||||||
|
|
||||||
public Intro()
|
|
||||||
{
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new ParallaxContainer
|
|
||||||
{
|
|
||||||
ParallaxAmount = 0.01f,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
logo = new OsuLogo
|
|
||||||
{
|
|
||||||
Alpha = 0,
|
|
||||||
Triangles = false,
|
|
||||||
Blending = BlendingMode.Additive,
|
|
||||||
Interactive = false,
|
|
||||||
Colour = Color4.DarkGray,
|
|
||||||
Ripple = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private Bindable<bool> menuVoice;
|
private Bindable<bool> menuVoice;
|
||||||
private Bindable<bool> menuMusic;
|
private Bindable<bool> menuMusic;
|
||||||
private Track track;
|
private Track track;
|
||||||
|
private readonly ParallaxContainer parallax;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
||||||
@ -123,14 +102,46 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
DidLoadMenu = true;
|
DidLoadMenu = true;
|
||||||
Push(mainMenu);
|
Push(mainMenu);
|
||||||
}, 2300);
|
}, delay_step_one);
|
||||||
}, 600);
|
}, delay_step_two);
|
||||||
|
}
|
||||||
|
|
||||||
logo.ScaleTo(0.4f);
|
private const double delay_step_one = 2300;
|
||||||
logo.FadeOut();
|
private const double delay_step_two = 600;
|
||||||
|
|
||||||
logo.ScaleTo(1, 4400, Easing.OutQuint);
|
public const int EXIT_DELAY = 3000;
|
||||||
logo.FadeIn(20000, Easing.OutQuint);
|
|
||||||
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
{
|
||||||
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
|
logo.RelativePositionAxes = Axes.Both;
|
||||||
|
logo.Colour = Color4.White;
|
||||||
|
logo.Ripple = false;
|
||||||
|
|
||||||
|
const int quick_appear = 350;
|
||||||
|
|
||||||
|
int initialMovementTime = logo.Alpha > 0.2f ? quick_appear : 0;
|
||||||
|
|
||||||
|
logo.MoveTo(new Vector2(0.5f), initialMovementTime, Easing.OutQuint);
|
||||||
|
|
||||||
|
if (!resuming)
|
||||||
|
{
|
||||||
|
logo.ScaleTo(1);
|
||||||
|
logo.FadeIn();
|
||||||
|
logo.PlayIntro();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logo.Triangles = false;
|
||||||
|
|
||||||
|
logo
|
||||||
|
.ScaleTo(1, initialMovementTime, Easing.OutQuint)
|
||||||
|
.FadeIn(quick_appear, Easing.OutQuint)
|
||||||
|
.Then()
|
||||||
|
.RotateTo(20, EXIT_DELAY * 1.5f)
|
||||||
|
.FadeOut(EXIT_DELAY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnSuspending(Screen next)
|
protected override void OnSuspending(Screen next)
|
||||||
@ -150,7 +161,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (!(last is MainMenu))
|
if (!(last is MainMenu))
|
||||||
Content.FadeIn(300);
|
Content.FadeIn(300);
|
||||||
|
|
||||||
double fadeOutTime = 2000;
|
double fadeOutTime = EXIT_DELAY;
|
||||||
//we also handle the exit transition.
|
//we also handle the exit transition.
|
||||||
if (menuVoice)
|
if (menuVoice)
|
||||||
seeya.Play();
|
seeya.Play();
|
||||||
|
297
osu.Game/Screens/Menu/IntroSequence.cs
Normal file
297
osu.Game/Screens/Menu/IntroSequence.cs
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Menu
|
||||||
|
{
|
||||||
|
public class IntroSequence : Container
|
||||||
|
{
|
||||||
|
private const float logo_size = 460; //todo: this should probably be 480
|
||||||
|
|
||||||
|
private OsuSpriteText welcomeText;
|
||||||
|
|
||||||
|
private Container<Box> lines;
|
||||||
|
|
||||||
|
private Box lineTopLeft;
|
||||||
|
private Box lineBottomLeft;
|
||||||
|
private Box lineTopRight;
|
||||||
|
private Box lineBottomRight;
|
||||||
|
|
||||||
|
private Ring smallRing;
|
||||||
|
private Ring mediumRing;
|
||||||
|
private Ring bigRing;
|
||||||
|
|
||||||
|
private Box backgroundFill;
|
||||||
|
private Box foregroundFill;
|
||||||
|
|
||||||
|
private CircularContainer pinkCircle;
|
||||||
|
private CircularContainer blueCircle;
|
||||||
|
private CircularContainer yellowCircle;
|
||||||
|
private CircularContainer purpleCircle;
|
||||||
|
|
||||||
|
public IntroSequence()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
const int line_offset = 80;
|
||||||
|
const int circle_offset = 250;
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
lines = new Container<Box>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Children = new []
|
||||||
|
{
|
||||||
|
lineTopLeft = new Box
|
||||||
|
{
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Position = new Vector2(-line_offset, -line_offset),
|
||||||
|
Rotation = 45,
|
||||||
|
Colour = Color4.White.Opacity(180),
|
||||||
|
},
|
||||||
|
lineTopRight = new Box
|
||||||
|
{
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Position = new Vector2(line_offset, -line_offset),
|
||||||
|
Rotation = -45,
|
||||||
|
Colour = Color4.White.Opacity(80),
|
||||||
|
},
|
||||||
|
lineBottomLeft = new Box
|
||||||
|
{
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Position = new Vector2(-line_offset, line_offset),
|
||||||
|
Rotation = -45,
|
||||||
|
Colour = Color4.White.Opacity(230),
|
||||||
|
},
|
||||||
|
lineBottomRight = new Box
|
||||||
|
{
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Position = new Vector2(line_offset, line_offset),
|
||||||
|
Rotation = 45,
|
||||||
|
Colour = Color4.White.Opacity(130),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
bigRing = new Ring(OsuColour.FromHex(@"B6C5E9"), 0.85f),
|
||||||
|
mediumRing = new Ring(Color4.White.Opacity(130), 0.7f),
|
||||||
|
smallRing = new Ring(Color4.White, 0.6f),
|
||||||
|
welcomeText = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Text = "welcome",
|
||||||
|
Padding = new MarginPadding { Bottom = 10 },
|
||||||
|
Font = @"Exo2.0-Light",
|
||||||
|
Alpha = 0,
|
||||||
|
TextSize = 42,
|
||||||
|
Spacing = new Vector2(5),
|
||||||
|
},
|
||||||
|
new CircularContainer
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Size = new Vector2(logo_size),
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
backgroundFill = new Box
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Height = 0,
|
||||||
|
Colour = OsuColour.FromHex(@"C6D8FF").Opacity(160),
|
||||||
|
},
|
||||||
|
foregroundFill = new Box
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Size = Vector2.Zero,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Width = 0,
|
||||||
|
Colour = Color4.White,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
purpleCircle = new Circle
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Position = new Vector2(0, circle_offset),
|
||||||
|
Colour = OsuColour.FromHex(@"AA92FF"),
|
||||||
|
},
|
||||||
|
blueCircle = new Circle
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
Position = new Vector2(-circle_offset, 0),
|
||||||
|
Colour = OsuColour.FromHex(@"8FE5FE"),
|
||||||
|
},
|
||||||
|
yellowCircle = new Circle
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
Position = new Vector2(0, -circle_offset),
|
||||||
|
Colour = OsuColour.FromHex(@"FFD64C"),
|
||||||
|
},
|
||||||
|
pinkCircle = new Circle
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Position = new Vector2(circle_offset, 0),
|
||||||
|
Colour = OsuColour.FromHex(@"e967a1"),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var line in lines)
|
||||||
|
{
|
||||||
|
line.Size = new Vector2(105, 1.5f);
|
||||||
|
line.Alpha = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Scale = new Vector2(0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start(double length)
|
||||||
|
{
|
||||||
|
if (Children.Any())
|
||||||
|
{
|
||||||
|
// restart if we were already run previously.
|
||||||
|
FinishTransforms(true);
|
||||||
|
load();
|
||||||
|
}
|
||||||
|
|
||||||
|
smallRing.ResizeTo(logo_size * 0.086f, 400, Easing.InOutQuint);
|
||||||
|
|
||||||
|
mediumRing.ResizeTo(130, 340, Easing.OutQuad);
|
||||||
|
mediumRing.Foreground.ResizeTo(1, 880, Easing.Out);
|
||||||
|
|
||||||
|
Func<double> remainingTime = () => length - TransformDelay;
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(250, true))
|
||||||
|
{
|
||||||
|
welcomeText.FadeIn(700);
|
||||||
|
welcomeText.TransformSpacingTo(new Vector2(20, 0), remainingTime(), Easing.Out);
|
||||||
|
|
||||||
|
const int line_duration = 700;
|
||||||
|
const int line_resize = 150;
|
||||||
|
|
||||||
|
foreach (var line in lines)
|
||||||
|
{
|
||||||
|
line.FadeIn(40).ResizeWidthTo(0, line_duration - line_resize, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
const int line_end_offset = 120;
|
||||||
|
|
||||||
|
smallRing.Foreground.ResizeTo(1, line_duration, Easing.OutQuint);
|
||||||
|
|
||||||
|
lineTopLeft.MoveTo(new Vector2(-line_end_offset, -line_end_offset), line_duration, Easing.OutQuint);
|
||||||
|
lineTopRight.MoveTo(new Vector2(line_end_offset, -line_end_offset), line_duration, Easing.OutQuint);
|
||||||
|
lineBottomLeft.MoveTo(new Vector2(-line_end_offset, line_end_offset), line_duration, Easing.OutQuint);
|
||||||
|
lineBottomRight.MoveTo(new Vector2(line_end_offset, line_end_offset), line_duration, Easing.OutQuint);
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(length * 0.56, true))
|
||||||
|
{
|
||||||
|
bigRing.ResizeTo(logo_size, 500, Easing.InOutQuint);
|
||||||
|
bigRing.Foreground.Delay(250).ResizeTo(1, 850, Easing.OutQuint);
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(250, true))
|
||||||
|
{
|
||||||
|
backgroundFill.ResizeHeightTo(1, remainingTime(), Easing.InOutQuart);
|
||||||
|
backgroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart);
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(50, true))
|
||||||
|
{
|
||||||
|
foregroundFill.ResizeWidthTo(1, remainingTime(), Easing.InOutQuart);
|
||||||
|
foregroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ScaleTo(1, remainingTime(), Easing.InOutCubic);
|
||||||
|
|
||||||
|
const float circle_size = logo_size * 0.9f;
|
||||||
|
|
||||||
|
const int rotation_delay = 110;
|
||||||
|
const int appear_delay = 80;
|
||||||
|
|
||||||
|
purpleCircle.MoveToY(circle_size / 2, remainingTime(), Easing.InOutQuart);
|
||||||
|
purpleCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart);
|
||||||
|
purpleCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart);
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(appear_delay, true))
|
||||||
|
{
|
||||||
|
yellowCircle.MoveToY(-circle_size / 2, remainingTime(), Easing.InOutQuart);
|
||||||
|
yellowCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart);
|
||||||
|
yellowCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart);
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(appear_delay, true))
|
||||||
|
{
|
||||||
|
blueCircle.MoveToX(-circle_size / 2, remainingTime(), Easing.InOutQuart);
|
||||||
|
blueCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart);
|
||||||
|
blueCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart);
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(appear_delay, true))
|
||||||
|
{
|
||||||
|
pinkCircle.MoveToX(circle_size / 2, remainingTime(), Easing.InOutQuart);
|
||||||
|
pinkCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart);
|
||||||
|
pinkCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Ring : Container<Circle>
|
||||||
|
{
|
||||||
|
public readonly Circle Foreground;
|
||||||
|
|
||||||
|
public Ring(Color4 ringColour, float foregroundSize)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new Circle
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Scale = new Vector2(0.98f),
|
||||||
|
Colour = ringColour,
|
||||||
|
},
|
||||||
|
Foreground = new Circle
|
||||||
|
{
|
||||||
|
Size = new Vector2(foregroundSize),
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -19,7 +19,7 @@ using osu.Framework.Allocation;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.Menu
|
namespace osu.Game.Screens.Menu
|
||||||
{
|
{
|
||||||
internal class LogoVisualisation : Drawable, IHasAccentColour
|
public class LogoVisualisation : Drawable, IHasAccentColour
|
||||||
{
|
{
|
||||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -58,13 +59,16 @@ namespace osu.Game.Screens.Menu
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuGame game)
|
private void load(OsuGame game = null)
|
||||||
{
|
{
|
||||||
LoadComponentAsync(background);
|
LoadComponentAsync(background);
|
||||||
|
|
||||||
buttons.OnSettings = game.ToggleSettings;
|
if (game != null)
|
||||||
buttons.OnDirect = game.ToggleDirect;
|
{
|
||||||
|
buttons.OnSettings = game.ToggleSettings;
|
||||||
|
buttons.OnDirect = game.ToggleDirect;
|
||||||
|
}
|
||||||
|
|
||||||
preloadSongSelect();
|
preloadSongSelect();
|
||||||
}
|
}
|
||||||
@ -102,6 +106,35 @@ namespace osu.Game.Screens.Menu
|
|||||||
Beatmap.ValueChanged += beatmap_ValueChanged;
|
Beatmap.ValueChanged += beatmap_ValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
{
|
||||||
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
|
buttons.SetOsuLogo(logo);
|
||||||
|
|
||||||
|
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
|
||||||
|
logo.FadeIn(100, Easing.OutQuint);
|
||||||
|
|
||||||
|
if (resuming)
|
||||||
|
{
|
||||||
|
buttons.State = MenuState.TopLevel;
|
||||||
|
|
||||||
|
const float length = 300;
|
||||||
|
|
||||||
|
Content.FadeIn(length, Easing.OutQuint);
|
||||||
|
Content.MoveTo(new Vector2(0, 0), length, Easing.OutQuint);
|
||||||
|
|
||||||
|
sideFlashes.Delay(length).FadeIn(64, Easing.InQuint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LogoSuspending(OsuLogo logo)
|
||||||
|
{
|
||||||
|
logo.FadeOut(300, Easing.InSine)
|
||||||
|
.ScaleTo(0.2f, 300, Easing.InSine)
|
||||||
|
.OnComplete(l => buttons.SetOsuLogo(null));
|
||||||
|
}
|
||||||
|
|
||||||
private void beatmap_ValueChanged(WorkingBeatmap newValue)
|
private void beatmap_ValueChanged(WorkingBeatmap newValue)
|
||||||
{
|
{
|
||||||
if (!IsCurrentScreen)
|
if (!IsCurrentScreen)
|
||||||
@ -121,7 +154,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
Content.FadeOut(length, Easing.InSine);
|
Content.FadeOut(length, Easing.InSine);
|
||||||
Content.MoveTo(new Vector2(-800, 0), length, Easing.InSine);
|
Content.MoveTo(new Vector2(-800, 0), length, Easing.InSine);
|
||||||
|
|
||||||
sideFlashes.FadeOut(length / 4, Easing.OutQuint);
|
sideFlashes.FadeOut(64, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnResuming(Screen last)
|
protected override void OnResuming(Screen last)
|
||||||
@ -132,15 +165,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
//we may have consumed our preloaded instance, so let's make another.
|
//we may have consumed our preloaded instance, so let's make another.
|
||||||
preloadSongSelect();
|
preloadSongSelect();
|
||||||
|
|
||||||
const float length = 300;
|
|
||||||
|
|
||||||
buttons.State = MenuState.TopLevel;
|
|
||||||
|
|
||||||
Content.FadeIn(length, Easing.OutQuint);
|
|
||||||
Content.MoveTo(new Vector2(0, 0), length, Easing.OutQuint);
|
|
||||||
|
|
||||||
sideFlashes.FadeIn(length / 4, Easing.InQuint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
|
@ -29,6 +29,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
public readonly Color4 OsuPink = OsuColour.FromHex(@"e967a1");
|
public readonly Color4 OsuPink = OsuColour.FromHex(@"e967a1");
|
||||||
|
|
||||||
|
private const double transition_length = 300;
|
||||||
|
|
||||||
private readonly Sprite logo;
|
private readonly Sprite logo;
|
||||||
private readonly CircularContainer logoContainer;
|
private readonly CircularContainer logoContainer;
|
||||||
private readonly Container logoBounceContainer;
|
private readonly Container logoBounceContainer;
|
||||||
@ -37,6 +39,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
private readonly Container logoHoverContainer;
|
private readonly Container logoHoverContainer;
|
||||||
private readonly LogoVisualisation visualizer;
|
private readonly LogoVisualisation visualizer;
|
||||||
|
|
||||||
|
private readonly IntroSequence intro;
|
||||||
|
|
||||||
private SampleChannel sampleClick;
|
private SampleChannel sampleClick;
|
||||||
private SampleChannel sampleBeat;
|
private SampleChannel sampleBeat;
|
||||||
|
|
||||||
@ -54,7 +58,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public bool Triangles
|
public bool Triangles
|
||||||
{
|
{
|
||||||
set { colourAndTriangles.Alpha = value ? 1 : 0; }
|
set { colourAndTriangles.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => logoContainer.ReceiveMouseInputAt(screenSpacePos);
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => logoContainer.ReceiveMouseInputAt(screenSpacePos);
|
||||||
@ -62,10 +66,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
public bool Ripple
|
public bool Ripple
|
||||||
{
|
{
|
||||||
get { return rippleContainer.Alpha > 0; }
|
get { return rippleContainer.Alpha > 0; }
|
||||||
set { rippleContainer.Alpha = value ? 1 : 0; }
|
set { rippleContainer.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Interactive = true;
|
|
||||||
private readonly Box flashLayer;
|
private readonly Box flashLayer;
|
||||||
|
|
||||||
private readonly Container impactContainer;
|
private readonly Container impactContainer;
|
||||||
@ -76,17 +79,23 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public OsuLogo()
|
public OsuLogo()
|
||||||
{
|
{
|
||||||
|
// Required to make Schedule calls run in OsuScreen even when we are not visible.
|
||||||
|
AlwaysPresent = true;
|
||||||
|
|
||||||
EarlyActivationMilliseconds = early_activation;
|
EarlyActivationMilliseconds = early_activation;
|
||||||
|
|
||||||
Size = new Vector2(default_size);
|
Size = new Vector2(default_size);
|
||||||
|
|
||||||
Anchor = Anchor.Centre;
|
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
intro = new IntroSequence
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
},
|
||||||
logoHoverContainer = new Container
|
logoHoverContainer = new Container
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
@ -212,6 +221,30 @@ namespace osu.Game.Screens.Menu
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Schedule a new extenral animation. Handled queueing and finishing previous animations in a sane way.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="action">The animation to be performed</param>
|
||||||
|
/// <param name="waitForPrevious">If true, the new animation is delayed until all previous transforms finish. If false, existing transformed are cleared.</param>
|
||||||
|
internal void AppendAnimatingAction(Action action, bool waitForPrevious)
|
||||||
|
{
|
||||||
|
Action runnableAction = () =>
|
||||||
|
{
|
||||||
|
if (waitForPrevious)
|
||||||
|
this.DelayUntilTransformsFinished().Schedule(action);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ClearTransforms();
|
||||||
|
action();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (IsLoaded)
|
||||||
|
runnableAction();
|
||||||
|
else
|
||||||
|
Schedule(() => runnableAction());
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures, AudioManager audio)
|
private void load(TextureStore textures, AudioManager audio)
|
||||||
{
|
{
|
||||||
@ -266,6 +299,17 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PlayIntro()
|
||||||
|
{
|
||||||
|
const double length = 3150;
|
||||||
|
const double fade = 200;
|
||||||
|
|
||||||
|
logoHoverContainer.FadeOut().Delay(length).FadeIn(fade);
|
||||||
|
intro.Show();
|
||||||
|
intro.Start(length);
|
||||||
|
intro.Delay(length + fade).FadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
@ -290,9 +334,11 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool interactive => Action != null && Alpha > 0.2f;
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
{
|
{
|
||||||
if (!Interactive) return false;
|
if (!interactive) return false;
|
||||||
|
|
||||||
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
|
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
|
||||||
return true;
|
return true;
|
||||||
@ -306,7 +352,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
{
|
{
|
||||||
if (!Interactive) return false;
|
if (!interactive) return false;
|
||||||
|
|
||||||
sampleClick.Play();
|
sampleClick.Play();
|
||||||
|
|
||||||
@ -320,7 +366,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
if (!Interactive) return false;
|
if (!interactive) return false;
|
||||||
|
|
||||||
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
|
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
|
||||||
return true;
|
return true;
|
||||||
|
@ -10,7 +10,9 @@ using osu.Game.Graphics.Containers;
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
|
|
||||||
namespace osu.Game.Screens
|
namespace osu.Game.Screens
|
||||||
{
|
{
|
||||||
@ -30,6 +32,8 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
public virtual bool HasLocalCursorDisplayed => false;
|
public virtual bool HasLocalCursorDisplayed => false;
|
||||||
|
|
||||||
|
private OsuLogo logo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the beatmap or ruleset should be allowed to be changed by the user or game.
|
/// Whether the beatmap or ruleset should be allowed to be changed by the user or game.
|
||||||
/// Used to mark exclusive areas where this is strongly prohibited, like gameplay.
|
/// Used to mark exclusive areas where this is strongly prohibited, like gameplay.
|
||||||
@ -72,9 +76,16 @@ namespace osu.Game.Screens
|
|||||||
protected override void OnResuming(Screen last)
|
protected override void OnResuming(Screen last)
|
||||||
{
|
{
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
|
logo.AppendAnimatingAction(() => LogoArriving(logo, true), true);
|
||||||
sampleExit?.Play();
|
sampleExit?.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnSuspending(Screen next)
|
||||||
|
{
|
||||||
|
base.OnSuspending(next);
|
||||||
|
onSuspendingLogo();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
protected override void OnEntering(Screen last)
|
||||||
{
|
{
|
||||||
OsuScreen lastOsu = last as OsuScreen;
|
OsuScreen lastOsu = last as OsuScreen;
|
||||||
@ -106,11 +117,19 @@ namespace osu.Game.Screens
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((logo = lastOsu?.logo) == null)
|
||||||
|
LoadComponentAsync(logo = new OsuLogo { Alpha = 0 }, AddInternal);
|
||||||
|
|
||||||
|
logo.AppendAnimatingAction(() => LogoArriving(logo, false), true);
|
||||||
|
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
protected override bool OnExiting(Screen next)
|
||||||
{
|
{
|
||||||
|
if (ValidForResume && logo != null)
|
||||||
|
onExitingLogo();
|
||||||
|
|
||||||
OsuScreen nextOsu = next as OsuScreen;
|
OsuScreen nextOsu = next as OsuScreen;
|
||||||
|
|
||||||
if (Background != null && !Background.Equals(nextOsu?.Background))
|
if (Background != null && !Background.Equals(nextOsu?.Background))
|
||||||
@ -128,5 +147,43 @@ namespace osu.Game.Screens
|
|||||||
Beatmap.UnbindAll();
|
Beatmap.UnbindAll();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fired when this screen was entered or resumed and the logo state is required to be adjusted.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
{
|
||||||
|
logo.Action = null;
|
||||||
|
logo.FadeOut(300, Easing.OutQuint);
|
||||||
|
logo.Anchor = Anchor.TopLeft;
|
||||||
|
logo.Origin = Anchor.Centre;
|
||||||
|
logo.RelativePositionAxes = Axes.None;
|
||||||
|
logo.Triangles = true;
|
||||||
|
logo.Ripple = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onExitingLogo()
|
||||||
|
{
|
||||||
|
logo.AppendAnimatingAction(() => { LogoExiting(logo); }, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fired when this screen was exited to add any outwards transition to the logo.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void LogoExiting(OsuLogo logo)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onSuspendingLogo()
|
||||||
|
{
|
||||||
|
logo.AppendAnimatingAction(() => { LogoSuspending(logo); }, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fired when this screen was suspended to add any outwards transition to the logo.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void LogoSuspending(OsuLogo logo)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.BreaksOverlay
|
namespace osu.Game.Screens.Play.BreaksOverlay
|
||||||
{
|
{
|
||||||
@ -30,6 +31,8 @@ namespace osu.Game.Screens.Play.BreaksOverlay
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool RemoveCompletedTransforms => false;
|
||||||
|
|
||||||
private readonly bool letterboxing;
|
private readonly bool letterboxing;
|
||||||
private readonly LetterboxOverlay letterboxOverlay;
|
private readonly LetterboxOverlay letterboxOverlay;
|
||||||
private readonly Container remainingTimeAdjustmentBox;
|
private readonly Container remainingTimeAdjustmentBox;
|
||||||
@ -101,38 +104,41 @@ namespace osu.Game.Screens.Play.BreaksOverlay
|
|||||||
if (!b.HasEffect)
|
if (!b.HasEffect)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
using (BeginAbsoluteSequence(b.StartTime, true))
|
||||||
|
{
|
||||||
|
remainingTimeAdjustmentBox
|
||||||
|
.ResizeWidthTo(remaining_time_container_max_size, fade_duration, Easing.OutQuint)
|
||||||
|
.Delay(b.Duration - fade_duration)
|
||||||
|
.ResizeWidthTo(0);
|
||||||
|
|
||||||
|
remainingTimeBox
|
||||||
|
.ResizeWidthTo(0, b.Duration - fade_duration)
|
||||||
|
.Then()
|
||||||
|
.ResizeWidthTo(1);
|
||||||
|
|
||||||
|
remainingTimeCounter.CountTo(b.Duration).CountTo(0, b.Duration);
|
||||||
|
}
|
||||||
|
|
||||||
using (BeginAbsoluteSequence(b.StartTime))
|
using (BeginAbsoluteSequence(b.StartTime))
|
||||||
{
|
{
|
||||||
Schedule(() => onBreakIn(b));
|
Schedule(showBreak);
|
||||||
using (BeginDelayedSequence(b.Duration - fade_duration))
|
using (BeginDelayedSequence(b.Duration - fade_duration))
|
||||||
Schedule(onBreakOut);
|
Schedule(hideBreak);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onBreakIn(BreakPeriod b)
|
private void showBreak()
|
||||||
{
|
{
|
||||||
if (letterboxing)
|
if (letterboxing)
|
||||||
letterboxOverlay.Show();
|
letterboxOverlay.Show();
|
||||||
|
|
||||||
remainingTimeAdjustmentBox
|
|
||||||
.ResizeWidthTo(remaining_time_container_max_size, fade_duration, Easing.OutQuint)
|
|
||||||
.Delay(b.Duration - fade_duration)
|
|
||||||
.ResizeWidthTo(0);
|
|
||||||
|
|
||||||
remainingTimeBox
|
|
||||||
.ResizeWidthTo(0, b.Duration - fade_duration)
|
|
||||||
.Then()
|
|
||||||
.ResizeWidthTo(1);
|
|
||||||
|
|
||||||
remainingTimeCounter.StartCounting(b.EndTime);
|
|
||||||
|
|
||||||
remainingTimeCounter.Show();
|
remainingTimeCounter.Show();
|
||||||
info.Show();
|
info.Show();
|
||||||
arrowsOverlay.Show();
|
arrowsOverlay.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onBreakOut()
|
private void hideBreak()
|
||||||
{
|
{
|
||||||
if (letterboxing)
|
if (letterboxing)
|
||||||
letterboxOverlay.Hide();
|
letterboxOverlay.Hide();
|
||||||
|
@ -1,65 +1,37 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using System;
|
using System;
|
||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.BreaksOverlay
|
namespace osu.Game.Screens.Play.BreaksOverlay
|
||||||
{
|
{
|
||||||
public class RemainingTimeCounter : VisibilityContainer
|
public class RemainingTimeCounter : Counter
|
||||||
{
|
{
|
||||||
private const double fade_duration = BreakPeriod.MIN_BREAK_DURATION / 2;
|
private const double fade_duration = BreakPeriod.MIN_BREAK_DURATION / 2;
|
||||||
|
|
||||||
private readonly OsuSpriteText counter;
|
private readonly OsuSpriteText counter;
|
||||||
|
|
||||||
private int? previousSecond;
|
|
||||||
|
|
||||||
private double endTime;
|
|
||||||
|
|
||||||
private bool isCounting;
|
|
||||||
|
|
||||||
public RemainingTimeCounter()
|
public RemainingTimeCounter()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Child = counter = new OsuSpriteText
|
InternalChild = counter = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
TextSize = 33,
|
TextSize = 33,
|
||||||
Font = "Venera",
|
Font = "Venera",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartCounting(double endTime)
|
protected override void OnCountChanged(double count) => counter.Text = ((int)Math.Ceiling(count / 1000)).ToString();
|
||||||
{
|
|
||||||
this.endTime = endTime;
|
|
||||||
isCounting = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Update()
|
public override void Show() => this.FadeIn(fade_duration);
|
||||||
{
|
public override void Hide() => this.FadeOut(fade_duration);
|
||||||
base.Update();
|
|
||||||
|
|
||||||
if (isCounting)
|
|
||||||
{
|
|
||||||
var currentTime = Clock.CurrentTime;
|
|
||||||
if (currentTime < endTime)
|
|
||||||
{
|
|
||||||
int currentSecond = (int)Math.Ceiling((endTime - Clock.CurrentTime) / 1000.0);
|
|
||||||
if (currentSecond != previousSecond)
|
|
||||||
{
|
|
||||||
counter.Text = currentSecond.ToString();
|
|
||||||
previousSecond = currentSecond;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else isCounting = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PopIn() => this.FadeIn(fade_duration);
|
|
||||||
protected override void PopOut() => this.FadeOut(fade_duration);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
68
osu.Game/Screens/Play/HUD/ReplaySettingsOverlay.cs
Normal file
68
osu.Game/Screens/Play/HUD/ReplaySettingsOverlay.cs
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Screens.Play.ReplaySettings;
|
||||||
|
using OpenTK;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
using OpenTK.Input;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Play.HUD
|
||||||
|
{
|
||||||
|
public class ReplaySettingsOverlay : VisibilityContainer
|
||||||
|
{
|
||||||
|
private const int fade_duration = 200;
|
||||||
|
|
||||||
|
public bool ReplayLoaded;
|
||||||
|
|
||||||
|
public override bool HandleInput => true;
|
||||||
|
|
||||||
|
public readonly PlaybackSettings PlaybackSettings;
|
||||||
|
//public readonly CollectionSettings CollectionSettings;
|
||||||
|
//public readonly DiscussionSettings DiscussionSettings;
|
||||||
|
|
||||||
|
public ReplaySettingsOverlay()
|
||||||
|
{
|
||||||
|
AlwaysPresent = true;
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Child = new FillFlowContainer<ReplayGroup>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 20),
|
||||||
|
Margin = new MarginPadding { Top = 100, Right = 10 },
|
||||||
|
Children = new []
|
||||||
|
{
|
||||||
|
//CollectionSettings = new CollectionSettings(),
|
||||||
|
//DiscussionSettings = new DiscussionSettings(),
|
||||||
|
PlaybackSettings = new PlaybackSettings(),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
State = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void PopIn() => this.FadeIn(fade_duration);
|
||||||
|
protected override void PopOut() => this.FadeOut(fade_duration);
|
||||||
|
|
||||||
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.Repeat) return false;
|
||||||
|
|
||||||
|
if (state.Keyboard.ControlPressed)
|
||||||
|
{
|
||||||
|
if (args.Key == Key.H && ReplayLoaded)
|
||||||
|
{
|
||||||
|
ToggleVisibility();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.OnKeyDown(state, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public readonly HealthDisplay HealthDisplay;
|
public readonly HealthDisplay HealthDisplay;
|
||||||
public readonly SongProgress Progress;
|
public readonly SongProgress Progress;
|
||||||
public readonly ModDisplay ModDisplay;
|
public readonly ModDisplay ModDisplay;
|
||||||
|
public readonly ReplaySettingsOverlay ReplaySettingsOverlay;
|
||||||
|
|
||||||
private Bindable<bool> showHud;
|
private Bindable<bool> showHud;
|
||||||
private bool replayLoaded;
|
private bool replayLoaded;
|
||||||
@ -55,7 +56,7 @@ namespace osu.Game.Screens.Play
|
|||||||
HealthDisplay = CreateHealthDisplay(),
|
HealthDisplay = CreateHealthDisplay(),
|
||||||
Progress = CreateProgress(),
|
Progress = CreateProgress(),
|
||||||
ModDisplay = CreateModsContainer(),
|
ModDisplay = CreateModsContainer(),
|
||||||
//ReplaySettingsOverlay = CreateReplaySettingsOverlay(),
|
ReplaySettingsOverlay = CreateReplaySettingsOverlay(),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -96,9 +97,14 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
replayLoaded = rulesetContainer.HasReplayLoaded;
|
replayLoaded = rulesetContainer.HasReplayLoaded;
|
||||||
|
|
||||||
|
ReplaySettingsOverlay.ReplayLoaded = replayLoaded;
|
||||||
|
|
||||||
// in the case a replay isn't loaded, we want some elements to only appear briefly.
|
// in the case a replay isn't loaded, we want some elements to only appear briefly.
|
||||||
if (!replayLoaded)
|
if (!replayLoaded)
|
||||||
|
{
|
||||||
|
ReplaySettingsOverlay.Hide();
|
||||||
ModDisplay.Delay(2000).FadeOut(200);
|
ModDisplay.Delay(2000).FadeOut(200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
@ -176,12 +182,7 @@ namespace osu.Game.Screens.Play
|
|||||||
Margin = new MarginPadding { Top = 20, Right = 10 },
|
Margin = new MarginPadding { Top = 20, Right = 10 },
|
||||||
};
|
};
|
||||||
|
|
||||||
//protected virtual ReplaySettingsOverlay CreateReplaySettingsOverlay() => new ReplaySettingsOverlay
|
protected virtual ReplaySettingsOverlay CreateReplaySettingsOverlay() => new ReplaySettingsOverlay();
|
||||||
//{
|
|
||||||
// Anchor = Anchor.TopRight,
|
|
||||||
// Origin = Anchor.TopRight,
|
|
||||||
// Margin = new MarginPadding { Top = 100, Right = 10 },
|
|
||||||
//};
|
|
||||||
|
|
||||||
public virtual void BindProcessor(ScoreProcessor processor)
|
public virtual void BindProcessor(ScoreProcessor processor)
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,8 @@ using osu.Game.Rulesets.UI;
|
|||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
@ -142,16 +144,6 @@ namespace osu.Game.Screens.Play
|
|||||||
userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
|
userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
|
||||||
userAudioOffset.TriggerChange();
|
userAudioOffset.TriggerChange();
|
||||||
|
|
||||||
Schedule(() =>
|
|
||||||
{
|
|
||||||
adjustableSourceClock.Reset();
|
|
||||||
|
|
||||||
foreach (var mod in working.Mods.Value.OfType<IApplicableToClock>())
|
|
||||||
mod.ApplyToClock(adjustableSourceClock);
|
|
||||||
|
|
||||||
decoupledClock.ChangeSource(adjustableSourceClock);
|
|
||||||
});
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
storyboardContainer = new Container
|
storyboardContainer = new Container
|
||||||
@ -230,11 +222,20 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
breakOverlay.BindProcessor(scoreProcessor);
|
breakOverlay.BindProcessor(scoreProcessor);
|
||||||
|
|
||||||
|
hudOverlay.ReplaySettingsOverlay.PlaybackSettings.AdjustableClock = adjustableSourceClock;
|
||||||
|
|
||||||
// Bind ScoreProcessor to ourselves
|
// Bind ScoreProcessor to ourselves
|
||||||
scoreProcessor.AllJudged += onCompletion;
|
scoreProcessor.AllJudged += onCompletion;
|
||||||
scoreProcessor.Failed += onFail;
|
scoreProcessor.Failed += onFail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void applyRateFromMods()
|
||||||
|
{
|
||||||
|
adjustableSourceClock.Rate = 1;
|
||||||
|
foreach (var mod in Beatmap.Value.Mods.Value.OfType<IApplicableToClock>())
|
||||||
|
mod.ApplyToClock(adjustableSourceClock);
|
||||||
|
}
|
||||||
|
|
||||||
private void initializeStoryboard(bool asyncLoad)
|
private void initializeStoryboard(bool asyncLoad)
|
||||||
{
|
{
|
||||||
var beatmap = Beatmap.Value.Beatmap;
|
var beatmap = Beatmap.Value.Beatmap;
|
||||||
@ -312,10 +313,26 @@ namespace osu.Game.Screens.Play
|
|||||||
.Delay(250)
|
.Delay(250)
|
||||||
.FadeIn(250);
|
.FadeIn(250);
|
||||||
|
|
||||||
this.Delay(750).Schedule(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
if (!pauseContainer.IsPaused)
|
adjustableSourceClock.Reset();
|
||||||
decoupledClock.Start();
|
|
||||||
|
// this is temporary until we have blocking (async.Wait()) audio component methods.
|
||||||
|
// then we can call ResetAsync().Wait() or the blocking version above.
|
||||||
|
while (adjustableSourceClock.IsRunning)
|
||||||
|
Thread.Sleep(1);
|
||||||
|
|
||||||
|
Schedule(() =>
|
||||||
|
{
|
||||||
|
decoupledClock.ChangeSource(adjustableSourceClock);
|
||||||
|
applyRateFromMods();
|
||||||
|
|
||||||
|
this.Delay(750).Schedule(() =>
|
||||||
|
{
|
||||||
|
if (!pauseContainer.IsPaused)
|
||||||
|
decoupledClock.Start();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
pauseContainer.Alpha = 0;
|
pauseContainer.Alpha = 0;
|
||||||
@ -332,6 +349,9 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || RulesetContainer?.HasReplayLoaded != false)
|
if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || RulesetContainer?.HasReplayLoaded != false)
|
||||||
{
|
{
|
||||||
|
// In the case of replays, we may have changed the playback rate.
|
||||||
|
applyRateFromMods();
|
||||||
|
|
||||||
fadeOut();
|
fadeOut();
|
||||||
return base.OnExiting(next);
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,9 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osu.Game.Screens.Menu;
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@ -20,7 +20,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
private Player player;
|
private Player player;
|
||||||
|
|
||||||
private readonly OsuLogo logo;
|
|
||||||
private BeatmapMetadataDisplay info;
|
private BeatmapMetadataDisplay info;
|
||||||
|
|
||||||
private bool showOverlays = true;
|
private bool showOverlays = true;
|
||||||
@ -39,15 +38,6 @@ namespace osu.Game.Screens.Play
|
|||||||
showOverlays = false;
|
showOverlays = false;
|
||||||
ValidForResume = true;
|
ValidForResume = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
logo = new OsuLogo
|
|
||||||
{
|
|
||||||
Scale = new Vector2(0.15f),
|
|
||||||
Interactive = false,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -101,11 +91,23 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
contentIn();
|
contentIn();
|
||||||
|
|
||||||
logo.Delay(500).MoveToOffset(new Vector2(0, -180), 500, Easing.InOutExpo);
|
|
||||||
info.Delay(750).FadeIn(500);
|
info.Delay(750).FadeIn(500);
|
||||||
this.Delay(2150).Schedule(pushWhenLoaded);
|
this.Delay(2150).Schedule(pushWhenLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
{
|
||||||
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
|
logo.RelativePositionAxes = Axes.Both;
|
||||||
|
|
||||||
|
logo.ScaleTo(new Vector2(0.15f), 300, Easing.In);
|
||||||
|
logo.MoveTo(new Vector2(0.5f), 300, Easing.In);
|
||||||
|
logo.FadeIn(350);
|
||||||
|
|
||||||
|
logo.Delay(resuming ? 0 : 500).MoveToOffset(new Vector2(0, -0.24f), 500, Easing.InOutExpo);
|
||||||
|
}
|
||||||
|
|
||||||
private void pushWhenLoaded()
|
private void pushWhenLoaded()
|
||||||
{
|
{
|
||||||
if (player.LoadState != LoadState.Ready)
|
if (player.LoadState != LoadState.Ready)
|
||||||
|
@ -1,28 +1,76 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.ReplaySettings
|
namespace osu.Game.Screens.Play.ReplaySettings
|
||||||
{
|
{
|
||||||
public class PlaybackSettings : ReplayGroup
|
public class PlaybackSettings : ReplayGroup
|
||||||
{
|
{
|
||||||
|
private const int padding = 10;
|
||||||
|
|
||||||
protected override string Title => @"playback";
|
protected override string Title => @"playback";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
public IAdjustableClock AdjustableClock { set; get; }
|
||||||
private void load(OsuConfigManager config)
|
|
||||||
|
private readonly ReplaySliderBar<double> sliderbar;
|
||||||
|
|
||||||
|
public PlaybackSettings()
|
||||||
{
|
{
|
||||||
|
OsuSpriteText multiplierText;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new ReplaySliderBar<double>
|
new Container
|
||||||
{
|
{
|
||||||
LabelText = "Playback speed",
|
RelativeSizeAxes = Axes.X,
|
||||||
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed),
|
AutoSizeAxes = Axes.Y,
|
||||||
KeyboardStep = 0.5f
|
Padding = new MarginPadding { Horizontal = padding },
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Text = "Playback speed",
|
||||||
|
},
|
||||||
|
multiplierText = new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
Text = "1x",
|
||||||
|
Font = @"Exo2.0-Bold",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sliderbar = new ReplaySliderBar<double>
|
||||||
|
{
|
||||||
|
Bindable = new BindableDouble(1)
|
||||||
|
{
|
||||||
|
Default = 1,
|
||||||
|
MinValue = 0.5,
|
||||||
|
MaxValue = 2,
|
||||||
|
Precision = 0.01,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sliderbar.Bindable.ValueChanged += rateMultiplier => multiplierText.Text = $"{rateMultiplier}x";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
if (AdjustableClock == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var clockRate = AdjustableClock.Rate;
|
||||||
|
sliderbar.Bindable.ValueChanged += rateMultiplier => AdjustableClock.Rate = clockRate * rateMultiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Screens.Play.ReplaySettings;
|
|
||||||
using OpenTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
|
||||||
{
|
|
||||||
public class ReplaySettingsOverlay : FillFlowContainer
|
|
||||||
{
|
|
||||||
public ReplaySettingsOverlay()
|
|
||||||
{
|
|
||||||
Direction = FillDirection.Vertical;
|
|
||||||
AutoSizeAxes = Axes.Both;
|
|
||||||
Spacing = new Vector2(0, 20);
|
|
||||||
|
|
||||||
Add(new CollectionSettings());
|
|
||||||
Add(new DiscussionSettings());
|
|
||||||
Add(new PlaybackSettings());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -13,7 +13,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Menu;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
{
|
{
|
||||||
@ -31,12 +30,9 @@ namespace osu.Game.Screens.Select
|
|||||||
private const float padding = 80;
|
private const float padding = 80;
|
||||||
|
|
||||||
public Action OnBack;
|
public Action OnBack;
|
||||||
public Action OnStart;
|
|
||||||
|
|
||||||
private readonly FillFlowContainer<FooterButton> buttons;
|
private readonly FillFlowContainer<FooterButton> buttons;
|
||||||
|
|
||||||
public OsuLogo StartButton;
|
|
||||||
|
|
||||||
/// <param name="text">Text on the button.</param>
|
/// <param name="text">Text on the button.</param>
|
||||||
/// <param name="colour">Colour of the button.</param>
|
/// <param name="colour">Colour of the button.</param>
|
||||||
/// <param name="hotkey">Hotkey of the button.</param>
|
/// <param name="hotkey">Hotkey of the button.</param>
|
||||||
@ -106,13 +102,6 @@ namespace osu.Game.Screens.Select
|
|||||||
Height = 3,
|
Height = 3,
|
||||||
Position = new Vector2(0, -3),
|
Position = new Vector2(0, -3),
|
||||||
},
|
},
|
||||||
StartButton = new OsuLogo
|
|
||||||
{
|
|
||||||
Anchor = Anchor.BottomRight,
|
|
||||||
Scale = new Vector2(0.4f),
|
|
||||||
Position = new Vector2(-70, -25),
|
|
||||||
Action = () => OnStart?.Invoke()
|
|
||||||
},
|
|
||||||
new BackButton
|
new BackButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
@ -143,8 +132,6 @@ namespace osu.Game.Screens.Select
|
|||||||
updateModeLight();
|
updateModeLight();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => base.ReceiveMouseInputAt(screenSpacePos) || StartButton.ReceiveMouseInputAt(screenSpacePos);
|
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
|
||||||
protected override bool OnClick(InputState state) => true;
|
protected override bool OnClick(InputState state) => true;
|
||||||
|
@ -20,6 +20,7 @@ using osu.Game.Graphics.Containers;
|
|||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osu.Game.Screens.Edit;
|
using osu.Game.Screens.Edit;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
using osu.Game.Screens.Select.Options;
|
using osu.Game.Screens.Select.Options;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
@ -153,7 +154,6 @@ namespace osu.Game.Screens.Select
|
|||||||
Add(Footer = new Footer
|
Add(Footer = new Footer
|
||||||
{
|
{
|
||||||
OnBack = Exit,
|
OnBack = Exit,
|
||||||
OnStart = () => carouselRaisedStart(),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
FooterPanels.Add(BeatmapOptions = new BeatmapOptionsOverlay());
|
FooterPanels.Add(BeatmapOptions = new BeatmapOptionsOverlay());
|
||||||
@ -309,6 +309,39 @@ namespace osu.Game.Screens.Select
|
|||||||
FilterControl.Activate();
|
FilterControl.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const double logo_transition = 250;
|
||||||
|
|
||||||
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||||
|
{
|
||||||
|
base.LogoArriving(logo, resuming);
|
||||||
|
|
||||||
|
logo.RelativePositionAxes = Axes.Both;
|
||||||
|
Vector2 position = new Vector2(0.95f, 0.96f);
|
||||||
|
|
||||||
|
if (logo.Alpha > 0.8f)
|
||||||
|
{
|
||||||
|
logo.MoveTo(position, 500, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logo.Hide();
|
||||||
|
logo.ScaleTo(0.2f);
|
||||||
|
logo.MoveTo(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
logo.FadeIn(logo_transition, Easing.OutQuint);
|
||||||
|
logo.ScaleTo(0.4f, logo_transition, Easing.OutQuint);
|
||||||
|
|
||||||
|
logo.Action = () => carouselRaisedStart();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LogoExiting(OsuLogo logo)
|
||||||
|
{
|
||||||
|
base.LogoExiting(logo);
|
||||||
|
logo.ScaleTo(0.2f, logo_transition / 2, Easing.Out);
|
||||||
|
logo.FadeOut(logo_transition / 2, Easing.Out);
|
||||||
|
}
|
||||||
|
|
||||||
private void beatmap_ValueChanged(WorkingBeatmap beatmap)
|
private void beatmap_ValueChanged(WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
if (!IsCurrentScreen) return;
|
if (!IsCurrentScreen) return;
|
||||||
@ -350,6 +383,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Content.FadeOut(100);
|
Content.FadeOut(100);
|
||||||
|
|
||||||
FilterControl.Deactivate();
|
FilterControl.Deactivate();
|
||||||
|
|
||||||
return base.OnExiting(next);
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -25,6 +26,9 @@ namespace osu.Game.Users
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
private void load(TextureStore textures)
|
||||||
{
|
{
|
||||||
|
if (textures == null)
|
||||||
|
throw new ArgumentNullException(nameof(textures));
|
||||||
|
|
||||||
Texture texture = null;
|
Texture texture = null;
|
||||||
if (user != null && user.Id > 1) texture = textures.Get($@"https://a.ppy.sh/{user.Id}");
|
if (user != null && user.Id > 1) texture = textures.Get($@"https://a.ppy.sh/{user.Id}");
|
||||||
if (texture == null) texture = textures.Get(@"Online/avatar-guest");
|
if (texture == null) texture = textures.Get(@"Online/avatar-guest");
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -45,6 +46,9 @@ namespace osu.Game.Users
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore ts)
|
private void load(TextureStore ts)
|
||||||
{
|
{
|
||||||
|
if (ts == null)
|
||||||
|
throw new ArgumentNullException(nameof(ts));
|
||||||
|
|
||||||
textures = ts;
|
textures = ts;
|
||||||
sprite.Texture = textures.Get($@"Flags/{flagName}");
|
sprite.Texture = textures.Get($@"Flags/{flagName}");
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
@ -19,6 +20,9 @@ namespace osu.Game.Users
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
private void load(TextureStore textures)
|
||||||
{
|
{
|
||||||
|
if (textures == null)
|
||||||
|
throw new ArgumentNullException(nameof(textures));
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(user.CoverUrl))
|
if (!string.IsNullOrEmpty(user.CoverUrl))
|
||||||
Texture = textures.Get(user.CoverUrl);
|
Texture = textures.Get(user.CoverUrl);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,9 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
public UserPanel(User user)
|
public UserPanel(User user)
|
||||||
{
|
{
|
||||||
|
if (user == null)
|
||||||
|
throw new ArgumentNullException(nameof(user));
|
||||||
|
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
|
||||||
Height = height - status_height;
|
Height = height - status_height;
|
||||||
@ -173,6 +176,9 @@ namespace osu.Game.Users
|
|||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(OsuColour colours, UserProfileOverlay profile)
|
private void load(OsuColour colours, UserProfileOverlay profile)
|
||||||
{
|
{
|
||||||
|
if (colours == null)
|
||||||
|
throw new ArgumentNullException(nameof(colours));
|
||||||
|
|
||||||
Status.ValueChanged += displayStatus;
|
Status.ValueChanged += displayStatus;
|
||||||
Status.ValueChanged += status => statusBg.FadeColour(status?.GetAppropriateColour(colours) ?? colours.Gray5, 500, Easing.OutQuint);
|
Status.ValueChanged += status => statusBg.FadeColour(status?.GetAppropriateColour(colours) ?? colours.Gray5, 500, Easing.OutQuint);
|
||||||
|
|
||||||
|
@ -88,6 +88,9 @@
|
|||||||
<HintPath>$(SolutionDir)\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Humanizer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>$(SolutionDir)\packages\Humanizer.Core.2.2.0\lib\netstandard1.0\Humanizer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>$(SolutionDir)\packages\Microsoft.Data.Sqlite.Core.2.0.0\lib\netstandard2.0\Microsoft.Data.Sqlite.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\Microsoft.Data.Sqlite.Core.2.0.0\lib\netstandard2.0\Microsoft.Data.Sqlite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@ -279,6 +282,9 @@
|
|||||||
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
|
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
|
||||||
<Compile Include="Online\API\Requests\GetBeatmapSetRequest.cs" />
|
<Compile Include="Online\API\Requests\GetBeatmapSetRequest.cs" />
|
||||||
<Compile Include="Online\API\Requests\GetBeatmapSetsResponse.cs" />
|
<Compile Include="Online\API\Requests\GetBeatmapSetsResponse.cs" />
|
||||||
|
<Compile Include="Online\API\Requests\GetUserBeatmapsRequest.cs" />
|
||||||
|
<Compile Include="Overlays\Profile\Sections\Beatmaps\PaginatedBeatmapContainer.cs" />
|
||||||
|
<Compile Include="Overlays\Profile\Sections\PaginatedContainer.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Ranks\DrawablePerformanceScore.cs" />
|
<Compile Include="Overlays\Profile\Sections\Ranks\DrawablePerformanceScore.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Ranks\PaginatedScoreContainer.cs" />
|
<Compile Include="Overlays\Profile\Sections\Ranks\PaginatedScoreContainer.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Ranks\DrawableTotalScore.cs" />
|
<Compile Include="Overlays\Profile\Sections\Ranks\DrawableTotalScore.cs" />
|
||||||
@ -655,6 +661,7 @@
|
|||||||
<Compile Include="Screens\Menu\Disclaimer.cs" />
|
<Compile Include="Screens\Menu\Disclaimer.cs" />
|
||||||
<Compile Include="Screens\Menu\FlowContainerWithOrigin.cs" />
|
<Compile Include="Screens\Menu\FlowContainerWithOrigin.cs" />
|
||||||
<Compile Include="Screens\Menu\Intro.cs" />
|
<Compile Include="Screens\Menu\Intro.cs" />
|
||||||
|
<Compile Include="Screens\Menu\IntroSequence.cs" />
|
||||||
<Compile Include="Screens\Menu\LogoVisualisation.cs" />
|
<Compile Include="Screens\Menu\LogoVisualisation.cs" />
|
||||||
<Compile Include="Screens\Menu\MainMenu.cs" />
|
<Compile Include="Screens\Menu\MainMenu.cs" />
|
||||||
<Compile Include="Screens\Menu\MenuSideFlashes.cs" />
|
<Compile Include="Screens\Menu\MenuSideFlashes.cs" />
|
||||||
@ -687,7 +694,7 @@
|
|||||||
<Compile Include="Screens\Play\Player.cs" />
|
<Compile Include="Screens\Play\Player.cs" />
|
||||||
<Compile Include="Screens\Play\PlayerLoader.cs" />
|
<Compile Include="Screens\Play\PlayerLoader.cs" />
|
||||||
<Compile Include="Screens\Play\ReplayPlayer.cs" />
|
<Compile Include="Screens\Play\ReplayPlayer.cs" />
|
||||||
<Compile Include="Screens\Play\ReplaySettingsOverlay.cs" />
|
<Compile Include="Screens\Play\HUD\ReplaySettingsOverlay.cs" />
|
||||||
<Compile Include="Screens\Play\ReplaySettings\CollectionSettings.cs" />
|
<Compile Include="Screens\Play\ReplaySettings\CollectionSettings.cs" />
|
||||||
<Compile Include="Screens\Play\ReplaySettings\DiscussionSettings.cs" />
|
<Compile Include="Screens\Play\ReplaySettings\DiscussionSettings.cs" />
|
||||||
<Compile Include="Screens\Play\ReplaySettings\PlaybackSettings.cs" />
|
<Compile Include="Screens\Play\ReplaySettings\PlaybackSettings.cs" />
|
||||||
|
@ -5,6 +5,48 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste
|
|||||||
-->
|
-->
|
||||||
<packages>
|
<packages>
|
||||||
<package id="DotNetZip" version="1.10.1" targetFramework="net461" />
|
<package id="DotNetZip" version="1.10.1" targetFramework="net461" />
|
||||||
|
<package id="Humanizer" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.af" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.ar" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.bg" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.bn-BD" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.cs" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.da" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.de" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.el" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.es" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.fa" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.fi-FI" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.fr" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.fr-BE" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.he" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.hr" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.hu" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.id" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.it" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.ja" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.lv" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.nb" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.nb-NO" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.nl" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.pl" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.pt" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.ro" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.ru" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.sk" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.sl" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.sr" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.sr-Latn" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.sv" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.tr" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.uk" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.uz-Cyrl-UZ" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.uz-Latn-UZ" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.vi" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.zh-CN" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.zh-Hans" version="2.2.0" targetFramework="net461" />
|
||||||
|
<package id="Humanizer.Core.zh-Hant" version="2.2.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.CSharp" version="4.4.0" targetFramework="net461" />
|
<package id="Microsoft.CSharp" version="4.4.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.Data.Sqlite.Core" version="2.0.0" targetFramework="net461" />
|
<package id="Microsoft.Data.Sqlite.Core" version="2.0.0" targetFramework="net461" />
|
||||||
<package id="Microsoft.EntityFrameworkCore" version="2.0.0" targetFramework="net461" />
|
<package id="Microsoft.EntityFrameworkCore" version="2.0.0" targetFramework="net461" />
|
||||||
|
Loading…
Reference in New Issue
Block a user