Merge remote-tracking branch 'upstream/master' into beatmap-overlay-download

This commit is contained in:
naoey
2017-11-15 17:38:38 +05:30
50 changed files with 635 additions and 1300 deletions

View File

@ -233,7 +233,8 @@ namespace osu.Desktop.Overlays
Text = @"Update ready to install. Click to restart!", Text = @"Update ready to install. Click to restart!",
Activated = () => 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(); game.GracefullyExit();
return true; return true;
} }

View File

@ -39,7 +39,7 @@ namespace osu.Game.Tests.Visual
StarDifficulty = 5.3f, StarDifficulty = 5.3f,
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -63,7 +63,7 @@ namespace osu.Game.Tests.Visual
StarDifficulty = 4.8f, StarDifficulty = 4.8f,
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
}, },
}); });

View File

@ -53,6 +53,7 @@ namespace osu.Game.Tests.Visual
Submitted = new DateTime(2016, 2, 10), Submitted = new DateTime(2016, 2, 10),
Ranked = new DateTime(2016, 6, 19), Ranked = new DateTime(2016, 6, 19),
BPM = 236, BPM = 236,
HasVideo = true,
Covers = new BeatmapSetOnlineCovers Covers = new BeatmapSetOnlineCovers
{ {
Cover = @"https://assets.ppy.sh/beatmaps/415886/covers/cover.jpg?1465651778", Cover = @"https://assets.ppy.sh/beatmaps/415886/covers/cover.jpg?1465651778",
@ -75,7 +76,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 115000, Length = 115000,
HasVideo = false,
CircleCount = 265, CircleCount = 265,
SliderCount = 71, SliderCount = 71,
PlayCount = 47906, PlayCount = 47906,
@ -83,7 +83,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -103,7 +103,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 118000, Length = 118000,
HasVideo = true,
CircleCount = 592, CircleCount = 592,
SliderCount = 62, SliderCount = 62,
PlayCount = 162021, PlayCount = 162021,
@ -111,7 +110,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -131,7 +130,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 118000, Length = 118000,
HasVideo = false,
CircleCount = 1042, CircleCount = 1042,
SliderCount = 79, SliderCount = 79,
PlayCount = 225178, PlayCount = 225178,
@ -139,7 +137,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -159,7 +157,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 118000, Length = 118000,
HasVideo = false,
CircleCount = 1352, CircleCount = 1352,
SliderCount = 69, SliderCount = 69,
PlayCount = 131545, PlayCount = 131545,
@ -167,7 +164,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -187,7 +184,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 118000, Length = 118000,
HasVideo = false,
CircleCount = 1730, CircleCount = 1730,
SliderCount = 115, SliderCount = 115,
PlayCount = 117673, PlayCount = 117673,
@ -195,7 +191,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -227,6 +223,7 @@ namespace osu.Game.Tests.Visual
Submitted = new DateTime(2016, 6, 11), Submitted = new DateTime(2016, 6, 11),
Ranked = new DateTime(2016, 7, 12), Ranked = new DateTime(2016, 7, 12),
BPM = 160, BPM = 160,
HasVideo = false,
Covers = new BeatmapSetOnlineCovers Covers = new BeatmapSetOnlineCovers
{ {
Cover = @"https://assets.ppy.sh/beatmaps/625493/covers/cover.jpg?1499167472", Cover = @"https://assets.ppy.sh/beatmaps/625493/covers/cover.jpg?1499167472",
@ -249,7 +246,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 193000, Length = 193000,
HasVideo = false,
CircleCount = 262, CircleCount = 262,
SliderCount = 0, SliderCount = 0,
PlayCount = 3952, PlayCount = 3952,
@ -257,7 +253,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -277,7 +273,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 193000, Length = 193000,
HasVideo = false,
CircleCount = 464, CircleCount = 464,
SliderCount = 0, SliderCount = 0,
PlayCount = 4833, PlayCount = 4833,
@ -285,7 +280,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -305,7 +300,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 193000, Length = 193000,
HasVideo = false,
CircleCount = 712, CircleCount = 712,
SliderCount = 0, SliderCount = 0,
PlayCount = 4405, PlayCount = 4405,
@ -313,7 +307,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -333,7 +327,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 193000, Length = 193000,
HasVideo = false,
CircleCount = 943, CircleCount = 943,
SliderCount = 0, SliderCount = 0,
PlayCount = 3950, PlayCount = 3950,
@ -341,7 +334,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },
@ -361,7 +354,6 @@ namespace osu.Game.Tests.Visual
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
Length = 193000, Length = 193000,
HasVideo = false,
CircleCount = 1068, CircleCount = 1068,
SliderCount = 0, SliderCount = 0,
PlayCount = 5856, PlayCount = 5856,
@ -369,7 +361,7 @@ namespace osu.Game.Tests.Visual
}, },
Metrics = new BeatmapMetrics Metrics = new BeatmapMetrics
{ {
Ratings = Enumerable.Range(0, 10), Ratings = Enumerable.Range(0, 11),
Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6),
Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6),
}, },

