mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:53:51 +08:00
Enable NRT
This commit is contained in:
parent
f8e37af2e0
commit
cb9bae1f5c
@ -1,12 +1,10 @@
|
||||
// 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.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using JetBrains.Annotations;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
@ -15,6 +13,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -30,12 +29,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
public class MultiplayerMatchSettingsOverlay : RoomSettingsOverlay
|
||||
{
|
||||
private MatchSettings settings;
|
||||
private MatchSettings settings = null!;
|
||||
|
||||
protected override OsuButton SubmitButton => settings.ApplyButton;
|
||||
|
||||
[Resolved]
|
||||
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
||||
private OngoingOperationTracker ongoingOperationTracker { get; set; } = null!;
|
||||
|
||||
protected override bool IsLoading => ongoingOperationTracker.InProgress.Value;
|
||||
|
||||
@ -57,20 +56,24 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
private const float disabled_alpha = 0.2f;
|
||||
|
||||
public Action SettingsApplied;
|
||||
public Action? SettingsApplied;
|
||||
|
||||
public OsuTextBox NameField, MaxParticipantsField;
|
||||
public MatchTypePicker TypePicker;
|
||||
public OsuEnumDropdown<QueueMode> QueueModeDropdown;
|
||||
public OsuTextBox PasswordTextBox;
|
||||
public OsuCheckbox AutoSkipCheckbox;
|
||||
public TriangleButton ApplyButton;
|
||||
public OsuTextBox NameField = null!;
|
||||
public OsuTextBox MaxParticipantsField = null!;
|
||||
public MatchTypePicker TypePicker = null!;
|
||||
public OsuEnumDropdown<QueueMode> QueueModeDropdown = null!;
|
||||
public OsuTextBox PasswordTextBox = null!;
|
||||
public OsuCheckbox AutoSkipCheckbox = null!;
|
||||
public TriangleButton ApplyButton = null!;
|
||||
|
||||
public OsuSpriteText ErrorText;
|
||||
public OsuSpriteText ErrorText = null!;
|
||||
|
||||
private OsuEnumDropdown<StartMode> startModeDropdown;
|
||||
private OsuSpriteText typeLabel;
|
||||
private LoadingLayer loadingLayer;
|
||||
private OsuEnumDropdown<StartMode> startModeDropdown = null!;
|
||||
private OsuSpriteText typeLabel = null!;
|
||||
private LoadingLayer loadingLayer = null!;
|
||||
|
||||
[Resolved]
|
||||
private BeatmapManager beatmapManager { get; set; } = null!;
|
||||
|
||||
public void SelectBeatmap()
|
||||
{
|
||||
@ -79,26 +82,23 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private MultiplayerMatchSubScreen matchSubScreen { get; set; }
|
||||
private MultiplayerMatchSubScreen matchSubScreen { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private IRoomManager manager { get; set; }
|
||||
private IRoomManager manager { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private MultiplayerClient client { get; set; }
|
||||
private MultiplayerClient client { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
||||
private OngoingOperationTracker ongoingOperationTracker { get; set; } = null!;
|
||||
|
||||
private readonly IBindable<bool> operationInProgress = new BindableBool();
|
||||
|
||||
[CanBeNull]
|
||||
private IDisposable applyingSettingsOperation;
|
||||
|
||||
private readonly Room room;
|
||||
|
||||
private Drawable playlistContainer;
|
||||
private DrawableRoomPlaylist drawablePlaylist;
|
||||
private IDisposable? applyingSettingsOperation;
|
||||
private Drawable playlistContainer = null!;
|
||||
private DrawableRoomPlaylist drawablePlaylist = null!;
|
||||
|
||||
public MatchSettings(Room room)
|
||||
{
|
||||
@ -423,7 +423,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
else
|
||||
room.MaxParticipants.Value = null;
|
||||
|
||||
manager?.CreateRoom(room, onSuccess, onError);
|
||||
manager.CreateRoom(room, onSuccess, onError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,7 +466,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
public class CreateOrUpdateButton : TriangleButton
|
||||
{
|
||||
[Resolved(typeof(Room), nameof(Room.RoomID))]
|
||||
private Bindable<long?> roomId { get; set; }
|
||||
private Bindable<long?> roomId { get; set; } = null!;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
|
@ -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.Screens;
|
||||
using osu.Game.Online.API;
|
||||
|
Loading…
Reference in New Issue
Block a user