1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Merge branch 'master' into beatmap-overlay-scores

This commit is contained in:
Dean Herbert 2017-11-15 13:18:32 +09:00 committed by GitHub
commit 6ef60d0b4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 918 additions and 1445 deletions

@ -1 +1 @@
Subproject commit db625dc65fb7ae9be154b03a0968b2f8cedb036d
Subproject commit c95b9350edb6305cfefdf08f902f6f73d336736b

View File

@ -18,9 +18,12 @@ namespace osu.Desktop
{
internal class OsuGameDesktop : OsuGame
{
private readonly bool noVersionOverlay;
public OsuGameDesktop(string[] args = null)
: base(args)
{
noVersionOverlay = args?.Any(a => a == "--no-version-overlay") ?? false;
}
public override Storage GetStorageForStableInstall()
@ -79,11 +82,14 @@ namespace osu.Desktop
{
base.LoadComplete();
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
if (!noVersionOverlay)
{
Add(v);
v.State = Visibility.Visible;
});
LoadComponentAsync(new VersionManager { Depth = int.MinValue }, v =>
{
Add(v);
v.State = Visibility.Visible;
});
}
}
public override void SetHost(GameHost host)

View File

@ -233,7 +233,8 @@ namespace osu.Desktop.Overlays
Text = @"Update ready to install. Click to restart!",
Activated = () =>
{
UpdateManager.RestartAppWhenExited();
// Squirrel returns execution to us after the update process is started, so it's safe to use Wait() here
UpdateManager.RestartAppWhenExited().Wait();
game.GracefullyExit();
return true;
}

View File

@ -94,7 +94,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
protected override void UpdateState(ArmedState state)
{
switch (State)
switch (State.Value)
{
case ArmedState.Hit:
AccentColour = Color4.Green;

View File

@ -57,8 +57,10 @@ namespace osu.Game.Rulesets.Mania.UI
{
base.LoadComplete();
this.ScaleTo(2f, 600, Easing.OutQuint).FadeOut(500).Expire();
this.ScaleTo(2f, 600, Easing.OutQuint).FadeOut(500);
inner.FadeOut(250);
Expire(true);
}
}
}

View File