View File

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

View File

@ -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 Newtonsoft.Json;
namespace osu.Game.Beatmaps namespace osu.Game.Beatmaps
{ {
/// <summary> /// <summary>
@ -15,33 +13,24 @@ namespace osu.Game.Beatmaps
/// </summary> /// </summary>
public double Length { get; set; } public double Length { get; set; }
/// <summary>
/// Whether or not this beatmap has a background video.
/// </summary>
public bool HasVideo { get; set; }
/// <summary> /// <summary>
/// The amount of circles in this beatmap. /// The amount of circles in this beatmap.
/// </summary> /// </summary>
[JsonProperty(@"count_circles")]
public int CircleCount { get; set; } public int CircleCount { get; set; }
/// <summary> /// <summary>
/// The amount of sliders in this beatmap. /// The amount of sliders in this beatmap.
/// </summary> /// </summary>
[JsonProperty(@"count_sliders")]
public int SliderCount { get; set; } public int SliderCount { get; set; }
/// <summary> /// <summary>
/// The amount of plays this beatmap has. /// The amount of plays this beatmap has.
/// </summary> /// </summary>
[JsonProperty(@"playcount")]
public int PlayCount { get; set; } public int PlayCount { get; set; }
/// <summary> /// <summary>
/// The amount of passes this beatmap has. /// The amount of passes this beatmap has.
/// </summary> /// </summary>
[JsonProperty(@"passcount")]
public int PassCount { get; set; } public int PassCount { get; set; }
} }
} }

View File

@ -26,16 +26,19 @@ namespace osu.Game.Beatmaps
/// </summary> /// </summary>
public DateTimeOffset? LastUpdated { get; set; } public DateTimeOffset? LastUpdated { get; set; }
/// <summary>
/// Whether or not this beatmap set has a background video.
/// </summary>
public bool HasVideo { get; set; }
/// <summary> /// <summary>
/// The different sizes of cover art for this beatmap set. /// The different sizes of cover art for this beatmap set.
/// </summary> /// </summary>
[JsonProperty(@"covers")]
public BeatmapSetOnlineCovers Covers { get; set; } public BeatmapSetOnlineCovers Covers { get; set; }
/// <summary> /// <summary>
/// A small sample clip of this beatmap set's song. /// A small sample clip of this beatmap set's song.
/// </summary> /// </summary>
[JsonProperty(@"previewUrl")]
public string Preview { get; set; } public string Preview { get; set; }
/// <summary> /// <summary>
@ -46,13 +49,11 @@ namespace osu.Game.Beatmaps
/// <summary> /// <summary>
/// The amount of plays this beatmap set has. /// The amount of plays this beatmap set has.
/// </summary> /// </summary>
[JsonProperty(@"play_count")]
public int PlayCount { get; set; } public int PlayCount { get; set; }
/// <summary> /// <summary>
/// The amount of people who have favourited this beatmap set. /// The amount of people who have favourited this beatmap set.
/// </summary> /// </summary>
[JsonProperty(@"favourite_count")]
public int FavouriteCount { get; set; } public int FavouriteCount { get; set; }
} }

