mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 01:27:29 +08:00
Merge branch 'master' into editor-cyclic-selection
This commit is contained in:
commit
708dd355cd
1
.gitignore
vendored
1
.gitignore
vendored
@ -339,6 +339,5 @@ inspectcode
|
|||||||
|
|
||||||
# Fody (pulled in by Realm) - schema file
|
# Fody (pulled in by Realm) - schema file
|
||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
**/FodyWeavers.xml
|
|
||||||
|
|
||||||
.idea/.idea.osu.Desktop/.idea/misc.xml
|
.idea/.idea.osu.Desktop/.idea/misc.xml
|
@ -10,7 +10,7 @@
|
|||||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2023.716.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2023.720.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Fody does not handle Android build well, and warns when unchanged.
|
<!-- Fody does not handle Android build well, and warns when unchanged.
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
private HUDOverlay hudOverlay = null!;
|
private HUDOverlay hudOverlay = null!;
|
||||||
|
|
||||||
[Cached(typeof(ScoreProcessor))]
|
[Cached(typeof(ScoreProcessor))]
|
||||||
private ScoreProcessor scoreProcessor => gameplayState.ScoreProcessor;
|
private ScoreProcessor scoreProcessor { get; set; }
|
||||||
|
|
||||||
[Cached(typeof(HealthProcessor))]
|
[Cached(typeof(HealthProcessor))]
|
||||||
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
|
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
|
||||||
@ -47,6 +47,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
private Drawable hideTarget => hudOverlay.ChildrenOfType<SkinComponentsContainer>().First();
|
private Drawable hideTarget => hudOverlay.ChildrenOfType<SkinComponentsContainer>().First();
|
||||||
private Drawable keyCounterFlow => hudOverlay.ChildrenOfType<KeyCounterDisplay>().First().ChildrenOfType<FillFlowContainer<KeyCounter>>().Single();
|
private Drawable keyCounterFlow => hudOverlay.ChildrenOfType<KeyCounterDisplay>().First().ChildrenOfType<FillFlowContainer<KeyCounter>>().Single();
|
||||||
|
|
||||||
|
public TestSceneHUDOverlay()
|
||||||
|
{
|
||||||
|
scoreProcessor = gameplayState.ScoreProcessor;
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
public partial class TestSceneSkinEditorMultipleSkins : SkinnableTestScene
|
public partial class TestSceneSkinEditorMultipleSkins : SkinnableTestScene
|
||||||
{
|
{
|
||||||
[Cached(typeof(ScoreProcessor))]
|
[Cached(typeof(ScoreProcessor))]
|
||||||
private ScoreProcessor scoreProcessor => gameplayState.ScoreProcessor;
|
private ScoreProcessor scoreProcessor { get; set; }
|
||||||
|
|
||||||
[Cached(typeof(HealthProcessor))]
|
[Cached(typeof(HealthProcessor))]
|
||||||
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
|
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
|
||||||
@ -37,6 +37,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[Cached]
|
[Cached]
|
||||||
public readonly EditorClipboard Clipboard = new EditorClipboard();
|
public readonly EditorClipboard Clipboard = new EditorClipboard();
|
||||||
|
|
||||||
|
public TestSceneSkinEditorMultipleSkins()
|
||||||
|
{
|
||||||
|
scoreProcessor = gameplayState.ScoreProcessor;
|
||||||
|
}
|
||||||
|
|
||||||
[SetUpSteps]
|
[SetUpSteps]
|
||||||
public void SetUpSteps()
|
public void SetUpSteps()
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
private HUDOverlay hudOverlay;
|
private HUDOverlay hudOverlay;
|
||||||
|
|
||||||
[Cached(typeof(ScoreProcessor))]
|
[Cached(typeof(ScoreProcessor))]
|
||||||
private ScoreProcessor scoreProcessor => gameplayState.ScoreProcessor;
|
private ScoreProcessor scoreProcessor { get; set; }
|
||||||
|
|
||||||
[Cached(typeof(HealthProcessor))]
|
[Cached(typeof(HealthProcessor))]
|
||||||
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
|
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
|
||||||
@ -47,6 +47,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
private Drawable hideTarget => hudOverlay.ChildrenOfType<SkinComponentsContainer>().First();
|
private Drawable hideTarget => hudOverlay.ChildrenOfType<SkinComponentsContainer>().First();
|
||||||
private Drawable keyCounterFlow => hudOverlay.ChildrenOfType<KeyCounterDisplay>().First().ChildrenOfType<FillFlowContainer<KeyCounter>>().Single();
|
private Drawable keyCounterFlow => hudOverlay.ChildrenOfType<KeyCounterDisplay>().First().ChildrenOfType<FillFlowContainer<KeyCounter>>().Single();
|
||||||
|
|
||||||
|
public TestSceneSkinnableHUDOverlay()
|
||||||
|
{
|
||||||
|
scoreProcessor = gameplayState.ScoreProcessor;
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestComboCounterIncrementing()
|
public void TestComboCounterIncrementing()
|
||||||
{
|
{
|
||||||
|
3
osu.Game/FodyWeavers.xml
Normal file
3
osu.Game/FodyWeavers.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||||
|
<Realm DisableAnalytics="true" />
|
||||||
|
</Weavers>
|
@ -379,6 +379,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private bool selectedBlueprintAlreadySelectedOnMouseDown;
|
private bool selectedBlueprintAlreadySelectedOnMouseDown;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sorts the supplied <paramref name="blueprints"/> by the order of preference when making a selection.
|
||||||
|
/// Blueprints at the start of the list will be prioritised over later items if the selection requested is ambiguous due to spatial overlap.
|
||||||
|
/// </summary>
|
||||||
protected virtual IEnumerable<SelectionBlueprint<T>> ApplySelectionOrder(IEnumerable<SelectionBlueprint<T>> blueprints) => blueprints.Reverse();
|
protected virtual IEnumerable<SelectionBlueprint<T>> ApplySelectionOrder(IEnumerable<SelectionBlueprint<T>> blueprints) => blueprints.Reverse();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -23,6 +23,7 @@ using osu.Framework.Screens;
|
|||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Mods;
|
using osu.Game.Overlays.Mods;
|
||||||
@ -76,6 +77,9 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private RulesetStore rulesets { get; set; }
|
private RulesetStore rulesets { get; set; }
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private IAPIProvider api { get; set; } = null!;
|
||||||
|
|
||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
protected OnlinePlayScreen ParentScreen { get; private set; }
|
protected OnlinePlayScreen ParentScreen { get; private set; }
|
||||||
|
|
||||||
@ -284,6 +288,8 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private IDialogOverlay dialogOverlay { get; set; }
|
private IDialogOverlay dialogOverlay { get; set; }
|
||||||
|
|
||||||
|
protected virtual bool IsConnected => api.State.Value == APIState.Online;
|
||||||
|
|
||||||
public override bool OnBackButton()
|
public override bool OnBackButton()
|
||||||
{
|
{
|
||||||
if (Room.RoomID.Value == null)
|
if (Room.RoomID.Value == null)
|
||||||
@ -356,7 +362,12 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
if (ExitConfirmed)
|
if (ExitConfirmed)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (dialogOverlay == null || Room.RoomID.Value != null || Room.Playlist.Count == 0)
|
if (!IsConnected)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
bool hasUnsavedChanges = Room.RoomID.Value == null && Room.Playlist.Count > 0;
|
||||||
|
|
||||||
|
if (dialogOverlay == null || !hasUnsavedChanges)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// if the dialog is already displayed, block exiting until the user explicitly makes a decision.
|
// if the dialog is already displayed, block exiting until the user explicitly makes a decision.
|
||||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
// To work around this, temporarily remove the room and trigger an immediate listing poll.
|
// To work around this, temporarily remove the room and trigger an immediate listing poll.
|
||||||
if (e.Last is MultiplayerMatchSubScreen match)
|
if (e.Last is MultiplayerMatchSubScreen match)
|
||||||
{
|
{
|
||||||
RoomManager.RemoveRoom(match.Room);
|
RoomManager?.RemoveRoom(match.Room);
|
||||||
ListingPollingComponent.PollImmediately();
|
ListingPollingComponent.PollImmediately();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.Cursor;
|
using osu.Game.Graphics.Cursor;
|
||||||
using osu.Game.Online;
|
using osu.Game.Online;
|
||||||
using osu.Game.Online.API;
|
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
@ -50,9 +49,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private MultiplayerClient client { get; set; }
|
private MultiplayerClient client { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private IAPIProvider api { get; set; }
|
|
||||||
|
|
||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private OsuGame game { get; set; }
|
private OsuGame game { get; set; }
|
||||||
|
|
||||||
@ -79,6 +75,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
handleRoomLost();
|
handleRoomLost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool IsConnected => base.IsConnected && client.IsConnected.Value;
|
||||||
|
|
||||||
protected override Drawable CreateMainContent() => new Container
|
protected override Drawable CreateMainContent() => new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -254,13 +252,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
public override bool OnExiting(ScreenExitEvent e)
|
public override bool OnExiting(ScreenExitEvent e)
|
||||||
{
|
{
|
||||||
// the room may not be left immediately after a disconnection due to async flow,
|
// room has not been created yet or we're offline; exit immediately.
|
||||||
// so checking the MultiplayerClient / IAPIAccess statuses is also required.
|
if (client.Room == null || !IsConnected)
|
||||||
if (client.Room == null || !client.IsConnected.Value || api.State.Value != APIState.Online)
|
|
||||||
{
|
|
||||||
// room has not been created yet or we're offline; exit immediately.
|
|
||||||
return base.OnExiting(e);
|
return base.OnExiting(e);
|
||||||
}
|
|
||||||
|
|
||||||
if (!exitConfirmed && dialogOverlay != null)
|
if (!exitConfirmed && dialogOverlay != null)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
@ -15,8 +13,8 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
|
|
||||||
public virtual string ShortTitle => Title;
|
public virtual string ShortTitle => Title;
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved]
|
||||||
protected IRoomManager RoomManager { get; private set; }
|
protected IRoomManager? RoomManager { get; private set; }
|
||||||
|
|
||||||
protected OnlinePlaySubScreen()
|
protected OnlinePlaySubScreen()
|
||||||
{
|
{
|
||||||
|
@ -162,17 +162,20 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
|
|
||||||
realmWriteTask = realm.WriteAsync(r =>
|
realmWriteTask = realm.WriteAsync(r =>
|
||||||
{
|
{
|
||||||
var settings = r.Find<BeatmapInfo>(beatmap.Value.BeatmapInfo.ID)?.UserSettings;
|
var setInfo = r.Find<BeatmapSetInfo>(beatmap.Value.BeatmapSetInfo.ID);
|
||||||
|
|
||||||
if (settings == null) // only the case for tests.
|
if (setInfo == null) // only the case for tests.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
double val = Current.Value;
|
// Apply to all difficulties in a beatmap set for now (they generally always share timing).
|
||||||
|
foreach (var b in setInfo.Beatmaps)
|
||||||
|
{
|
||||||
|
BeatmapUserSettings settings = b.UserSettings;
|
||||||
|
double val = Current.Value;
|
||||||
|
|
||||||
if (settings.Offset == val)
|
if (settings.Offset != val)
|
||||||
return;
|
settings.Offset = val;
|
||||||
|
}
|
||||||
settings.Offset = val;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Realm" Version="11.1.2" />
|
<PackageReference Include="Realm" Version="11.1.2" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2023.716.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2023.720.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.707.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.707.0" />
|
||||||
<PackageReference Include="Sentry" Version="3.28.1" />
|
<PackageReference Include="Sentry" Version="3.28.1" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
||||||
|
@ -16,6 +16,6 @@
|
|||||||
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2023.716.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2023.720.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -140,6 +140,8 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterHidesMember/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterHidesMember/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterOnlyUsedForPreconditionCheck_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterOnlyUsedForPreconditionCheck_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterOnlyUsedForPreconditionCheck_002ELocal/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ParameterOnlyUsedForPreconditionCheck_002ELocal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PartialMethodWithSinglePart/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PartialTypeWithSinglePart/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PatternAlwaysOfType/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PatternAlwaysOfType/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleInterfaceMemberAmbiguity/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleInterfaceMemberAmbiguity/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleMultipleEnumeration/@EntryIndexedValue">HINT</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleMultipleEnumeration/@EntryIndexedValue">HINT</s:String>
|
||||||
|
Loading…
Reference in New Issue
Block a user