@ -14,6 +14,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
{
private const float width = 8;
public override bool RemoveWhenNotAlive => false;
public FollowPoint()
{
Origin = Anchor.Centre;

View File

@ -52,9 +52,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
}
}
public override bool RemoveCompletedTransforms => false;
private void update()
{
Clear();
if (hitObjects == null)
return;

View File

@ -58,6 +58,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
},
ApproachCircle = new ApproachCircle
{
Alpha = 0,
Scale = new Vector2(4),
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()
{
base.UpdatePreemptState();

View File

@ -23,12 +23,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
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();
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()
{
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;
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
}

View File

@ -18,9 +18,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public double FadeInTime;
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.drawableSlider = drawableSlider;
@ -28,6 +27,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
AutoSizeAxes = Axes.Both;
Blending = BlendingMode.Additive;
Origin = Anchor.Centre;
Scale = new Vector2(0.5f);
Children = new Drawable[]
{
@ -51,12 +51,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
var animIn = Math.Min(150, repeatPoint.StartTime - FadeInTime);
this.Animate(
d => d.FadeIn(animIn),
d => d.ScaleTo(0.5f).ScaleTo(1.2f, animIn)
).Then(
d => d.ScaleTo(1, 150, Easing.Out)
);
this.FadeIn(animIn).ScaleTo(1.2f, animIn)
.Then()
.ScaleTo(1, 150, Easing.Out);
}
protected override void UpdateCurrentState(ArmedState state)

View File

@ -43,7 +43,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
ball = new SliderBall(s)
{
Scale = new Vector2(s.Scale),
AccentColour = AccentColour
AccentColour = AccentColour,
AlwaysPresent = true,
Alpha = 0
},
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)
{
ball.FadeIn();

View File

@ -20,8 +20,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public bool Tracking;
public override bool RemoveWhenNotAlive => false;
public override bool DisplayJudgement => false;
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)

View File

@ -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.
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;
public bool Tracking
{
get { return tracking; }
private set
{
if (value == tracking) return;
if (value == tracking)
return;
tracking = value;
follow.ScaleTo(tracking ? 2.8f : 1, 300, Easing.OutQuint);
@ -123,8 +130,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
base.Update();
// Make sure to use the base version of ReceiveMouseInputAt so that we correctly check the position.
if (Time.Current < slider.EndTime)
Tracking = canCurrentlyTrack && lastState != null && base.ReceiveMouseInputAt(lastState.Mouse.NativeState.Position) && ((Parent as DrawableSlider)?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
Tracking = canCurrentlyTrack
&& 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)

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites;
@ -61,6 +62,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
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)
{
var record = records.Peek();

View File

@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Osu.Tests
h.Depth = depth++;
if (auto)
h.State = ArmedState.Hit;
h.State.Value = ArmedState.Hit;
playfieldContainer.Add(h);
var proxyable = h as IDrawableHitObjectWithProxiedApproach;

View File

@ -1,8 +1,6 @@
// 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.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Taiko.Judgements
{
public class TaikoStrongHitJudgement : TaikoJudgement
@ -11,9 +9,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
public TaikoStrongHitJudgement()
{
base.Result = HitResult.Perfect;
Final = true;
}
public new HitResult Result => base.Result;
}
}

View File

@ -17,6 +17,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
/// </summary>
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>
/// Whether the last key pressed is a valid hit key.
/// </summary>
@ -45,7 +50,15 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
if (!validKeyPressed)
AddJudgement(new TaikoJudgement { Result = HitResult.Miss });
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
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;
using (BeginDelayedSequence(HitObject.StartTime - Time.Current + offset, true))
{
switch (State)
switch (State.Value)
{
case ArmedState.Idle:
this.Delay(HitObject.HitWindowMiss).Expire();

View File

@ -3,6 +3,7 @@
using System;
using System.Linq;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Judgements;
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)
{
if (!base.AllJudged)
if (!SecondHitAllowed)
{
base.CheckForJudgements(userTriggered, timeOffset);
return;
}
if (!userTriggered)
{
if (timeOffset > second_hit_window)
AddJudgement(new TaikoStrongHitJudgement { Result = HitResult.Miss });
return;
}
// 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)
{
AddJudgement(new TaikoStrongHitJudgement());
processedSecondHit = true;
}
AddJudgement(new TaikoStrongHitJudgement { Result = HitResult.Great });
}
public override bool OnReleased(TaikoAction action)
@ -56,8 +55,11 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
public override bool OnPressed(TaikoAction action)
{
if (AllJudged)
return false;
// Check if we've handled the first key
if (!base.AllJudged)
if (!SecondHitAllowed)
{
// First key hasn't been handled yet, attempt to handle it
bool handled = base.OnPressed(action);
@ -72,10 +74,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
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
if (firstHitAction == action)
return false;

View File

@ -244,7 +244,12 @@ namespace osu.Game.Rulesets.Taiko.UI
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
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));

View File

@ -3,7 +3,7 @@
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Play.ReplaySettings;
namespace osu.Game.Tests.Visual

View File

@ -341,6 +341,8 @@ namespace osu.Game.Beatmaps
/// Returns a <see cref="BeatmapSetInfo"/> to a usable state if it has previously been deleted but not yet purged.
/// Is a no-op for already usable beatmaps.
/// </summary>
/// <param name="beatmaps">The store to restore beatmaps from.</param>
/// <param name="files">The store to restore beatmap files from.</param>
/// <param name="beatmapSet">The beatmap to restore.</param>
private void undelete(BeatmapStore beatmaps, FileStore files, BeatmapSetInfo beatmapSet)
{
@ -426,6 +428,8 @@ namespace osu.Game.Beatmaps
/// Import a beamap into our local <see cref="FileStore"/> storage.
/// If the beatmap is already imported, the existing instance will be returned.
/// </summary>
/// <param name="files">The store to import beatmap files to.</param>
/// <param name="beatmaps">The store to import beatmaps to.</param>
/// <param name="reader">The beatmap archive to be read.</param>
/// <returns>The imported beatmap, or an existing instance if it is already present.</returns>
private BeatmapSetInfo importToStorage(FileStore files, BeatmapStore beatmaps, ArchiveReader reader)

View File

@ -69,7 +69,6 @@ namespace osu.Game.Configuration
Set(OsuSetting.KeyOverlay, false);
Set(OsuSetting.FloatingComments, false);
Set(OsuSetting.PlaybackSpeed, 1.0, 0.5f, 2, 0.01);
// Update
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
@ -93,7 +92,6 @@ namespace osu.Game.Configuration
ShowStoryboard,
KeyOverlay,
FloatingComments,
PlaybackSpeed,
ShowInterface,
MouseDisableButtons,
MouseDisableWheel,

View File

@ -102,7 +102,7 @@ namespace osu.Game.Database
return null;
}
public new int SaveChanges(IDbContextTransaction transaction = null)
public int SaveChanges(IDbContextTransaction transaction = null)
{
var ret = base.SaveChanges();
transaction?.Commit();
@ -262,7 +262,7 @@ namespace osu.Game.Database
throw new MigrationFailedException(e);
}
}
catch (MigrationFailedException e)
catch (MigrationFailedException)
{
throw;
}

View File

@ -57,11 +57,6 @@ namespace osu.Game.Graphics
private void load(FontStore store)
{
this.store = store;
}
protected override void LoadComplete()
{
base.LoadComplete();
updateTexture();
}

View File

@ -6,6 +6,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.MathUtils;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Graphics.Transforms;
namespace osu.Game.Graphics.Sprites
{
@ -40,4 +41,23 @@ namespace osu.Game.Graphics.Sprites
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));
}
}

View File