View File

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

View File

@ -139,6 +139,8 @@ namespace osu.Game.Graphics.Containers
public void ScrollTo(Drawable section) => scrollContainer.ScrollTo(scrollContainer.GetChildPosInContent(section) - (FixedHeader?.BoundingBox.Height ?? 0)); public void ScrollTo(Drawable section) => scrollContainer.ScrollTo(scrollContainer.GetChildPosInContent(section) - (FixedHeader?.BoundingBox.Height ?? 0));
public void ScrollToTop() => scrollContainer.ScrollTo(0);
private float lastKnownScroll; private float lastKnownScroll;
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()
{ {

View File

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

View File

@ -19,7 +19,7 @@ namespace osu.Game.IO
{ {
public readonly IResourceStore<byte[]> Store; 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")) 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) 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();

View File

@ -6,6 +6,7 @@ using System.Linq;
using Newtonsoft.Json; using Newtonsoft.Json;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using System;
namespace osu.Game.Online.API.Requests namespace osu.Game.Online.API.Requests
{ {
@ -14,7 +15,7 @@ namespace osu.Game.Online.API.Requests
[JsonProperty(@"covers")] [JsonProperty(@"covers")]
private BeatmapSetOnlineCovers covers { get; set; } private BeatmapSetOnlineCovers covers { get; set; }
[JsonProperty(@"previewUrl")] [JsonProperty(@"preview_url")]
private string preview { get; set; } private string preview { get; set; }
[JsonProperty(@"play_count")] [JsonProperty(@"play_count")]
@ -23,6 +24,21 @@ namespace osu.Game.Online.API.Requests
[JsonProperty(@"favourite_count")] [JsonProperty(@"favourite_count")]
private int favouriteCount { get; set; } private int favouriteCount { get; set; }
[JsonProperty(@"bpm")]
private double bpm { get; set; }
[JsonProperty(@"video")]
private bool hasVideo { get; set; }
[JsonProperty(@"submitted_date")]
private DateTimeOffset submitted { get; set; }
[JsonProperty(@"ranked_date")]
private DateTimeOffset ranked { get; set; }
[JsonProperty(@"last_updated")]
private DateTimeOffset lastUpdated { get; set; }
[JsonProperty(@"user_id")] [JsonProperty(@"user_id")]
private long creatorId { private long creatorId {
set { Author.Id = value; } set { Author.Id = value; }
@ -43,6 +59,11 @@ namespace osu.Game.Online.API.Requests
Preview = preview, Preview = preview,
PlayCount = playCount, PlayCount = playCount,
FavouriteCount = favouriteCount, FavouriteCount = favouriteCount,
BPM = bpm,
HasVideo = hasVideo,
Submitted = submitted,
Ranked = ranked,
LastUpdated = lastUpdated,
}, },
Beatmaps = beatmaps.Select(b => b.ToBeatmap(rulesets)).ToList(), Beatmaps = beatmaps.Select(b => b.ToBeatmap(rulesets)).ToList(),
}; };
@ -62,6 +83,30 @@ namespace osu.Game.Online.API.Requests
[JsonProperty(@"difficulty_rating")] [JsonProperty(@"difficulty_rating")]
private double starDifficulty { get; set; } private double starDifficulty { get; set; }
[JsonProperty(@"drain")]
private float drainRate { get; set; }
[JsonProperty(@"cs")]
private float circleSize { get; set; }
[JsonProperty(@"ar")]
private float approachRate { get; set; }
[JsonProperty(@"accuracy")]
private float overallDifficulty { get; set; }
[JsonProperty(@"total_length")]
private double length { get; set; }
[JsonProperty(@"count_circles")]
private int circleCount { get; set; }
[JsonProperty(@"count_sliders")]
private int sliderCount { get; set; }
[JsonProperty(@"version")]
private string version { get; set; }
public BeatmapInfo ToBeatmap(RulesetStore rulesets) public BeatmapInfo ToBeatmap(RulesetStore rulesets)
{ {
return new BeatmapInfo return new BeatmapInfo
@ -69,10 +114,21 @@ namespace osu.Game.Online.API.Requests
Metadata = this, Metadata = this,
Ruleset = rulesets.GetRuleset(ruleset), Ruleset = rulesets.GetRuleset(ruleset),
StarDifficulty = starDifficulty, StarDifficulty = starDifficulty,
Version = version,
BaseDifficulty = new BeatmapDifficulty
{
DrainRate = drainRate,
CircleSize = circleSize,
ApproachRate = approachRate,
OverallDifficulty = overallDifficulty,
},
OnlineInfo = new BeatmapOnlineInfo OnlineInfo = new BeatmapOnlineInfo
{ {
PlayCount = playCount, PlayCount = playCount,
PassCount = passCount, PassCount = passCount,
Length = length,
CircleCount = circleCount,
SliderCount = sliderCount,
}, },
}; };
} }

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

@ -39,9 +39,9 @@ namespace osu.Game.Overlays.BeatmapSet
if (value == beatmap) return; if (value == beatmap) return;
beatmap = value; beatmap = value;
length.Value = TimeSpan.FromMilliseconds(beatmap.OnlineInfo.Length).ToString(@"m\:ss"); length.Value = TimeSpan.FromSeconds(beatmap.OnlineInfo.Length).ToString(@"m\:ss");
circleCount.Value = beatmap.OnlineInfo.CircleCount.ToString("N0"); circleCount.Value = beatmap.OnlineInfo.CircleCount.ToString();
sliderCount.Value = beatmap.OnlineInfo.SliderCount.ToString("N0"); sliderCount.Value = beatmap.OnlineInfo.SliderCount.ToString();
} }
} }

