1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Merge remote-tracking branch 'refs/remotes/ppy/master' into new-betmap-search-filter

This commit is contained in:
Andrei Zavatski 2020-02-17 23:35:12 +03:00
commit c69818925b
8 changed files with 40 additions and 14 deletions

View File

@ -13,11 +13,13 @@ Rhythm is just a *click* away. The future of [osu!](https://osu.ppy.sh) and the
## Status
This project is still heavily under development, but is in a state where users are encouraged to try it out and keep it installed alongside the stable *osu!* client. It will continue to evolve over the coming months and hopefully bring some new unique features to the table.
This project is under heavy development, but is in a stable state. Users are encouraged to try it out and keep it installed alongside the stable *osu!* client. It will continue to evolve to the point of eventually replacing the existing stable client as an update.
We are accepting bug reports (please report with as much detail as possible). Feature requests are welcome as long as you read and understand the contribution guidelines listed below.
We are accepting bug reports (please report with as much detail as possible). Feature requests are also welcome, but understand that our focus is on completing the game to feature parity before adding new features. A few resources are available as starting points to getting involved and understanding the project:
Detailed changelogs are published on the [official osu! site](https://osu.ppy.sh/home/changelog).
- Detailed release changelogs are available on the [official osu! site](https://osu.ppy.sh/home/changelog/lazer).
- You can learn more about our approach to [project management](https://github.com/ppy/osu/wiki/Project-management).
- Read peppy's [latest blog post](https://blog.ppy.sh/a-definitive-lazer-faq/) exploring where lazer is currently and the roadmap going forward.
## Requirements

View File

@ -134,6 +134,22 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddAssert("playlist has 2 items", () => Room.Playlist.Count == 2);
}
[Test]
public void TestAddItemAfterRearrangement()
{
AddStep("create new item", () => songSelect.BeatmapDetails.CreateNewItem());
AddStep("create new item", () => songSelect.BeatmapDetails.CreateNewItem());
AddStep("rearrange", () =>
{
var item = Room.Playlist[0];
Room.Playlist.RemoveAt(0);
Room.Playlist.Add(item);
});
AddStep("create new item", () => songSelect.BeatmapDetails.CreateNewItem());
AddAssert("new item has id 2", () => Room.Playlist.Last().ID == 2);
}
private class TestMatchSongSelect : MatchSongSelect
{
public new MatchBeatmapDetailArea BeatmapDetails => (MatchBeatmapDetailArea)base.BeatmapDetails;

View File

@ -4,8 +4,10 @@
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Overlays;
using osu.Game.Overlays.Profile.Sections;
namespace osu.Game.Tests.Visual.Online
@ -17,6 +19,9 @@ namespace osu.Game.Tests.Visual.Online
typeof(CounterPill)
};
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Red);
private readonly CounterPill pill;
private readonly BindableInt value = new BindableInt();

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Framework.Bindables;
using osu.Game.Graphics.Sprites;
using osu.Framework.Allocation;
namespace osu.Game.Overlays.Profile.Sections
{
@ -16,9 +17,10 @@ namespace osu.Game.Overlays.Profile.Sections
public readonly BindableInt Current = new BindableInt();
private readonly OsuSpriteText counter;
private OsuSpriteText counter;
public CounterPill()
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
{
AutoSizeAxes = Axes.Both;
Alpha = 0;
@ -28,14 +30,15 @@ namespace osu.Game.Overlays.Profile.Sections
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(0.05f)
Colour = colourProvider.Background6
},
counter = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Colour = colourProvider.Foreground1
}
};
}
@ -54,7 +57,7 @@ namespace osu.Game.Overlays.Profile.Sections
return;
}
counter.Text = value.NewValue.ToString();
counter.Text = value.NewValue.ToString("N0");
this.FadeIn(duration, Easing.OutQuint);
}
}

View File

@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Rankings
private void getSpotlights()
{
spotlightsRequest = new GetSpotlightsRequest();
spotlightsRequest.Success += response => selector.Spotlights = response.Spotlights;
spotlightsRequest.Success += response => Schedule(() => selector.Spotlights = response.Spotlights);
api.Queue(spotlightsRequest);
}
@ -151,11 +151,11 @@ namespace osu.Game.Overlays.Rankings
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
spotlightsRequest?.Cancel();
getRankingsRequest?.Cancel();
cancellationToken?.Cancel();
base.Dispose(isDisposing);
}
}
}

View File

@ -62,7 +62,7 @@ namespace osu.Game.Screens.Select
{
PlaylistItem item = new PlaylistItem
{
ID = (Playlist.LastOrDefault()?.ID + 1) ?? 0,
ID = Playlist.Count == 0 ? 0 : Playlist.Max(p => p.ID) + 1
};
populateItemFromCurrent(item);

View File

@ -24,7 +24,7 @@
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.1230.0" />
<PackageReference Include="ppy.osu.Framework" Version="2020.216.0" />
<PackageReference Include="Sentry" Version="2.0.2" />
<PackageReference Include="Sentry" Version="2.0.3" />
<PackageReference Include="SharpCompress" Version="0.24.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />

View File

@ -87,6 +87,6 @@
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="SharpRaven" Version="2.4.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2019.1104.0" ExcludeAssets="all" />
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2020.213.0" ExcludeAssets="all" />
</ItemGroup>
</Project>