@ -19,7 +19,7 @@ namespace osu.Game.IO
{
public readonly IResourceStore<byte[]> Store;
public Storage Storage => base.Storage;
public new Storage Storage => base.Storage;
public FileStore(Func<OsuDbContext> createContext, Storage storage) : base(createContext, storage.GetStorageForDirectory(@"files"))
{

View File

@ -51,7 +51,9 @@ namespace osu.Game.Input.Bindings
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
store.KeyBindingChanged -= ReloadMappings;
if (store != null)
store.KeyBindingChanged -= ReloadMappings;
}
protected override void ReloadMappings() => KeyBindings = store.Query(ruleset?.ID, variant).ToList();

View File

@ -0,0 +1,33 @@
// 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,
Unranked,
Graveyard
}
}

View File

@ -29,7 +29,10 @@ namespace osu.Game.Overlays.BeatmapSet
if (value == beatmap) return;
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");
successRate.Length = rate;
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);

View File

@ -29,6 +29,7 @@ namespace osu.Game.Overlays.Direct
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap)
{
Width = 400;
Height = 140 + vertical_padding; //full height of all the elements plus vertical padding (autosize uses the image)
}

View File

@ -222,7 +222,7 @@ namespace osu.Game.Overlays
switch (displayStyle)
{
case PanelDisplayStyle.Grid:
return new DirectGridPanel(b) { Width = 400 };
return new DirectGridPanel(b);
default:
return new DirectListPanel(b);
}

View File

@ -0,0 +1,72 @@
// 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 currentlyPlaying;
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user, string header, string missing = "None... yet.")
: base(user, header, missing)
{
this.type = type;
ItemsPerPage = 6;
ItemsContainer.Spacing = new Vector2(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 panel = new DirectGridPanel(s.ToBeatmapSet(Rulesets));
ItemsContainer.Add(panel);
panel.PreviewPlaying.ValueChanged += isPlaying =>
{
if (!isPlaying) return;
if (currentlyPlaying != null && currentlyPlaying != panel)
currentlyPlaying.PreviewPlaying.Value = false;
currentlyPlaying = panel;
};
}
};
Api.Queue(req);
}
}
}

View File

@ -1,6 +1,9 @@
// 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.Game.Online.API.Requests;
using osu.Game.Overlays.Profile.Sections.Beatmaps;
namespace osu.Game.Overlays.Profile.Sections
{
public class BeatmapsSection : ProfileSection
@ -8,5 +11,16 @@ namespace osu.Game.Overlays.Profile.Sections
public override string Title => "Beatmaps";
public override string Identifier => "beatmaps";
public BeatmapsSection()
{
Children = new[]
{
new PaginatedBeatmapContainer(BeatmapSetType.Favourite, User, "Favourite Beatmaps"),
new PaginatedBeatmapContainer(BeatmapSetType.RankedAndApproved, User, "Ranked & Approved Beatmaps"),
new PaginatedBeatmapContainer(BeatmapSetType.Unranked, User, "Pending Beatmaps"),
new PaginatedBeatmapContainer(BeatmapSetType.Graveyard, User, "Graveyarded Beatmaps"),
};
}
}
}

View File

@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Sections
public HistoricalSection()
{
Child = new PaginatedScoreContainer(ScoreType.Recent, User, "Recent Plays (24h)");
Child = new PaginatedScoreContainer(ScoreType.Recent, User, "Recent Plays (24h)", "No performance records. :(");
}
}
}

View File