View File

@ -26,6 +26,8 @@ namespace osu.Game.Overlays.BeatmapSet
private readonly Box tabsBg; private readonly Box tabsBg;
private readonly Container coverContainer; private readonly Container coverContainer;
private readonly OsuSpriteText title, artist; private readonly OsuSpriteText title, artist;
private readonly Container noVideoButtons;
private readonly FillFlowContainer videoButtons;
private readonly AuthorInfo author; private readonly AuthorInfo author;
private readonly Container downloadButtonsContainer; private readonly Container downloadButtonsContainer;
public Details Details; public Details Details;
@ -51,6 +53,9 @@ namespace osu.Game.Overlays.BeatmapSet
title.Text = BeatmapSet.Metadata.Title; title.Text = BeatmapSet.Metadata.Title;
artist.Text = BeatmapSet.Metadata.Artist; artist.Text = BeatmapSet.Metadata.Artist;
noVideoButtons.FadeTo(BeatmapSet.OnlineInfo.HasVideo ? 0 : 1, transition_duration);
videoButtons.FadeTo(BeatmapSet.OnlineInfo.HasVideo ? 1 : 0, transition_duration);
cover?.FadeOut(400, Easing.Out); cover?.FadeOut(400, Easing.Out);
coverContainer.Add(cover = new DelayedLoadWrapper(new BeatmapSetCover(BeatmapSet) coverContainer.Add(cover = new DelayedLoadWrapper(new BeatmapSetCover(BeatmapSet)
{ {
@ -82,9 +87,6 @@ namespace osu.Game.Overlays.BeatmapSet
Radius = 3, Radius = 3,
Offset = new Vector2(0f, 1f), Offset = new Vector2(0f, 1f),
}; };
Container noVideoButtons;
FillFlowContainer videoButtons;
Children = new Drawable[] Children = new Drawable[]
{ {
new Container new Container
@ -216,21 +218,7 @@ namespace osu.Game.Overlays.BeatmapSet
}, },
}; };
Picker.Beatmap.ValueChanged += b => Picker.Beatmap.ValueChanged += b => Details.Beatmap = b;
{
Details.Beatmap = b;
if (b.OnlineInfo.HasVideo)
{
noVideoButtons.FadeOut(transition_duration);
videoButtons.FadeIn(transition_duration);
}
else
{
noVideoButtons.FadeIn(transition_duration);
videoButtons.FadeOut(transition_duration);
}
};
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -74,20 +74,18 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Right = metadata_width + BeatmapSetOverlay.RIGHT_WIDTH + spacing * 2 }, Padding = new MarginPadding { Right = metadata_width + BeatmapSetOverlay.RIGHT_WIDTH + spacing * 2 },
Child = new ScrollContainer Child = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ScrollbarVisible = false,
Child = description = new MetadataSection("Description"), Child = description = new MetadataSection("Description"),
}, },
}, },
new ScrollContainer new Container
{ {
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = metadata_width, Width = metadata_width,
ScrollbarVisible = false,
Padding = new MarginPadding { Horizontal = 10 }, Padding = new MarginPadding { Horizontal = 10 },
Margin = new MarginPadding { Right = BeatmapSetOverlay.RIGHT_WIDTH + spacing }, Margin = new MarginPadding { Right = BeatmapSetOverlay.RIGHT_WIDTH + spacing },
Child = new FillFlowContainer Child = new FillFlowContainer

View File

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

View File

@ -33,6 +33,8 @@ namespace osu.Game.Overlays
private RulesetStore rulesets; private RulesetStore rulesets;
private BeatmapManager manager; private BeatmapManager manager;
private readonly ScrollContainer scroll;
// receive input outside our bounds so we can trigger a close event on ourselves. // receive input outside our bounds so we can trigger a close event on ourselves.
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true; public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
@ -64,7 +66,7 @@ namespace osu.Game.Overlays
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(0.2f) Colour = OsuColour.Gray(0.2f)
}, },
new ScrollContainer scroll = new ScrollContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
ScrollbarVisible = false, ScrollbarVisible = false,
@ -130,6 +132,7 @@ namespace osu.Game.Overlays
{ {
currentBeatmap = header.BeatmapSet = info.BeatmapSet = set; currentBeatmap = header.BeatmapSet = info.BeatmapSet = set;
Show(); Show();
scroll.ScrollTo(0);
} }
} }
} }

