mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 09:42:54 +08:00
Merge branch 'master' into slider-timeline-velcotiy-adjust-v2
This commit is contained in:
commit
3a25bdaf3d
2
.github/workflows/report-nunit.yml
vendored
2
.github/workflows/report-nunit.yml
vendored
@ -30,3 +30,5 @@ jobs:
|
||||
name: Test Results (${{matrix.os.prettyname}}, ${{matrix.threadingMode}})
|
||||
path: "*.trx"
|
||||
reporter: dotnet-trx
|
||||
list-suites: 'failed'
|
||||
list-tests: 'failed'
|
||||
|
@ -52,7 +52,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.1004.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2021.1013.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2021.1014.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Transitive Dependencies">
|
||||
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
|
||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
config.SetValue(OsuSetting.AutoCursorSize, true);
|
||||
gameplayState.Beatmap.Difficulty.CircleSize = val;
|
||||
Scheduler.AddOnce(() => loadContent(false));
|
||||
Scheduler.AddOnce(loadContent);
|
||||
});
|
||||
|
||||
AddStep("test cursor container", () => loadContent(false));
|
||||
@ -78,7 +78,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
AddStep($"adjust cs to {circleSize}", () => gameplayState.Beatmap.Difficulty.CircleSize = circleSize);
|
||||
AddStep("turn on autosizing", () => config.SetValue(OsuSetting.AutoCursorSize, true));
|
||||
|
||||
AddStep("load content", () => loadContent());
|
||||
AddStep("load content", loadContent);
|
||||
|
||||
AddUntilStep("cursor size correct", () => lastContainer.ActiveCursor.Scale.X == OsuCursorContainer.GetScaleForCircleSize(circleSize) * userScale);
|
||||
|
||||
@ -98,7 +98,9 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
AddStep("load content", () => loadContent(false, () => new SkinProvidingContainer(new TopLeftCursorSkin())));
|
||||
}
|
||||
|
||||
private void loadContent(bool automated = true, Func<SkinProvidingContainer> skinProvider = null)
|
||||
private void loadContent() => loadContent(false);
|
||||
|
||||
private void loadContent(bool automated, Func<SkinProvidingContainer> skinProvider = null)
|
||||
{
|
||||
SetContents(_ =>
|
||||
{
|
||||
|
@ -31,10 +31,12 @@ namespace osu.Game.Overlays.Notifications
|
||||
set
|
||||
{
|
||||
progress = value;
|
||||
Scheduler.AddOnce(() => progressBar.Progress = progress);
|
||||
Scheduler.AddOnce(updateProgress, progress);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateProgress(float progress) => progressBar.Progress = progress;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
@ -150,6 +150,11 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
notifyRoomsUpdated();
|
||||
}
|
||||
|
||||
private void notifyRoomsUpdated() => Scheduler.AddOnce(() => RoomsUpdated?.Invoke());
|
||||
private void notifyRoomsUpdated()
|
||||
{
|
||||
Scheduler.AddOnce(invokeRoomsUpdated);
|
||||
|
||||
void invokeRoomsUpdated() => RoomsUpdated?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,11 +79,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
private void load()
|
||||
{
|
||||
isConnected.BindTo(client.IsConnected);
|
||||
isConnected.BindValueChanged(c => Scheduler.AddOnce(() =>
|
||||
{
|
||||
if (isConnected.Value && IsLoaded)
|
||||
PollImmediately();
|
||||
}), true);
|
||||
isConnected.BindValueChanged(c => Scheduler.AddOnce(poll), true);
|
||||
}
|
||||
|
||||
private void poll()
|
||||
{
|
||||
if (isConnected.Value && IsLoaded)
|
||||
PollImmediately();
|
||||
}
|
||||
|
||||
protected override Task Poll()
|
||||
|
@ -19,15 +19,19 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Client.RoomUpdated += OnRoomUpdated;
|
||||
|
||||
Client.UserLeft += UserLeft;
|
||||
Client.UserKicked += UserKicked;
|
||||
Client.UserJoined += UserJoined;
|
||||
Client.RoomUpdated += invokeOnRoomUpdated;
|
||||
Client.UserLeft += invokeUserLeft;
|
||||
Client.UserKicked += invokeUserKicked;
|
||||
Client.UserJoined += invokeUserJoined;
|
||||
|
||||
OnRoomUpdated();
|
||||
}
|
||||
|
||||
private void invokeOnRoomUpdated() => Scheduler.AddOnce(OnRoomUpdated);
|
||||
private void invokeUserJoined(MultiplayerRoomUser user) => Scheduler.AddOnce(UserJoined, user);
|
||||
private void invokeUserKicked(MultiplayerRoomUser user) => Scheduler.AddOnce(UserKicked, user);
|
||||
private void invokeUserLeft(MultiplayerRoomUser user) => Scheduler.AddOnce(UserLeft, user);
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a user has joined the room.
|
||||
/// </summary>
|
||||
@ -63,10 +67,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
if (Client != null)
|
||||
{
|
||||
Client.UserLeft -= UserLeft;
|
||||
Client.UserKicked -= UserKicked;
|
||||
Client.UserJoined -= UserJoined;
|
||||
Client.RoomUpdated -= OnRoomUpdated;
|
||||
Client.RoomUpdated -= invokeOnRoomUpdated;
|
||||
Client.UserLeft -= invokeUserLeft;
|
||||
Client.UserKicked -= invokeUserKicked;
|
||||
Client.UserJoined -= invokeUserJoined;
|
||||
}
|
||||
|
||||
base.Dispose(isDisposing);
|
||||
|
@ -36,7 +36,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Realm" Version="10.6.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2021.1013.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2021.1014.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.1004.0" />
|
||||
<PackageReference Include="Sentry" Version="3.9.4" />
|
||||
<PackageReference Include="SharpCompress" Version="0.29.0" />
|
||||
|
@ -70,7 +70,7 @@
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Package References">
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2021.1013.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2021.1014.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.1004.0" />
|
||||
</ItemGroup>
|
||||
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net5.0 / net6.0) -->
|
||||
@ -93,7 +93,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2021.1013.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2021.1014.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.28.3" />
|
||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user