@ -0,0 +1,110 @@
// 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,
Margin = new MarginPadding { Bottom = 10 }
},
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();
}
}
}

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
}
[BackgroundDependencyLoader]
private new void load(OsuColour colour)
private void load(OsuColour colour)
{
double pp = Score.PP ?? 0;
Stats.Add(new OsuSpriteText

View File

@ -7,7 +7,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Select.Leaderboards;
@ -15,66 +14,113 @@ using System.Linq;
using osu.Framework.Localisation;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using OpenTK.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Input;
using osu.Framework.Extensions.Color4Extensions;
using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays.Profile.Sections.Ranks
{
public abstract class DrawableScore : Container
{
private const int fade_duration = 200;
protected readonly FillFlowContainer<OsuSpriteText> Stats;
private readonly FillFlowContainer metadata;
private readonly ModContainer modContainer;
protected readonly Score Score;
private readonly Box underscoreLine;
private readonly Box coloredBackground;
private readonly Container background;
protected DrawableScore(Score score)
{
Score = score;
RelativeSizeAxes = Axes.X;
Height = 60;
Children = new Drawable[]
{
new DrawableRank(score.Rank)
background = new Container
{
RelativeSizeAxes = Axes.Y,
Width = 60,
FillMode = FillMode.Fit,
},
Stats = new FillFlowContainer<OsuSpriteText>
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Direction = FillDirection.Vertical,
},
metadata = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Margin = new MarginPadding { Left = 70 },
Direction = FillDirection.Vertical,
Child = new OsuSpriteText
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 3,
Alpha = 0,
EdgeEffect = new EdgeEffectParameters
{
Text = score.Date.LocalDateTime.ToShortDateString(),
TextSize = 11,
Colour = OsuColour.Gray(0xAA),
Depth = -1,
Type = EdgeEffectType.Shadow,
Offset = new Vector2(0f, 1f),
Radius = 1f,
Colour = Color4.Black.Opacity(0.2f),
},
Child = coloredBackground = new Box { RelativeSizeAxes = Axes.Both }
},
modContainer = new ModContainer
new Container
{
AutoSizeAxes = Axes.Y,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Width = 60,
Margin = new MarginPadding { Right = 150 }
}
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Width = 0.97f,
Children = new Drawable[]
{
underscoreLine = new Box
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.X,
Height = 1,
},
new DrawableRank(score.Rank)
{
RelativeSizeAxes = Axes.Y,
Width = 60,
FillMode = FillMode.Fit,
},
Stats = new FillFlowContainer<OsuSpriteText>
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Direction = FillDirection.Vertical,
},
metadata = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Margin = new MarginPadding { Left = 70 },
Direction = FillDirection.Vertical,
Child = new OsuSpriteText
{
Text = score.Date.LocalDateTime.ToShortDateString(),
TextSize = 11,
Colour = OsuColour.Gray(0xAA),
Depth = -1,
},
},
modContainer = new ModContainer
{
AutoSizeAxes = Axes.Y,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Width = 60,
Margin = new MarginPadding { Right = 160 }
}
}
},
};
}
[BackgroundDependencyLoader(true)]
private void load(OsuColour colour, LocalisationEngine locale, BeatmapSetOverlay beatmapSetOverlay)
{
coloredBackground.Colour = underscoreLine.Colour = colour.Gray4;
Stats.Add(new OsuSpriteText
{
Text = $"accuracy: {Score.Accuracy:P2}",
@ -86,7 +132,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Depth = -1,
});
metadata.Add(new OsuHoverContainer
metadata.Add(new MetadataContainer(Score.Beatmap.Metadata.Title, Score.Beatmap.Metadata.Artist)
{
AutoSizeAxes = Axes.Both,
Action = () =>
@ -126,6 +172,22 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
});
}
protected override bool OnClick(InputState state) => true;
protected override bool OnHover(InputState state)
{
background.FadeIn(fade_duration, Easing.OutQuint);
underscoreLine.FadeOut(fade_duration, Easing.OutQuint);
return true;
}
protected override void OnHoverLost(InputState state)
{
background.FadeOut(fade_duration, Easing.OutQuint);
underscoreLine.FadeIn(fade_duration, Easing.OutQuint);
base.OnHoverLost(state);
}
private class ModContainer : FlowContainer<ModIcon>
{
protected override IEnumerable<Vector2> ComputeLayoutPositions()
@ -135,5 +197,15 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
yield return new Vector2(DrawWidth * i * (count == 1 ? 0 : 1f / (count - 1)), 0);
}
}
private class MetadataContainer : OsuHoverContainer, IHasTooltip
{
public string TooltipText { get; set; }
public MetadataContainer(string title, string artist)
{
TooltipText = $"{artist} - {title}";
}
}
}
}

View File

@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
}
[BackgroundDependencyLoader]
private new void load()
private void load()
{
Stats.Add(new OsuSpriteText
{

View File

@ -1,130 +1,53 @@
// 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.Online.API.Requests;
using osu.Game.Rulesets;
using osu.Game.Users;
using System;
using System.Linq;
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 ScoreType type;
private int visiblePages;
private readonly Bindable<User> user = new Bindable<User>();
private RulesetStore rulesets;
private APIAccess api;
public PaginatedScoreContainer(ScoreType type, Bindable<User> user, string header, bool includeWeight = false)
public PaginatedScoreContainer(ScoreType type, Bindable<User> user, string header, string missing, bool includeWeight = false)
: base(user, header, missing)
{
this.type = type;
this.includeWeight = includeWeight;
this.user.BindTo(user);
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FillDirection.Vertical;
ItemsPerPage = 5;
Children = new Drawable[]
{
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. :(",
},
};
ItemsContainer.Direction = FillDirection.Vertical;
}
[BackgroundDependencyLoader]
private void load(APIAccess api, RulesetStore rulesets)
protected override void ShowMore()
{
this.api = api;
this.rulesets = rulesets;
base.ShowMore();
user.ValueChanged += user_ValueChanged;
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();
var req = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
req.Success += 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);
showMoreLoading.Hide();
ShowMoreButton.FadeTo(scores.Count == ItemsPerPage ? 1 : 0);
ShowMoreLoading.Hide();
if (!scores.Any()) return;
if (!scores.Any())
{
MissingText.Show();
return;
}
missing.Hide();
MissingText.Hide();
foreach (OnlineScore score in scores)
{
@ -133,21 +56,18 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
switch (type)
{
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;
case ScoreType.Recent:
drawableScore = new DrawableTotalScore(score);
break;
}
drawableScore.RelativeSizeAxes = Axes.X;
drawableScore.Height = 60;
scoreContainer.Add(drawableScore);
ItemsContainer.Add(drawableScore);
}
};
api.Queue(req);
Api.Queue(req);
}
}
}

View File