View File

@ -29,6 +29,7 @@ namespace osu.Game.Overlays.Direct
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap) 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) 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) switch (displayStyle)
{ {
case PanelDisplayStyle.Grid: case PanelDisplayStyle.Grid:
return new DirectGridPanel(b) { Width = 400 }; return new DirectGridPanel(b);
default: default:
return new DirectListPanel(b); 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>. // 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,16 @@ 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"),
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() 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] [BackgroundDependencyLoader]
private new void load(OsuColour colour) private void load(OsuColour colour)
{ {
double pp = Score.PP ?? 0; double pp = Score.PP ?? 0;
Stats.Add(new OsuSpriteText Stats.Add(new OsuSpriteText

View File

@ -7,7 +7,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Select.Leaderboards; using osu.Game.Screens.Select.Leaderboards;
@ -15,66 +14,113 @@ using System.Linq;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI; 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 namespace osu.Game.Overlays.Profile.Sections.Ranks
{ {
public abstract class DrawableScore : Container public abstract class DrawableScore : Container
{ {
private const int fade_duration = 200;
protected readonly FillFlowContainer<OsuSpriteText> Stats; protected readonly FillFlowContainer<OsuSpriteText> Stats;
private readonly FillFlowContainer metadata; private readonly FillFlowContainer metadata;
private readonly ModContainer modContainer; private readonly ModContainer modContainer;
protected readonly Score Score; protected readonly Score Score;
private readonly Box underscoreLine;
private readonly Box coloredBackground;
private readonly Container background;
protected DrawableScore(Score score) protected DrawableScore(Score score)
{ {
Score = score; Score = score;
RelativeSizeAxes = Axes.X;
Height = 60;
Children = new Drawable[] Children = new Drawable[]
{ {
new DrawableRank(score.Rank) background = new Container
{ {
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Both,
Width = 60, Masking = true,
FillMode = FillMode.Fit, CornerRadius = 3,
}, Alpha = 0,
Stats = new FillFlowContainer<OsuSpriteText> EdgeEffect = new EdgeEffectParameters
{
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(), Type = EdgeEffectType.Shadow,
TextSize = 11, Offset = new Vector2(0f, 1f),
Colour = OsuColour.Gray(0xAA), Radius = 1f,
Depth = -1, Colour = Color4.Black.Opacity(0.2f),
}, },
Child = coloredBackground = new Box { RelativeSizeAxes = Axes.Both }
}, },
modContainer = new ModContainer new Container
{ {
AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Both,
Anchor = Anchor.CentreRight, Anchor = Anchor.TopCentre,
Origin = Anchor.CentreRight, Origin = Anchor.TopCentre,
Width = 60, Width = 0.97f,
Margin = new MarginPadding { Right = 150 } 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)] [BackgroundDependencyLoader(true)]
private void load(OsuColour colour, LocalisationEngine locale, BeatmapSetOverlay beatmapSetOverlay) private void load(OsuColour colour, LocalisationEngine locale, BeatmapSetOverlay beatmapSetOverlay)
{ {
coloredBackground.Colour = underscoreLine.Colour = colour.Gray4;
Stats.Add(new OsuSpriteText Stats.Add(new OsuSpriteText
{ {
Text = $"accuracy: {Score.Accuracy:P2}", Text = $"accuracy: {Score.Accuracy:P2}",
@ -86,7 +132,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Depth = -1, Depth = -1,
}); });
metadata.Add(new OsuHoverContainer metadata.Add(new MetadataContainer(Score.Beatmap.Metadata.Title, Score.Beatmap.Metadata.Artist)
{ {
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Action = () => 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> private class ModContainer : FlowContainer<ModIcon>
{ {
protected override IEnumerable<Vector2> ComputeLayoutPositions() 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); 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] [BackgroundDependencyLoader]
private new void load() private void load()
{ {
Stats.Add(new OsuSpriteText Stats.Add(new OsuSpriteText
{ {

View File

@ -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,21 +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;
} }
drawableScore.RelativeSizeAxes = Axes.X; ItemsContainer.Add(drawableScore);
drawableScore.Height = 60;
scoreContainer.Add(drawableScore);
} }
}; };
api.Queue(req); Api.Queue(req);
} }
} }
} }

View File

@ -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. :("),
}; };
} }
} }

View File

@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Settings
private SpriteText text; private SpriteText text;
private readonly RestoreDefaultValueButton<T> restoreDefaultValueButton = new RestoreDefaultValueButton<T>(); private readonly RestoreDefaultValueButton restoreDefaultValueButton = new RestoreDefaultValueButton();
public bool ShowsDefaultIndicator = true; 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; private Bindable<T> bindable;
internal Bindable<T> Bindable internal Bindable<T> Bindable

View File

@ -91,12 +91,12 @@ namespace osu.Game.Overlays
sections = new ProfileSection[] sections = new ProfileSection[]
{ {
new AboutSection(), //new AboutSection(),
//new RecentSection(), //new RecentSection(),
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
@ -164,6 +164,7 @@ namespace osu.Game.Overlays
} }
Show(); Show();
sectionsContainer.ScrollToTop();
} }
private void userLoadComplete(User user) private void userLoadComplete(User user)

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

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

View File

@ -242,7 +242,7 @@ namespace osu.Game.Rulesets.UI
OnJudgement?.Invoke(j); OnJudgement?.Invoke(j);
}; };
drawableObject.OnJudgementRemoved += (d, j) => { OnJudgementRemoved?.Invoke(j); }; drawableObject.OnJudgementRemoved += (d, j) => OnJudgementRemoved?.Invoke(j);
Playfield.Add(drawableObject); Playfield.Add(drawableObject);
} }

