1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 15:23:14 +08:00

Timeshift -> Playlists at a code level

This commit is contained in:
Dean Herbert 2020-12-25 13:11:21 +09:00
parent 4e21bd0108
commit a1384942b1
27 changed files with 93 additions and 93 deletions

View File

@ -11,7 +11,7 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Screens.Multi.Playlists;
namespace osu.Game.Tests.Visual.Multiplayer
{
@ -109,7 +109,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddUntilStep("error not displayed", () => !settings.ErrorText.IsPresent);
}
private class TestRoomSettings : TimeshiftMatchSettingsOverlay
private class TestRoomSettings : PlaylistsMatchSettingsOverlay
{
public TriangleButton ApplyButton => ((MatchSettings)Settings).ApplyButton;

View File

@ -4,7 +4,7 @@
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Game.Overlays;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Screens.Multi.Playlists;
namespace osu.Game.Tests.Visual.Multiplayer
{
@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
public TestSceneMultiScreen()
{
var multi = new TimeshiftMultiplayer();
var multi = new PlaylistsMultiplayer();
AddStep("show", () => LoadScreen(multi));
AddUntilStep("wait for loaded", () => multi.IsLoaded);

View File

@ -6,11 +6,11 @@ using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneTimeshiftFilterControl : OsuTestScene
public class TestScenePlaylistsFilterControl : OsuTestScene
{
public TestSceneTimeshiftFilterControl()
public TestScenePlaylistsFilterControl()
{
Child = new TimeshiftFilterControl
Child = new PlaylistsFilterControl
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -10,11 +10,11 @@ using osu.Framework.Testing;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Multi.Lounge;
using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Screens.Multi.Playlists;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneTimeshiftLoungeSubScreen : RoomManagerTestScene
public class TestScenePlaylistsLoungeSubScreen : RoomManagerTestScene
{
private LoungeSubScreen loungeScreen;
@ -27,7 +27,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
base.SetUpSteps();
AddStep("push screen", () => LoadScreen(loungeScreen = new TimeshiftLoungeSubScreen
AddStep("push screen", () => LoadScreen(loungeScreen = new PlaylistsLoungeSubScreen
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -8,7 +8,7 @@ using osu.Game.Users;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneTimeshiftParticipantsList : MultiplayerTestScene
public class TestScenePlaylistsParticipantsList : MultiplayerTestScene
{
[SetUp]
public new void Setup() => Schedule(() =>

View File

@ -26,7 +26,7 @@ using osu.Game.Users;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneTimeshiftResultsScreen : ScreenTestScene
public class TestScenePlaylistsResultsScreen : ScreenTestScene
{
private const int scores_per_result = 10;
@ -360,7 +360,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
};
}
private class TestResultsScreen : TimeshiftResultsScreen
private class TestResultsScreen : PlaylistsResultsScreen
{
public new LoadingSpinner LeftSpinner => base.LeftSpinner;
public new LoadingSpinner CentreSpinner => base.CentreSpinner;

View File

@ -17,14 +17,14 @@ using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi;
using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Screens.Multi.Playlists;
using osu.Game.Tests.Beatmaps;
using osu.Game.Users;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneTimeshiftRoomSubScreen : MultiplayerTestScene
public class TestScenePlaylistsRoomSubScreen : MultiplayerTestScene
{
protected override bool UseOnlineAPI => true;
@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
private BeatmapManager manager;
private RulesetStore rulesets;
private TestTimeshiftRoomSubScreen match;
private TestPlaylistsRoomSubScreen match;
[BackgroundDependencyLoader]
private void load(GameHost host, AudioManager audio)
@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
[SetUpSteps]
public void SetupSteps()
{
AddStep("load match", () => LoadScreen(match = new TestTimeshiftRoomSubScreen(Room)));
AddStep("load match", () => LoadScreen(match = new TestPlaylistsRoomSubScreen(Room)));
AddUntilStep("wait for load", () => match.IsCurrentScreen());
}
@ -120,7 +120,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddStep("create room", () =>
{
InputManager.MoveMouseTo(match.ChildrenOfType<TimeshiftMatchSettingsOverlay.CreateRoomButton>().Single());
InputManager.MoveMouseTo(match.ChildrenOfType<PlaylistsMatchSettingsOverlay.CreateRoomButton>().Single());
InputManager.Click(MouseButton.Left);
});
@ -131,13 +131,13 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddAssert("match has original beatmap", () => match.Beatmap.Value.Beatmap.BeatmapInfo.BaseDifficulty.CircleSize != 1);
}
private class TestTimeshiftRoomSubScreen : TimeshiftRoomSubScreen
private class TestPlaylistsRoomSubScreen : PlaylistsRoomSubScreen
{
public new Bindable<PlaylistItem> SelectedItem => base.SelectedItem;
public new Bindable<WorkingBeatmap> Beatmap => base.Beatmap;
public TestTimeshiftRoomSubScreen(Room room)
public TestPlaylistsRoomSubScreen(Room room)
: base(room)
{
}

View File

@ -11,7 +11,7 @@ using osu.Game.Beatmaps;
using osu.Game.Overlays;
using osu.Game.Overlays.Mods;
using osu.Game.Overlays.Toolbar;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Screens.Multi.Playlists;
using osu.Game.Screens.Play;
using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Options;
@ -108,14 +108,14 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestExitMultiWithEscape()
{
PushAndConfirm(() => new TimeshiftMultiplayer());
PushAndConfirm(() => new PlaylistsMultiplayer());
exitViaEscapeAndConfirm();
}
[Test]
public void TestExitMultiWithBackButton()
{
PushAndConfirm(() => new TimeshiftMultiplayer());
PushAndConfirm(() => new PlaylistsMultiplayer());
exitViaBackButtonAndConfirm();
}

View File

@ -8,9 +8,9 @@ using osuTK;
namespace osu.Game.Online.Multiplayer.GameTypes
{
public class GameTypeTimeshift : GameType
public class GameTypePlaylists : GameType
{
public override string Name => "Timeshift";
public override string Name => "Playlists";
public override Drawable GetIcon(OsuColour colours, float size) => new SpriteIcon
{

View File

@ -66,7 +66,7 @@ namespace osu.Game.Online.Multiplayer
[Cached]
[JsonIgnore]
public readonly Bindable<GameType> Type = new Bindable<GameType>(new GameTypeTimeshift());
public readonly Bindable<GameType> Type = new Bindable<GameType>(new GameTypePlaylists());
[Cached]
[JsonIgnore]

View File

@ -43,7 +43,7 @@ namespace osu.Game.Screens.Menu
public Action OnSolo;
public Action OnSettings;
public Action OnMultiplayer;
public Action OnTimeshift;
public Action OnPlaylists;
public const float BUTTON_WIDTH = 140f;
public const float WEDGE_WIDTH = 20;
@ -125,7 +125,7 @@ namespace osu.Game.Screens.Menu
{
buttonsPlay.Add(new Button(@"solo", @"button-solo-select", FontAwesome.Solid.User, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
buttonsPlay.Add(new Button(@"multi", @"button-generic-select", FontAwesome.Solid.Users, new Color4(94, 63, 186, 255), onMultiplayer, 0, Key.M));
buttonsPlay.Add(new Button(@"playlists", @"button-generic-select", OsuIcon.Charts, new Color4(94, 63, 186, 255), onTimeshift, 0, Key.L));
buttonsPlay.Add(new Button(@"playlists", @"button-generic-select", OsuIcon.Charts, new Color4(94, 63, 186, 255), onPlaylists, 0, Key.L));
buttonsPlay.ForEach(b => b.VisibleState = ButtonSystemState.Play);
buttonsTopLevel.Add(new Button(@"play", @"button-play-select", OsuIcon.Logo, new Color4(102, 68, 204, 255), () => State = ButtonSystemState.Play, WEDGE_WIDTH, Key.P));
@ -175,7 +175,7 @@ namespace osu.Game.Screens.Menu
OnMultiplayer?.Invoke();
}
private void onTimeshift()
private void onPlaylists()
{
if (!api.IsLoggedIn)
{
@ -193,7 +193,7 @@ namespace osu.Game.Screens.Menu
return;
}
OnTimeshift?.Invoke();
OnPlaylists?.Invoke();
}
private void updateIdleState(bool isIdle)

View File

@ -18,7 +18,7 @@ using osu.Game.Overlays;
using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Multi.RealtimeMultiplayer;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Screens.Multi.Playlists;
using osu.Game.Screens.Select;
namespace osu.Game.Screens.Menu
@ -106,7 +106,7 @@ namespace osu.Game.Screens.Menu
},
OnSolo = onSolo,
OnMultiplayer = () => this.Push(new RealtimeMultiplayer()),
OnTimeshift = () => this.Push(new TimeshiftMultiplayer()),
OnPlaylists = () => this.Push(new PlaylistsMultiplayer()),
OnExit = confirmAndExit,
}
}

View File

@ -7,13 +7,13 @@ using osu.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Multi.Lounge.Components
{
public class TimeshiftFilterControl : FilterControl
public class PlaylistsFilterControl : FilterControl
{
private readonly Dropdown<TimeshiftCategory> dropdown;
private readonly Dropdown<PlaylistsCategory> dropdown;
public TimeshiftFilterControl()
public PlaylistsFilterControl()
{
AddInternal(dropdown = new SlimEnumDropdown<TimeshiftCategory>
AddInternal(dropdown = new SlimEnumDropdown<PlaylistsCategory>
{
Anchor = Anchor.BottomRight,
Origin = Anchor.TopRight,
@ -37,11 +37,11 @@ namespace osu.Game.Screens.Multi.Lounge.Components
switch (dropdown.Current.Value)
{
case TimeshiftCategory.Normal:
case PlaylistsCategory.Normal:
criteria.Category = "normal";
break;
case TimeshiftCategory.Spotlight:
case PlaylistsCategory.Spotlight:
criteria.Category = "spotlight";
break;
}
@ -49,7 +49,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
return criteria;
}
private enum TimeshiftCategory
private enum PlaylistsCategory
{
Any,
Normal,

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi.Timeshift;
using osu.Game.Screens.Multi.Playlists;
using osuTK;
namespace osu.Game.Screens.Multi.Match.Components
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Multi.Match.Components
InternalChildren = new[]
{
background = new Box { RelativeSizeAxes = Axes.Both },
new TimeshiftReadyButton
new PlaylistsReadyButton
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -33,7 +33,7 @@ namespace osu.Game.Screens.Multi.Match.Components
AddItem(new GameTypeVersus());
AddItem(new GameTypeTagTeam());
AddItem(new GameTypeTeamVersus());
AddItem(new GameTypeTimeshift());
AddItem(new GameTypePlaylists());
}
private class GameTypePickerItem : DisableableTabItem

View File

@ -20,7 +20,7 @@ using osu.Game.Screens.Ranking;
namespace osu.Game.Screens.Multi.Play
{
public class TimeshiftPlayer : Player
public class PlaylistsPlayer : Player
{
public Action Exited;
@ -37,7 +37,7 @@ namespace osu.Game.Screens.Multi.Play
[Resolved]
private IBindable<RulesetInfo> ruleset { get; set; }
public TimeshiftPlayer(PlaylistItem playlistItem, PlayerConfiguration configuration = null)
public PlaylistsPlayer(PlaylistItem playlistItem, PlayerConfiguration configuration = null)
: base(configuration)
{
PlaylistItem = playlistItem;
@ -50,7 +50,7 @@ namespace osu.Game.Screens.Multi.Play
bool failed = false;
// Sanity checks to ensure that TimeshiftPlayer matches the settings for the current PlaylistItem
// Sanity checks to ensure that PlaylistsPlayer matches the settings for the current PlaylistItem
if (Beatmap.Value.BeatmapInfo.OnlineBeatmapID != PlaylistItem.Beatmap.Value.OnlineBeatmapID)
throw new InvalidOperationException("Current Beatmap does not match PlaylistItem's Beatmap");
@ -94,7 +94,7 @@ namespace osu.Game.Screens.Multi.Play
protected override ResultsScreen CreateResults(ScoreInfo score)
{
Debug.Assert(RoomId.Value != null);
return new TimeshiftResultsScreen(score, RoomId.Value.Value, PlaylistItem, true);
return new PlaylistsResultsScreen(score, RoomId.Value.Value, PlaylistItem, true);
}
protected override Score CreateScore()

View File

@ -4,9 +4,9 @@
using osu.Framework.Allocation;
using osu.Game.Screens.Multi.Match.Components;
namespace osu.Game.Screens.Multi.Timeshift
namespace osu.Game.Screens.Multi.Playlists
{
public class CreateTimeshiftRoomButton : PurpleTriangleButton
public class CreatePlaylistsRoomButton : PurpleTriangleButton
{
[BackgroundDependencyLoader]
private void load()

View File

@ -6,12 +6,12 @@ using osu.Game.Screens.Multi.Lounge;
using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Screens.Multi.Match;
namespace osu.Game.Screens.Multi.Timeshift
namespace osu.Game.Screens.Multi.Playlists
{
public class TimeshiftLoungeSubScreen : LoungeSubScreen
public class PlaylistsLoungeSubScreen : LoungeSubScreen
{
protected override FilterControl CreateFilterControl() => new TimeshiftFilterControl();
protected override FilterControl CreateFilterControl() => new PlaylistsFilterControl();
protected override RoomSubScreen CreateRoomSubScreen(Room room) => new TimeshiftRoomSubScreen(room);
protected override RoomSubScreen CreateRoomSubScreen(Room room) => new PlaylistsRoomSubScreen(room);
}
}

View File

@ -19,9 +19,9 @@ using osu.Game.Overlays;
using osu.Game.Screens.Multi.Match.Components;
using osuTK;
namespace osu.Game.Screens.Multi.Timeshift
namespace osu.Game.Screens.Multi.Playlists
{
public class TimeshiftMatchSettingsOverlay : MatchSettingsOverlay
public class PlaylistsMatchSettingsOverlay : MatchSettingsOverlay
{
public Action EditPlaylist;

View File

@ -9,41 +9,41 @@ using osu.Game.Screens.Multi.Components;
using osu.Game.Screens.Multi.Lounge;
using osu.Game.Screens.Multi.Match;
namespace osu.Game.Screens.Multi.Timeshift
namespace osu.Game.Screens.Multi.Playlists
{
public class TimeshiftMultiplayer : Multiplayer
public class PlaylistsMultiplayer : Multiplayer
{
protected override void UpdatePollingRate(bool isIdle)
{
var timeshiftManager = (TimeshiftRoomManager)RoomManager;
var playlistsManager = (PlaylistsRoomManager)RoomManager;
if (!this.IsCurrentScreen())
{
timeshiftManager.TimeBetweenListingPolls.Value = 0;
timeshiftManager.TimeBetweenSelectionPolls.Value = 0;
playlistsManager.TimeBetweenListingPolls.Value = 0;
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
}
else
{
switch (CurrentSubScreen)
{
case LoungeSubScreen _:
timeshiftManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
timeshiftManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
playlistsManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
playlistsManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
break;
case RoomSubScreen _:
timeshiftManager.TimeBetweenListingPolls.Value = 0;
timeshiftManager.TimeBetweenSelectionPolls.Value = isIdle ? 30000 : 5000;
playlistsManager.TimeBetweenListingPolls.Value = 0;
playlistsManager.TimeBetweenSelectionPolls.Value = isIdle ? 30000 : 5000;
break;
default:
timeshiftManager.TimeBetweenListingPolls.Value = 0;
timeshiftManager.TimeBetweenSelectionPolls.Value = 0;
playlistsManager.TimeBetweenListingPolls.Value = 0;
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
break;
}
}
Logger.Log($"Polling adjusted (listing: {timeshiftManager.TimeBetweenListingPolls.Value}, selection: {timeshiftManager.TimeBetweenSelectionPolls.Value})");
Logger.Log($"Polling adjusted (listing: {playlistsManager.TimeBetweenListingPolls.Value}, selection: {playlistsManager.TimeBetweenSelectionPolls.Value})");
}
protected override Room CreateNewRoom()
@ -53,10 +53,10 @@ namespace osu.Game.Screens.Multi.Timeshift
protected override string ScreenTitle => "Playlists";
protected override RoomManager CreateRoomManager() => new TimeshiftRoomManager();
protected override RoomManager CreateRoomManager() => new PlaylistsRoomManager();
protected override LoungeSubScreen CreateLounge() => new TimeshiftLoungeSubScreen();
protected override LoungeSubScreen CreateLounge() => new PlaylistsLoungeSubScreen();
protected override OsuButton CreateNewMultiplayerGameButton() => new CreateTimeshiftRoomButton();
protected override OsuButton CreateNewMultiplayerGameButton() => new CreatePlaylistsRoomButton();
}
}

View File

@ -8,14 +8,14 @@ using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi.Components;
namespace osu.Game.Screens.Multi.Timeshift
namespace osu.Game.Screens.Multi.Playlists
{
public class TimeshiftReadyButton : ReadyButton
public class PlaylistsReadyButton : ReadyButton
{
[Resolved(typeof(Room), nameof(Room.EndDate))]
private Bindable<DateTimeOffset?> endDate { get; set; }
public TimeshiftReadyButton()
public PlaylistsReadyButton()
{
Text = "Start";
}

View File

@ -5,9 +5,9 @@ using System.Collections.Generic;
using osu.Framework.Bindables;
using osu.Game.Screens.Multi.Components;
namespace osu.Game.Screens.Multi.Timeshift
namespace osu.Game.Screens.Multi.Playlists
{
public class TimeshiftRoomManager : RoomManager
public class PlaylistsRoomManager : RoomManager
{
public readonly Bindable<double> TimeBetweenListingPolls = new Bindable<double>();
public readonly Bindable<double> TimeBetweenSelectionPolls = new Bindable<double>();

View File

@ -19,9 +19,9 @@ using osu.Game.Screens.Select;
using osu.Game.Users;
using Footer = osu.Game.Screens.Multi.Match.Components.Footer;
namespace osu.Game.Screens.Multi.Timeshift
namespace osu.Game.Screens.Multi.Playlists
{
public class TimeshiftRoomSubScreen : RoomSubScreen
public class PlaylistsRoomSubScreen : RoomSubScreen
{
public override string Title { get; }
@ -38,7 +38,7 @@ namespace osu.Game.Screens.Multi.Timeshift
private OverlinedHeader participantsHeader;
public TimeshiftRoomSubScreen(Room room)
public PlaylistsRoomSubScreen(Room room)
{
Title = room.RoomID.Value == null ? "New playlist" : room.Name.Value;
Activity.Value = new UserActivity.InLobby(room);
@ -126,7 +126,7 @@ namespace osu.Game.Screens.Multi.Timeshift
RequestShowResults = item =>
{
Debug.Assert(roomId.Value != null);
multiplayer?.Push(new TimeshiftResultsScreen(null, roomId.Value.Value, item, false));
multiplayer?.Push(new PlaylistsResultsScreen(null, roomId.Value.Value, item, false));
}
}
},
@ -188,7 +188,7 @@ namespace osu.Game.Screens.Multi.Timeshift
new Dimension(GridSizeMode.AutoSize),
}
},
settingsOverlay = new TimeshiftMatchSettingsOverlay
settingsOverlay = new PlaylistsMatchSettingsOverlay
{
RelativeSizeAxes = Axes.Both,
EditPlaylist = () => this.Push(new MatchSongSelect()),
@ -219,7 +219,7 @@ namespace osu.Game.Screens.Multi.Timeshift
}, true);
}
private void onStart() => StartPlay(() => new TimeshiftPlayer(SelectedItem.Value)
private void onStart() => StartPlay(() => new PlaylistsPlayer(SelectedItem.Value)
{
Exited = () => leaderboard.RefreshScores()
});

View File

@ -17,7 +17,7 @@ using osu.Game.Screens.Ranking;
namespace osu.Game.Screens.Multi.Ranking
{
public class TimeshiftResultsScreen : ResultsScreen
public class PlaylistsResultsScreen : ResultsScreen
{
private readonly int roomId;
private readonly PlaylistItem playlistItem;
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Multi.Ranking
[Resolved]
private IAPIProvider api { get; set; }
public TimeshiftResultsScreen(ScoreInfo score, int roomId, PlaylistItem playlistItem, bool allowRetry, bool allowWatchingReplay = true)
public PlaylistsResultsScreen(ScoreInfo score, int roomId, PlaylistItem playlistItem, bool allowRetry, bool allowWatchingReplay = true)
: base(score, allowRetry, allowWatchingReplay)
{
this.roomId = roomId;

View File

@ -28,31 +28,31 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
protected override void UpdatePollingRate(bool isIdle)
{
var timeshiftManager = (RealtimeRoomManager)RoomManager;
var playlistsManager = (RealtimeRoomManager)RoomManager;
if (!this.IsCurrentScreen())
{
timeshiftManager.TimeBetweenListingPolls.Value = 0;
timeshiftManager.TimeBetweenSelectionPolls.Value = 0;
playlistsManager.TimeBetweenListingPolls.Value = 0;
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
}
else
{
switch (CurrentSubScreen)
{
case LoungeSubScreen _:
timeshiftManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
timeshiftManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
playlistsManager.TimeBetweenListingPolls.Value = isIdle ? 120000 : 15000;
playlistsManager.TimeBetweenSelectionPolls.Value = isIdle ? 120000 : 15000;
break;
// Don't poll inside the match or anywhere else.
default:
timeshiftManager.TimeBetweenListingPolls.Value = 0;
timeshiftManager.TimeBetweenSelectionPolls.Value = 0;
playlistsManager.TimeBetweenListingPolls.Value = 0;
playlistsManager.TimeBetweenSelectionPolls.Value = 0;
break;
}
}
Logger.Log($"Polling adjusted (listing: {timeshiftManager.TimeBetweenListingPolls.Value}, selection: {timeshiftManager.TimeBetweenSelectionPolls.Value})");
Logger.Log($"Polling adjusted (listing: {playlistsManager.TimeBetweenListingPolls.Value}, selection: {playlistsManager.TimeBetweenSelectionPolls.Value})");
}
protected override Room CreateNewRoom()

View File

@ -19,8 +19,8 @@ using osuTK;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer
{
// Todo: The "room" part of TimeshiftPlayer should be split out into an abstract player class to be inherited instead.
public class RealtimePlayer : TimeshiftPlayer
// Todo: The "room" part of PlaylistsPlayer should be split out into an abstract player class to be inherited instead.
public class RealtimePlayer : PlaylistsPlayer
{
protected override bool PauseOnFocusLost => false;

View File

@ -7,7 +7,7 @@ using osu.Game.Screens.Multi.Ranking;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer
{
public class RealtimeResultsScreen : TimeshiftResultsScreen
public class RealtimeResultsScreen : PlaylistsResultsScreen
{
public RealtimeResultsScreen(ScoreInfo score, int roomId, PlaylistItem playlistItem)
: base(score, roomId, playlistItem, false, false)