@ -16,8 +16,8 @@ namespace osu.Game.Overlays.Profile.Sections
{
Children = new[]
{
new PaginatedScoreContainer(ScoreType.Best, User, "Best Performance", true),
new PaginatedScoreContainer(ScoreType.Firsts, User, "First Place Ranks"),
new PaginatedScoreContainer(ScoreType.Best, User, "Best Performance", "No performance records. :(", true),
new PaginatedScoreContainer(ScoreType.Firsts, User, "First Place Ranks", "No awesome performance records yet. :("),
};
}
}

View File

@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Settings
private SpriteText text;
private readonly RestoreDefaultValueButton<T> restoreDefaultValueButton = new RestoreDefaultValueButton<T>();
private readonly RestoreDefaultValueButton restoreDefaultValueButton = new RestoreDefaultValueButton();
public bool ShowsDefaultIndicator = true;
@ -132,7 +132,7 @@ namespace osu.Game.Overlays.Settings
}
}
private class RestoreDefaultValueButton<T> : Box, IHasTooltip
private class RestoreDefaultValueButton : Box, IHasTooltip
{
private Bindable<T> bindable;
internal Bindable<T> Bindable

View File

@ -91,12 +91,12 @@ namespace osu.Game.Overlays
sections = new ProfileSection[]
{
new AboutSection(),
//new AboutSection(),
//new RecentSection(),
new RanksSection(),
//new MedalsSection(),
new HistoricalSection(),
//new BeatmapsSection(),
new BeatmapsSection(),
//new KudosuSection()
};
tabs = new ProfileTabControl

View File

@ -1,20 +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 System;
using System.IO;
using System.Reflection;
namespace osu.Game.Tests.Resources
{
public static class Resource
{
public static Stream OpenResource(string name)
{
var localPath = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
return Assembly.GetExecutingAssembly().GetManifestResourceStream($@"osu.Game.Tests.Resources.{name}") ??
Assembly.LoadFrom(Path.Combine(localPath, @"osu.Game.Resources.dll")).GetManifestResourceStream($@"osu.Game.Resources.{name}");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@ namespace osu.Game.Rulesets.Judgements
break;
}
Expire();
Expire(true);
}
}
}

View File

@ -17,8 +17,26 @@ namespace osu.Game.Rulesets.Judgements
/// </summary>
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;
/// <summary>
/// Whether this judgement is the final judgement for the hit object.
/// </summary>
public bool Final = true;
/// <summary>
/// The offset from a perfect hit at which this judgement occurred.
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.

View File

@ -13,6 +13,7 @@ using OpenTK.Graphics;
using osu.Game.Audio;
using System.Linq;
using osu.Game.Graphics;
using osu.Framework.Configuration;
namespace osu.Game.Rulesets.Objects.Drawables
{
@ -30,6 +31,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// </summary>
public virtual bool DisplayJudgement => true;
public override bool RemoveCompletedTransforms => false;
public override bool RemoveWhenNotAlive => false;
protected DrawableHitObject(HitObject hitObject)
{
HitObject = hitObject;
@ -40,6 +44,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
where TObject : HitObject
{
public event Action<DrawableHitObject, Judgement> OnJudgement;
public event Action<DrawableHitObject, Judgement> OnJudgementRemoved;
public new readonly TObject HitObject;
@ -56,31 +61,42 @@ namespace osu.Game.Rulesets.Objects.Drawables
protected List<SampleChannel> Samples = new List<SampleChannel>();
public readonly Bindable<ArmedState> State = new Bindable<ArmedState>();
protected DrawableHitObject(TObject hitObject)
: base(hitObject)
{
HitObject = hitObject;
}
private ArmedState state;
public ArmedState State
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
get { return state; }
set
foreach (SampleInfo sample in HitObject.Samples)
{
if (state == value)
return;
state = value;
SampleChannel channel = audio.Sample.Get($@"Gameplay/{sample.Bank}-{sample.Name}");
if (!IsLoaded)
return;
if (channel == null)
continue;
channel.Volume.Value = sample.Volume;
Samples.Add(channel);
}
}
protected override void LoadComplete()
{
base.LoadComplete();
State.ValueChanged += state =>
{
UpdateState(state);
if (State == ArmedState.Hit)
PlaySamples();
}
};
State.TriggerChange();
}
protected void PlaySamples()
@ -88,21 +104,13 @@ namespace osu.Game.Rulesets.Objects.Drawables
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 judgementFinalized => judgements.LastOrDefault()?.Final == true;
/// <summary>
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been judged.
/// </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>
/// 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>
protected void AddJudgement(Judgement judgement)
{
hasJudgementResult = judgement.Result >= HitResult.Miss;
judgementOccurred = true;
// 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:
break;
case HitResult.Miss:
State = ArmedState.Miss;
State.Value = ArmedState.Miss;
break;
default:
State = ArmedState.Hit;
State.Value = ArmedState.Hit;
break;
}
@ -152,7 +159,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
judgementOccurred |= d.UpdateJudgement(userTriggered);
}
if (!ProvidesJudgement || hasJudgementResult || judgementOccurred)
if (!ProvidesJudgement || judgementFinalized || judgementOccurred)
return judgementOccurred;
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>
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()
{
base.UpdateAfterChildren();
@ -177,21 +203,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
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;
protected IEnumerable<DrawableHitObject<TObject>> NestedHitObjects => nestedHitObjects;
@ -201,6 +212,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
nestedHitObjects = new List<DrawableHitObject<TObject>>();
h.OnJudgement += (d, j) => OnJudgement?.Invoke(d, j);
h.OnJudgementRemoved += (d, j) => OnJudgementRemoved?.Invoke(d, j);
nestedHitObjects.Add(h);
}