View File

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

View File

@ -114,7 +114,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
} }
/// <summary> /// <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> /// </summary>
private float? relativeContentZoomTarget; private float? relativeContentZoomTarget;

View File

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

View File

@ -12,7 +12,6 @@ using osu.Framework.MathUtils;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.IO; using osu.Game.Beatmaps.IO;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Backgrounds;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -21,8 +20,6 @@ namespace osu.Game.Screens.Menu
{ {
public class Intro : OsuScreen public class Intro : OsuScreen
{ {
private readonly IntroSequence introSequence;
private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83"; private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83";
/// <summary> /// <summary>
@ -43,7 +40,6 @@ namespace osu.Game.Screens.Menu
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)
@ -127,8 +123,6 @@ namespace osu.Game.Screens.Menu
if (!resuming) if (!resuming)
{ {
logo.Triangles = true;
logo.ScaleTo(1); logo.ScaleTo(1);
logo.FadeIn(); logo.FadeIn();
logo.PlayIntro(); logo.PlayIntro();

View File

@ -112,9 +112,6 @@ namespace osu.Game.Screens.Menu
buttons.SetOsuLogo(logo); buttons.SetOsuLogo(logo);
logo.Triangles = true;
logo.Ripple = false;
logo.FadeColour(Color4.White, 100, Easing.OutQuint); logo.FadeColour(Color4.White, 100, Easing.OutQuint);
logo.FadeIn(100, Easing.OutQuint); logo.FadeIn(100, Easing.OutQuint);

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

View File

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

View File

@ -144,22 +144,6 @@ namespace osu.Game.Screens.Play
userAudioOffset.ValueChanged += v => offsetClock.Offset = v; userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
userAudioOffset.TriggerChange(); userAudioOffset.TriggerChange();
Task.Run(() =>
{
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();
});
});
Children = new Drawable[] Children = new Drawable[]
{ {
storyboardContainer = new Container storyboardContainer = new Container
@ -329,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;

View File

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

View File

@ -3,11 +3,16 @@
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Framework.Configuration; using osu.Framework.Configuration;
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";
public IAdjustableClock AdjustableClock { set; get; } public IAdjustableClock AdjustableClock { set; get; }
@ -16,17 +21,45 @@ namespace osu.Game.Screens.Play.ReplaySettings
public PlaybackSettings() public PlaybackSettings()
{ {
Child = sliderbar = new ReplaySliderBar<double> OsuSpriteText multiplierText;
Children = new Drawable[]
{ {
LabelText = "Playback speed", new Container
Bindable = new BindableDouble(1)
{ {
Default = 1, RelativeSizeAxes = Axes.X,
MinValue = 0.5, AutoSizeAxes = Axes.Y,
MaxValue = 2, Padding = new MarginPadding { Horizontal = padding },
Precision = 0.01, 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() protected override void LoadComplete()

View File

@ -30,9 +30,9 @@ namespace osu.Game.Screens.Select.Details
metrics = value; metrics = value;
var ratings = Metrics.Ratings.ToList(); var ratings = Metrics.Ratings.ToList();
negativeRatings.Text = ratings.GetRange(0, ratings.Count / 2).Sum().ToString(); negativeRatings.Text = ratings.GetRange(0, ratings.Count / 2 + 1).Sum().ToString();
positiveRatings.Text = ratings.GetRange(ratings.Count / 2, ratings.Count / 2).Sum().ToString(); positiveRatings.Text = ratings.GetRange(ratings.Count / 2 + 1, ratings.Count / 2).Sum().ToString();
ratingsBar.Length = (float)ratings.GetRange(0, ratings.Count / 2).Sum() / ratings.Sum(); ratingsBar.Length = (float)ratings.GetRange(0, ratings.Count / 2 + 1).Sum() / ratings.Sum();
graph.Values = Metrics.Ratings.Select(r => (float)r); graph.Values = Metrics.Ratings.Select(r => (float)r);
} }
} }

View File

@ -315,9 +315,7 @@ namespace osu.Game.Screens.Select
{ {
base.LogoArriving(logo, resuming); base.LogoArriving(logo, resuming);
logo.ClearTransforms();
logo.RelativePositionAxes = Axes.Both; logo.RelativePositionAxes = Axes.Both;
Vector2 position = new Vector2(0.95f, 0.96f); Vector2 position = new Vector2(0.95f, 0.96f);
if (logo.Alpha > 0.8f) if (logo.Alpha > 0.8f)

View File

@ -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" />

View File

@ -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" />