1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Merge branch 'master' into remove-cf-bundle-version

This commit is contained in:
Dean Herbert 2023-01-13 15:17:39 +09:00
commit c078838d6f
31 changed files with 60 additions and 73 deletions

View File

@ -75,6 +75,8 @@ namespace osu.Game.Tests.Chat
return false;
};
});
AddUntilStep("wait for notifications client", () => channelManager.NotificationsConnected);
}
[Test]

View File

@ -64,6 +64,11 @@ namespace osu.Game.Online.Chat
/// </summary>
public IBindableList<Channel> AvailableChannels => availableChannels;
/// <summary>
/// Whether the client responsible for channel notifications is connected.
/// </summary>
public bool NotificationsConnected => connector.IsConnected.Value;
private readonly IAPIProvider api;
private readonly NotificationsClientConnector connector;

View File

@ -6,6 +6,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Extensions;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Rulesets;
@ -28,7 +29,13 @@ namespace osu.Game.Overlays.BeatmapListing
AddTabItem(new RulesetFilterTabItemAny());
foreach (var r in rulesets.AvailableRulesets)
{
// Don't display non-legacy rulesets
if (!r.IsLegacyRuleset())
continue;
AddItem(r);
}
}
}

View File

@ -13,6 +13,9 @@ namespace osu.Game.Overlays
{
public partial class OverlayRulesetSelector : RulesetSelector
{
// Since this component is used in online overlays and currently web-side doesn't support non-legacy rulesets, let's disable them for now.
protected override bool LegacyOnly => true;
public OverlayRulesetSelector()
{
AutoSizeAxes = Axes.Both;

View File

@ -27,7 +27,8 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
new SettingsEnumDropdown<FrameSync>
{
LabelText = GraphicsSettingsStrings.FrameLimiter,
Current = config.GetBindable<FrameSync>(FrameworkSetting.FrameSync)
Current = config.GetBindable<FrameSync>(FrameworkSetting.FrameSync),
Keywords = new[] { @"fps" },
},
new SettingsEnumDropdown<ExecutionMode>
{

View File

@ -88,5 +88,13 @@ namespace osu.Game.Overlays.Volume
{
Content.TransformTo<Container<Drawable>, ColourInfo>("BorderColour", unhoveredColour, 500, Easing.OutQuint);
}
protected override bool OnMouseDown(MouseDownEvent e)
{
base.OnMouseDown(e);
// Block mouse down to avoid dismissing overlays sitting behind the mute button
return true;
}
}
}

View File

@ -6,6 +6,7 @@
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Allocation;
using osu.Framework.Logging;
using osu.Game.Extensions;
namespace osu.Game.Rulesets
{
@ -16,11 +17,16 @@ namespace osu.Game.Rulesets
protected override Dropdown<RulesetInfo> CreateDropdown() => null;
protected virtual bool LegacyOnly => false;
[BackgroundDependencyLoader]
private void load()
{
foreach (var ruleset in Rulesets.AvailableRulesets)
{
if (!ruleset.IsLegacyRuleset() && LegacyOnly)
continue;
try
{
AddItem(ruleset);

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Audio.Track;
using osu.Framework.Bindables;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
@ -38,7 +36,7 @@ namespace osu.Game.Screens.Edit.Components.Menus
});
}
protected override Dropdown<EditorScreenMode> CreateDropdown() => null;
protected override Dropdown<EditorScreenMode> CreateDropdown() => null!;
protected override TabItem<EditorScreenMode> CreateTabItem(EditorScreenMode value) => new TabItem(value);

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System.Linq;
using osuTK;
using osuTK.Graphics;
@ -25,10 +23,10 @@ namespace osu.Game.Screens.Edit.Components
{
public partial class PlaybackControl : BottomBarContainer
{
private IconButton playButton;
private IconButton playButton = null!;
[Resolved]
private EditorClock editorClock { get; set; }
private EditorClock editorClock { get; set; } = null!;
private readonly BindableNumber<double> freqAdjust = new BindableDouble(1);
@ -108,7 +106,7 @@ namespace osu.Game.Screens.Edit.Components
protected override TabItem<double> CreateTabItem(double value) => new PlaybackTabItem(value);
protected override Dropdown<double> CreateDropdown() => null;
protected override Dropdown<double> CreateDropdown() => null!;
public PlaybackTabControl()
{

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
@ -24,7 +22,7 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
/// <summary>
/// Invoked when this <see cref="EditorRadioButton"/> has been selected.
/// </summary>
public Action<RadioButton> Selected;
public Action<RadioButton>? Selected;
public readonly RadioButton Button;
@ -33,10 +31,10 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
private Color4 selectedBackgroundColour;
private Color4 selectedIconColour;
private Drawable icon;
private Drawable icon = null!;
[Resolved(canBeNull: true)]
private EditorBeatmap editorBeatmap { get; set; }
[Resolved]
private EditorBeatmap? editorBeatmap { get; set; }
public EditorRadioButton(RadioButton button)
{

View File

@ -1,8 +1,7 @@
// 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.
#nullable disable
using System;
using System.Collections.Generic;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
@ -13,7 +12,7 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
{
public partial class EditorRadioButtonCollection : CompositeDrawable
{
private IReadOnlyList<RadioButton> items;
private IReadOnlyList<RadioButton> items = Array.Empty<RadioButton>();
public IReadOnlyList<RadioButton> Items
{
@ -45,7 +44,7 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
};
}
private RadioButton currentlySelected;
private RadioButton? currentlySelected;
private void addButton(RadioButton button)
{

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@ -24,11 +22,11 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons
/// <summary>
/// A function which creates a drawable icon to represent this item. If null, a sane default should be used.
/// </summary>
public readonly Func<Drawable> CreateIcon;
public readonly Func<Drawable>? CreateIcon;
private readonly Action action;
private readonly Action? action;
public RadioButton(string label, Action action, Func<Drawable> createIcon = null)
public RadioButton(string label, Action? action, Func<Drawable>? createIcon = null)
{
Label = label;
CreateIcon = createIcon;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@ -23,7 +21,7 @@ namespace osu.Game.Screens.Edit.Components.TernaryButtons
private Color4 selectedBackgroundColour;
private Color4 selectedIconColour;
private Drawable icon;
private Drawable icon = null!;
public readonly TernaryButton Button;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@ -19,9 +17,9 @@ namespace osu.Game.Screens.Edit.Components.TernaryButtons
/// <summary>
/// A function which creates a drawable icon to represent this item. If null, a sane default should be used.
/// </summary>
public readonly Func<Drawable> CreateIcon;
public readonly Func<Drawable>? CreateIcon;
public TernaryButton(Bindable<TernaryState> bindable, string description, Func<Drawable> createIcon = null)
public TernaryButton(Bindable<TernaryState> bindable, string description, Func<Drawable>? createIcon = null)
{
Bindable = bindable;
Description = description;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Framework.Allocation;
@ -15,14 +13,14 @@ namespace osu.Game.Screens.Edit.Components
{
public partial class TimeInfoContainer : BottomBarContainer
{
private OsuSpriteText trackTimer;
private OsuSpriteText bpm;
private OsuSpriteText trackTimer = null!;
private OsuSpriteText bpm = null!;
[Resolved]
private EditorBeatmap editorBeatmap { get; set; }
private EditorBeatmap editorBeatmap { get; set; } = null!;
[Resolved]
private EditorClock editorClock { get; set; }
private EditorClock editorClock { get; set; } = null!;
[BackgroundDependencyLoader]
private void load(OsuColour colours, OverlayColourProvider colourProvider)

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Game.Beatmaps.Timing;
using osu.Game.Graphics;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System;
using System.Collections.Specialized;
using System.Diagnostics;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Beatmaps.ControlPoints;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
@ -20,10 +18,10 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
/// </summary>
public partial class MarkerPart : TimelinePart
{
private Drawable marker;
private Drawable marker = null!;
[Resolved]
private EditorClock editorClock { get; set; }
private EditorClock editorClock { get; set; } = null!;
[BackgroundDependencyLoader]
private void load()
@ -44,7 +42,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
return true;
}
private ScheduledDelegate scheduledSeek;
private ScheduledDelegate? scheduledSeek;
/// <summary>
/// Seeks the <see cref="SummaryTimeline"/> to the time closest to a position on the screen relative to the <see cref="SummaryTimeline"/>.

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using System;
using osu.Framework.Allocation;
using osu.Framework.Audio.Track;
@ -26,7 +24,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
private readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
[Resolved]
protected EditorBeatmap EditorBeatmap { get; private set; }
protected EditorBeatmap EditorBeatmap { get; private set; } = null!;
protected readonly IBindable<Track> Track = new Bindable<Track>();
@ -34,7 +32,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
protected override Container<T> Content => content;
public TimelinePart(Container<T> content = null)
public TimelinePart(Container<T>? content = null)
{
AddInternal(this.content = content ?? new Container<T> { RelativeSizeAxes = Axes.Both });

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;

View File

@ -291,7 +291,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
[Resolved]
private Timeline timeline { get; set; } = null!;
[Resolved(CanBeNull = true)]
[Resolved]
private IEditorChangeHandler? changeHandler { get; set; }
private ScheduledDelegate? dragOperation;