View File

@ -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 (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;
}
//if we didn't change frames, we need to ensure we are allowed to run frames in between, else return null.
if (inImportantSection)

View File

@ -174,6 +174,7 @@ namespace osu.Game.Rulesets.Scoring
private double maxBaseScore;
private double rollingMaxBaseScore;
private double baseScore;
private double bonusScore;
protected ScoreProcessor()
{
@ -184,6 +185,7 @@ namespace osu.Game.Rulesets.Scoring
Debug.Assert(base_portion + combo_portion == 1.0);
rulesetContainer.OnJudgement += AddJudgement;
rulesetContainer.OnJudgementRemoved += RemoveJudgement;
SimulateAutoplay(rulesetContainer.Beatmap);
Reset(true);
@ -212,14 +214,26 @@ namespace osu.Game.Rulesets.Scoring
protected void AddJudgement(Judgement judgement)
{
OnNewJudgement(judgement);
NotifyNewJudgement(judgement);
updateScore();
NotifyNewJudgement(judgement);
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)
{
double bonusScore = 0;
judgement.ComboAtJudgement = Combo;
judgement.HighestComboAtJudgement = HighestCombo;
if (judgement.AffectsCombo)
{
@ -242,7 +256,30 @@ namespace osu.Game.Rulesets.Scoring
}
else if (judgement.IsHit)
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)
Accuracy.Value = baseScore / rollingMaxBaseScore;
@ -271,6 +308,7 @@ namespace osu.Game.Rulesets.Scoring
Hits = 0;
baseScore = 0;
rollingMaxBaseScore = 0;
bonusScore = 0;
}
}

View File

@ -104,6 +104,7 @@ namespace osu.Game.Rulesets.UI
where TObject : HitObject
{
public event Action<Judgement> OnJudgement;
public event Action<Judgement> OnJudgementRemoved;
/// <summary>
/// The Beatmap
@ -241,6 +242,8 @@ namespace osu.Game.Rulesets.UI
OnJudgement?.Invoke(j);
};
drawableObject.OnJudgementRemoved += (d, j) => OnJudgementRemoved?.Invoke(j);
Playfield.Add(drawableObject);
}

View File

@ -76,6 +76,8 @@ namespace osu.Game.Rulesets.UI
#region Clock control
protected override bool ShouldProcessClock => false; // We handle processing the clock ourselves
private ManualClock clock;
private IFrameBasedClock parentClock;
@ -151,6 +153,12 @@ namespace osu.Game.Rulesets.UI
}
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();
}

View File

@ -114,7 +114,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
}
/// <summary>
/// Zoom target as a relative position in the <see cref="Content"/> space.
/// Zoom target as a relative position in the <see cref="ScrollingTimelineContainer.Content"/> space.
/// </summary>
private float? relativeContentZoomTarget;

View File

@ -24,7 +24,6 @@ namespace osu.Game.Screens
{
base.LogoArriving(logo, resuming);
logo.RelativePositionAxes = Axes.None;
logo.Triangles = false;
logo.Origin = Anchor.BottomRight;
logo.Anchor = Anchor.BottomRight;
@ -47,11 +46,7 @@ namespace osu.Game.Screens
protected override void LogoSuspending(OsuLogo logo)
{
base.LogoSuspending(logo);
logo.FadeOut(100).OnComplete(l =>
{
l.Anchor = Anchor.TopLeft;
l.Origin = Anchor.Centre;
});
logo.FadeOut(100);
}
[BackgroundDependencyLoader]

View File

@ -12,7 +12,6 @@ using osu.Framework.MathUtils;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.IO;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Backgrounds;
using OpenTK;
using OpenTK.Graphics;
@ -21,8 +20,6 @@ namespace osu.Game.Screens.Menu
{
public class Intro : OsuScreen
{
private readonly IntroSequence introSequence;
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
/// <summary>
@ -43,7 +40,6 @@ namespace osu.Game.Screens.Menu
private Bindable<bool> menuVoice;
private Bindable<bool> menuMusic;
private Track track;
private readonly ParallaxContainer parallax;
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
@ -127,8 +123,6 @@ namespace osu.Game.Screens.Menu
if (!resuming)
{
logo.Triangles = true;
logo.ScaleTo(1);
logo.FadeIn();
logo.PlayIntro();

View File

@ -112,14 +112,20 @@ namespace osu.Game.Screens.Menu
buttons.SetOsuLogo(logo);
logo.Triangles = true;
logo.Ripple = false;
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)
@ -148,7 +154,7 @@ namespace osu.Game.Screens.Menu
Content.FadeOut(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)
@ -159,13 +165,6 @@ namespace osu.Game.Screens.Menu
//we may have consumed our preloaded instance, so let's make another.
preloadSongSelect();
const float length = 300;
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)

View File

@ -221,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]
private void load(TextureStore textures, AudioManager audio)
{

View File

@ -76,7 +76,7 @@ namespace osu.Game.Screens
protected override void OnResuming(Screen last)
{
base.OnResuming(last);
logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, true));
logo.AppendAnimatingAction(() => LogoArriving(logo, true), true);
sampleExit?.Play();
}
@ -118,11 +118,11 @@ namespace osu.Game.Screens
}
if ((logo = lastOsu?.logo) == null)
AddInternal(logo = new OsuLogo());
LoadComponentAsync(logo = new OsuLogo { Alpha = 0 }, AddInternal);
logo.AppendAnimatingAction(() => LogoArriving(logo, false), true);
base.OnEntering(last);
logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, false));
}
protected override bool OnExiting(Screen next)
@ -155,12 +155,16 @@ namespace osu.Game.Screens
{
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.ClearTransforms();
LogoExiting(logo);
logo.AppendAnimatingAction(() => { LogoExiting(logo); }, false);
}
/// <summary>
@ -172,8 +176,7 @@ namespace osu.Game.Screens
private void onSuspendingLogo()
{
logo.ClearTransforms();
LogoSuspending(logo);
logo.AppendAnimatingAction(() => { LogoSuspending(logo); }, false);
}
/// <summary>

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps.Timing;
using osu.Game.Rulesets.Scoring;
using System.Collections.Generic;
using osu.Framework.Graphics.UserInterface;
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 LetterboxOverlay letterboxOverlay;
private readonly Container remainingTimeAdjustmentBox;
@ -101,38 +104,41 @@ namespace osu.Game.Screens.Play.BreaksOverlay
if (!b.HasEffect)
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))
{
Schedule(() => onBreakIn(b));
Schedule(showBreak);
using (BeginDelayedSequence(b.Duration - fade_duration))
Schedule(onBreakOut);
Schedule(hideBreak);
}
}
}
private void onBreakIn(BreakPeriod b)
private void showBreak()
{
if (letterboxing)
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();
info.Show();
arrowsOverlay.Show();
}
private void onBreakOut()
private void hideBreak()
{
if (letterboxing)
letterboxOverlay.Hide();

View File

@ -1,65 +1,37 @@
// 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.Containers;
using osu.Game.Graphics.Sprites;
using osu.Framework.Graphics;
using System;
using osu.Game.Beatmaps.Timing;
using osu.Framework.Graphics.UserInterface;
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 readonly OsuSpriteText counter;
private int? previousSecond;
private double endTime;
private bool isCounting;
public RemainingTimeCounter()
{
AutoSizeAxes = Axes.Both;
Child = counter = new OsuSpriteText
InternalChild = counter = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 33,
Font = "Venera",
};
Alpha = 0;
}
public void StartCounting(double endTime)
{
this.endTime = endTime;
isCounting = true;
}
protected override void OnCountChanged(double count) => counter.Text = ((int)Math.Ceiling(count / 1000)).ToString();
protected override void Update()
{
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);
public override void Show() => this.FadeIn(fade_duration);
public override void Hide() => this.FadeOut(fade_duration);
}
}

View 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);
}
}
}

View File

@ -32,6 +32,7 @@ namespace osu.Game.Screens.Play
public readonly HealthDisplay HealthDisplay;
public readonly SongProgress Progress;
public readonly ModDisplay ModDisplay;
public readonly ReplaySettingsOverlay ReplaySettingsOverlay;
private Bindable<bool> showHud;
private bool replayLoaded;
@ -55,7 +56,7 @@ namespace osu.Game.Screens.Play
HealthDisplay = CreateHealthDisplay(),
Progress = CreateProgress(),
ModDisplay = CreateModsContainer(),
//ReplaySettingsOverlay = CreateReplaySettingsOverlay(),
ReplaySettingsOverlay = CreateReplaySettingsOverlay(),
}
});
}
@ -96,9 +97,14 @@ namespace osu.Game.Screens.Play
replayLoaded = rulesetContainer.HasReplayLoaded;
ReplaySettingsOverlay.ReplayLoaded = replayLoaded;
// in the case a replay isn't loaded, we want some elements to only appear briefly.
if (!replayLoaded)
{
ReplaySettingsOverlay.Hide();
ModDisplay.Delay(2000).FadeOut(200);
}
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
@ -176,12 +182,7 @@ namespace osu.Game.Screens.Play
Margin = new MarginPadding { Top = 20, Right = 10 },
};
//protected virtual ReplaySettingsOverlay CreateReplaySettingsOverlay() => new ReplaySettingsOverlay
//{
// Anchor = Anchor.TopRight,
// Origin = Anchor.TopRight,
// Margin = new MarginPadding { Top = 100, Right = 10 },
//};
protected virtual ReplaySettingsOverlay CreateReplaySettingsOverlay() => new ReplaySettingsOverlay();
public virtual void BindProcessor(ScoreProcessor processor)
{

View File

@ -17,6 +17,8 @@ using osu.Game.Rulesets.UI;
using osu.Game.Screens.Backgrounds;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using osu.Framework.Threading;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
@ -142,16 +144,6 @@ namespace osu.Game.Screens.Play
userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
userAudioOffset.TriggerChange();
Schedule(() =>
{
adjustableSourceClock.Reset();
foreach (var mod in working.Mods.Value.OfType<IApplicableToClock>())
mod.ApplyToClock(adjustableSourceClock);
decoupledClock.ChangeSource(adjustableSourceClock);
});
Children = new Drawable[]
{
storyboardContainer = new Container
@ -230,11 +222,20 @@ namespace osu.Game.Screens.Play
breakOverlay.BindProcessor(scoreProcessor);
hudOverlay.ReplaySettingsOverlay.PlaybackSettings.AdjustableClock = adjustableSourceClock;
// Bind ScoreProcessor to ourselves
scoreProcessor.AllJudged += onCompletion;
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)
{
var beatmap = Beatmap.Value.Beatmap;
@ -312,10 +313,26 @@ namespace osu.Game.Screens.Play
.Delay(250)
.FadeIn(250);
this.Delay(750).Schedule(() =>
Task.Run(() =>
{
if (!pauseContainer.IsPaused)
decoupledClock.Start();
adjustableSourceClock.Reset();
// 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;
@ -332,6 +349,9 @@ namespace osu.Game.Screens.Play
{
if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || RulesetContainer?.HasReplayLoaded != false)
{
// In the case of replays, we may have changed the playback rate.
applyRateFromMods();
fadeOut();
return base.OnExiting(next);
}

View File

@ -99,7 +99,6 @@ namespace osu.Game.Screens.Play
{
base.LogoArriving(logo, resuming);
logo.ClearTransforms(targetMember: nameof(Position));
logo.RelativePositionAxes = Axes.Both;
logo.ScaleTo(new Vector2(0.15f), 300, Easing.In);

View File

@ -1,28 +1,76 @@
// 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.Allocation;
using osu.Game.Configuration;
using osu.Framework.Timing;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Play.ReplaySettings
{
public class PlaybackSettings : ReplayGroup
{
private const int padding = 10;
protected override string Title => @"playback";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
public IAdjustableClock AdjustableClock { set; get; }
private readonly ReplaySliderBar<double> sliderbar;
public PlaybackSettings()
{
OsuSpriteText multiplierText;
Children = new Drawable[]
{
new ReplaySliderBar<double>
new Container
{
LabelText = "Playback speed",
Bindable = config.GetBindable<double>(OsuSetting.PlaybackSpeed),
KeyboardStep = 0.5f
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
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;
}
}
}

View File

@ -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());
}
}
}

View File

@ -315,9 +315,7 @@ namespace osu.Game.Screens.Select
{
base.LogoArriving(logo, resuming);
logo.ClearTransforms();
logo.RelativePositionAxes = Axes.Both;
Vector2 position = new Vector2(0.95f, 0.96f);
if (logo.Alpha > 0.8f)
@ -340,8 +338,8 @@ namespace osu.Game.Screens.Select
protected override void LogoExiting(OsuLogo logo)
{
base.LogoExiting(logo);
logo.ScaleTo(0.2f, logo_transition, Easing.OutQuint);
logo.FadeOut(logo_transition, Easing.OutQuint);
logo.ScaleTo(0.2f, logo_transition / 2, Easing.Out);
logo.FadeOut(logo_transition / 2, Easing.Out);
}
private void beatmap_ValueChanged(WorkingBeatmap beatmap)

View File

@ -88,6 +88,9 @@
<HintPath>$(SolutionDir)\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
<Private>True</Private>
</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">
<HintPath>$(SolutionDir)\packages\Microsoft.Data.Sqlite.Core.2.0.0\lib\netstandard2.0\Microsoft.Data.Sqlite.dll</HintPath>
</Reference>
@ -279,6 +282,9 @@
<Compile Include="Migrations\OsuDbContextModelSnapshot.cs" />
<Compile Include="Online\API\Requests\GetBeatmapSetRequest.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\PaginatedScoreContainer.cs" />
<Compile Include="Overlays\Profile\Sections\Ranks\DrawableTotalScore.cs" />
@ -688,7 +694,7 @@
<Compile Include="Screens\Play\Player.cs" />
<Compile Include="Screens\Play\PlayerLoader.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\DiscussionSettings.cs" />
<Compile Include="Screens\Play\ReplaySettings\PlaybackSettings.cs" />

View File

@ -5,6 +5,48 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste
-->
<packages>
<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.Data.Sqlite.Core" version="2.0.0" targetFramework="net461" />
<package id="Microsoft.EntityFrameworkCore" version="2.0.0" targetFramework="net461" />