mirror of
https://github.com/ppy/osu.git
synced 2025-01-22 13:23:51 +08:00
Merge branch 'UserDimLogic' of https://github.com/nyquillerium/osu into UserDimLogic
This commit is contained in:
commit
df7acc1d31
@ -112,7 +112,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config, IBindableBeatmap beatmap)
|
private void load(OsuConfigManager config, IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
InternalChild = expandTarget = new Container
|
InternalChild = expandTarget = new Container
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IAdjustableClock adjustableClock, IBindableBeatmap beatmap)
|
private void load(IAdjustableClock adjustableClock, IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
this.adjustableClock = adjustableClock;
|
this.adjustableClock = adjustableClock;
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<IResultPageInfo> CreateResultPages() => new[] { new TestRoomLeaderboardPageInfo(Score, Beatmap) };
|
protected override IEnumerable<IResultPageInfo> CreateResultPages() => new[] { new TestRoomLeaderboardPageInfo(Score, Beatmap.Value) };
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestRoomLeaderboardPageInfo : RoomLeaderboardPageInfo
|
private class TestRoomLeaderboardPageInfo : RoomLeaderboardPageInfo
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
@ -12,28 +13,37 @@ namespace osu.Game.Tests.Visual
|
|||||||
public class TestCasePlayerLoader : ManualInputManagerTestCase
|
public class TestCasePlayerLoader : ManualInputManagerTestCase
|
||||||
{
|
{
|
||||||
private PlayerLoader loader;
|
private PlayerLoader loader;
|
||||||
|
private ScreenStack stack;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGameBase game)
|
private void load(OsuGameBase game)
|
||||||
{
|
{
|
||||||
Beatmap.Value = new DummyWorkingBeatmap(game);
|
Beatmap.Value = new DummyWorkingBeatmap(game);
|
||||||
|
|
||||||
AddStep("load dummy beatmap", () => Add(loader = new PlayerLoader(() => new Player
|
InputManager.Add(stack = new ScreenStack { RelativeSizeAxes = Axes.Both });
|
||||||
|
|
||||||
|
AddStep("load dummy beatmap", () => stack.Push(loader = new PlayerLoader(() => new Player
|
||||||
{
|
{
|
||||||
AllowPause = false,
|
AllowPause = false,
|
||||||
AllowLeadIn = false,
|
AllowLeadIn = false,
|
||||||
AllowResults = false,
|
AllowResults = false,
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
AddUntilStep(() => loader.IsCurrentScreen(), "wait for current");
|
||||||
|
|
||||||
AddStep("mouse in centre", () => InputManager.MoveMouseTo(loader.ScreenSpaceDrawQuad.Centre));
|
AddStep("mouse in centre", () => InputManager.MoveMouseTo(loader.ScreenSpaceDrawQuad.Centre));
|
||||||
|
|
||||||
AddUntilStep(() => !loader.IsCurrentScreen(), "wait for no longer current");
|
AddUntilStep(() => !loader.IsCurrentScreen(), "wait for no longer current");
|
||||||
|
|
||||||
|
AddStep("exit loader", () => loader.Exit());
|
||||||
|
|
||||||
|
AddUntilStep(() => !loader.IsAlive, "wait for no longer alive");
|
||||||
|
|
||||||
AddStep("load slow dummy beatmap", () =>
|
AddStep("load slow dummy beatmap", () =>
|
||||||
{
|
{
|
||||||
SlowLoadPlayer slow = null;
|
SlowLoadPlayer slow = null;
|
||||||
|
|
||||||
Add(loader = new PlayerLoader(() => slow = new SlowLoadPlayer
|
stack.Push(loader = new PlayerLoader(() => slow = new SlowLoadPlayer
|
||||||
{
|
{
|
||||||
AllowPause = false,
|
AllowPause = false,
|
||||||
AllowLeadIn = false,
|
AllowLeadIn = false,
|
||||||
|
@ -12,9 +12,9 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="Bindable{WorkingBeatmap}"/> for the <see cref="OsuGame"/> beatmap.
|
/// A <see cref="Bindable{WorkingBeatmap}"/> for the <see cref="OsuGame"/> beatmap.
|
||||||
/// This should be used sparingly in-favour of <see cref="IBindableBeatmap"/>.
|
/// This should be used sparingly in-favour of <see cref="IBindable<WorkingBeatmap>"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class BindableBeatmap : NonNullableBindable<WorkingBeatmap>, IBindableBeatmap
|
public abstract class BindableBeatmap : NonNullableBindable<WorkingBeatmap>
|
||||||
{
|
{
|
||||||
private AudioManager audioManager;
|
private AudioManager audioManager;
|
||||||
private WorkingBeatmap lastBeatmap;
|
private WorkingBeatmap lastBeatmap;
|
||||||
@ -62,9 +62,6 @@ namespace osu.Game.Beatmaps
|
|||||||
lastBeatmap = beatmap;
|
lastBeatmap = beatmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NotNull]
|
|
||||||
IBindableBeatmap IBindableBeatmap.GetBoundCopy() => GetBoundCopy();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve a new <see cref="BindableBeatmap"/> instance weakly bound to this <see cref="BindableBeatmap"/>.
|
/// Retrieve a new <see cref="BindableBeatmap"/> instance weakly bound to this <see cref="BindableBeatmap"/>.
|
||||||
/// If you are further binding to events of the retrieved <see cref="BindableBeatmap"/>, ensure a local reference is held.
|
/// If you are further binding to events of the retrieved <see cref="BindableBeatmap"/>, ensure a local reference is held.
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class UpdateableBeatmapBackgroundSprite : ModelBackedDrawable<BeatmapInfo>
|
public class UpdateableBeatmapBackgroundSprite : ModelBackedDrawable<BeatmapInfo>
|
||||||
{
|
{
|
||||||
public readonly IBindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
public readonly Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private BeatmapManager beatmaps { get; set; }
|
private BeatmapManager beatmaps { get; set; }
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
// 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.
|
|
||||||
|
|
||||||
using osu.Framework.Configuration;
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Read-only interface for the <see cref="OsuGame"/> beatmap.
|
|
||||||
/// </summary>
|
|
||||||
public interface IBindableBeatmap : IBindable<WorkingBeatmap>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Retrieve a new <see cref="IBindableBeatmap"/> instance weakly bound to this <see cref="IBindableBeatmap"/>.
|
|
||||||
/// If you are further binding to events of the retrieved <see cref="IBindableBeatmap"/>, ensure a local reference is held.
|
|
||||||
/// </summary>
|
|
||||||
IBindableBeatmap GetBoundCopy();
|
|
||||||
}
|
|
||||||
}
|
|
@ -74,7 +74,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap)
|
private void load(IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,13 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
public class OsuPasswordTextBox : OsuTextBox
|
public class OsuPasswordTextBox : OsuTextBox, ISuppressKeyEventLogging
|
||||||
{
|
{
|
||||||
protected override Drawable GetDrawableCharacter(char c) => new PasswordMaskChar(CalculatedTextSize);
|
protected override Drawable GetDrawableCharacter(char c) => new PasswordMaskChar(CalculatedTextSize);
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Configuration;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
@ -37,10 +37,10 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
public RulesetInfo Ruleset { get; set; }
|
public RulesetInfo Ruleset { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public readonly BindableList<Mod> AllowedMods = new BindableList<Mod>();
|
public readonly List<Mod> AllowedMods = new List<Mod>();
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
|
public readonly List<Mod> RequiredMods = new List<Mod>();
|
||||||
|
|
||||||
[JsonProperty("beatmap")]
|
[JsonProperty("beatmap")]
|
||||||
private APIBeatmap apiBeatmap { get; set; }
|
private APIBeatmap apiBeatmap { get; set; }
|
||||||
|
@ -31,6 +31,10 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
[JsonProperty("playlist")]
|
[JsonProperty("playlist")]
|
||||||
public BindableList<PlaylistItem> Playlist { get; private set; } = new BindableList<PlaylistItem>();
|
public BindableList<PlaylistItem> Playlist { get; private set; } = new BindableList<PlaylistItem>();
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
[JsonIgnore]
|
||||||
|
public Bindable<PlaylistItem> CurrentItem { get; private set; } = new Bindable<PlaylistItem>();
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonProperty("channel_id")]
|
[JsonProperty("channel_id")]
|
||||||
public Bindable<int> ChannelId { get; private set; } = new Bindable<int>();
|
public Bindable<int> ChannelId { get; private set; } = new Bindable<int>();
|
||||||
@ -66,6 +70,18 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
[Cached]
|
[Cached]
|
||||||
public Bindable<int> ParticipantCount { get; private set; } = new Bindable<int>();
|
public Bindable<int> ParticipantCount { get; private set; } = new Bindable<int>();
|
||||||
|
|
||||||
|
public Room()
|
||||||
|
{
|
||||||
|
Playlist.ItemsAdded += updateCurrent;
|
||||||
|
Playlist.ItemsRemoved += updateCurrent;
|
||||||
|
updateCurrent(Playlist);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateCurrent(IEnumerable<PlaylistItem> playlist)
|
||||||
|
{
|
||||||
|
CurrentItem.Value = playlist.FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
// todo: TEMPORARY
|
// todo: TEMPORARY
|
||||||
[JsonProperty("participant_count")]
|
[JsonProperty("participant_count")]
|
||||||
private int? participantCount
|
private int? participantCount
|
||||||
|
@ -292,7 +292,7 @@ namespace osu.Game
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((screenStack.CurrentScreen as IOsuScreen)?.AllowExternalScreenChange != true)
|
if ((screenStack.CurrentScreen as IOsuScreen)?.AllowExternalScreenChange == false)
|
||||||
{
|
{
|
||||||
notifications.Post(new SimpleNotification
|
notifications.Post(new SimpleNotification
|
||||||
{
|
{
|
||||||
@ -311,7 +311,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
void loadScore()
|
void loadScore()
|
||||||
{
|
{
|
||||||
if (!menuScreen.IsCurrentScreen())
|
if (!menuScreen.IsCurrentScreen() || Beatmap.Disabled)
|
||||||
{
|
{
|
||||||
menuScreen.MakeCurrent();
|
menuScreen.MakeCurrent();
|
||||||
this.Delay(500).Schedule(loadScore, out scoreLoad);
|
this.Delay(500).Schedule(loadScore, out scoreLoad);
|
||||||
@ -723,46 +723,13 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
base.UpdateAfterChildren();
|
base.UpdateAfterChildren();
|
||||||
|
|
||||||
// we only want to apply these restrictions when we are inside a screen stack.
|
|
||||||
// the use case for not applying is in visual/unit tests.
|
|
||||||
bool applyBeatmapRulesetRestrictions = !(screenStack.CurrentScreen as IOsuScreen)?.AllowBeatmapRulesetChange ?? false;
|
|
||||||
|
|
||||||
ruleset.Disabled = applyBeatmapRulesetRestrictions;
|
|
||||||
Beatmap.Disabled = applyBeatmapRulesetRestrictions;
|
|
||||||
|
|
||||||
screenContainer.Padding = new MarginPadding { Top = ToolbarOffset };
|
screenContainer.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||||
overlayContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
overlayContent.Padding = new MarginPadding { Top = ToolbarOffset };
|
||||||
|
|
||||||
MenuCursorContainer.CanShowCursor = (screenStack.CurrentScreen as IOsuScreen)?.CursorVisible ?? false;
|
MenuCursorContainer.CanShowCursor = (screenStack.CurrentScreen as IOsuScreen)?.CursorVisible ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
protected virtual void ScreenChanged(IScreen current, IScreen newScreen)
|
||||||
/// Sets <see cref="Beatmap"/> while ignoring any beatmap.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="beatmap">The beatmap to set.</param>
|
|
||||||
public void ForcefullySetBeatmap(WorkingBeatmap beatmap)
|
|
||||||
{
|
|
||||||
var beatmapDisabled = Beatmap.Disabled;
|
|
||||||
|
|
||||||
Beatmap.Disabled = false;
|
|
||||||
Beatmap.Value = beatmap;
|
|
||||||
Beatmap.Disabled = beatmapDisabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets <see cref="Ruleset"/> while ignoring any ruleset restrictions.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="beatmap">The beatmap to set.</param>
|
|
||||||
public void ForcefullySetRuleset(RulesetInfo ruleset)
|
|
||||||
{
|
|
||||||
var rulesetDisabled = this.ruleset.Disabled;
|
|
||||||
|
|
||||||
this.ruleset.Disabled = false;
|
|
||||||
this.ruleset.Value = ruleset;
|
|
||||||
this.ruleset.Disabled = rulesetDisabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void ScreenChanged(IScreen lastScreen, IScreen newScreen)
|
|
||||||
{
|
{
|
||||||
switch (newScreen)
|
switch (newScreen)
|
||||||
{
|
{
|
||||||
|
@ -69,8 +69,9 @@ namespace osu.Game
|
|||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
private OsuBindableBeatmap beatmap;
|
private Bindable<WorkingBeatmap> beatmap;
|
||||||
protected BindableBeatmap Beatmap => beatmap;
|
|
||||||
|
protected Bindable<WorkingBeatmap> Beatmap => beatmap;
|
||||||
|
|
||||||
private Bindable<bool> fpsDisplayVisible;
|
private Bindable<bool> fpsDisplayVisible;
|
||||||
|
|
||||||
@ -155,7 +156,6 @@ namespace osu.Game
|
|||||||
dependencies.CacheAs<IAPIProvider>(API);
|
dependencies.CacheAs<IAPIProvider>(API);
|
||||||
|
|
||||||
var defaultBeatmap = new DummyWorkingBeatmap(this);
|
var defaultBeatmap = new DummyWorkingBeatmap(this);
|
||||||
beatmap = new OsuBindableBeatmap(defaultBeatmap, Audio);
|
|
||||||
|
|
||||||
dependencies.Cache(RulesetStore = new RulesetStore(contextFactory));
|
dependencies.Cache(RulesetStore = new RulesetStore(contextFactory));
|
||||||
dependencies.Cache(FileStore = new FileStore(contextFactory, Host.Storage));
|
dependencies.Cache(FileStore = new FileStore(contextFactory, Host.Storage));
|
||||||
@ -174,8 +174,10 @@ namespace osu.Game
|
|||||||
// this adds a global reduction of track volume for the time being.
|
// this adds a global reduction of track volume for the time being.
|
||||||
Audio.Track.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
|
Audio.Track.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
|
||||||
|
|
||||||
dependencies.CacheAs<BindableBeatmap>(beatmap);
|
beatmap = new OsuBindableBeatmap(defaultBeatmap, Audio);
|
||||||
dependencies.CacheAs<IBindableBeatmap>(beatmap);
|
|
||||||
|
dependencies.CacheAs<IBindable<WorkingBeatmap>>(beatmap);
|
||||||
|
dependencies.CacheAs(beatmap);
|
||||||
|
|
||||||
FileStore.Cleanup();
|
FileStore.Cleanup();
|
||||||
|
|
||||||
|
@ -11,6 +11,9 @@ using osu.Game.Online.API.Requests;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Direct
|
namespace osu.Game.Overlays.Direct
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A component which tracks a beatmap through potential download/import/deletion.
|
||||||
|
/// </summary>
|
||||||
public abstract class DownloadTrackingComposite : CompositeDrawable
|
public abstract class DownloadTrackingComposite : CompositeDrawable
|
||||||
{
|
{
|
||||||
public readonly Bindable<BeatmapSetInfo> BeatmapSet = new Bindable<BeatmapSetInfo>();
|
public readonly Bindable<BeatmapSetInfo> BeatmapSet = new Bindable<BeatmapSetInfo>();
|
||||||
@ -51,6 +54,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
};
|
};
|
||||||
|
|
||||||
beatmaps.ItemAdded += setAdded;
|
beatmaps.ItemAdded += setAdded;
|
||||||
|
beatmaps.ItemRemoved += setRemoved;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Disposal
|
#region Disposal
|
||||||
@ -105,27 +109,22 @@ namespace osu.Game.Overlays.Direct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onRequestSuccess(string data)
|
private void onRequestSuccess(string _) => Schedule(() => State.Value = DownloadState.Downloaded);
|
||||||
{
|
|
||||||
Schedule(() => State.Value = DownloadState.Downloaded);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onRequestProgress(float progress)
|
private void onRequestProgress(float progress) => Schedule(() => Progress.Value = progress);
|
||||||
{
|
|
||||||
Schedule(() => Progress.Value = progress);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onRequestFailure(Exception e)
|
private void onRequestFailure(Exception e) => Schedule(() => attachDownload(null));
|
||||||
{
|
|
||||||
Schedule(() => attachDownload(null));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setAdded(BeatmapSetInfo s, bool existing, bool silent)
|
private void setAdded(BeatmapSetInfo s, bool existing, bool silent) => setDownloadStateFromManager(s, DownloadState.LocallyAvailable);
|
||||||
|
|
||||||
|
private void setRemoved(BeatmapSetInfo s) => setDownloadStateFromManager(s, DownloadState.NotDownloaded);
|
||||||
|
|
||||||
|
private void setDownloadStateFromManager(BeatmapSetInfo s, DownloadState state) => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (s.OnlineBeatmapSetID != BeatmapSet.Value?.OnlineBeatmapSetID)
|
if (s.OnlineBeatmapSetID != BeatmapSet.Value?.OnlineBeatmapSetID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Schedule(() => State.Value = DownloadState.LocallyAvailable);
|
State.Value = state;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ namespace osu.Game.Overlays.Music
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BeatmapManager beatmaps, IBindableBeatmap beatmap)
|
private void load(BeatmapManager beatmaps, IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
beatmaps.GetAllUsableBeatmapSets().ForEach(b => addBeatmapSet(b, false, false));
|
beatmaps.GetAllUsableBeatmapSets().ForEach(b => addBeatmapSet(b, false, false));
|
||||||
beatmaps.ItemAdded += addBeatmapSet;
|
beatmaps.ItemAdded += addBeatmapSet;
|
||||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Overlays.Music
|
|||||||
private PlaylistList list;
|
private PlaylistList list;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours, BindableBeatmap beatmap, BeatmapManager beatmaps)
|
private void load(OsuColour colours, Bindable<WorkingBeatmap> beatmap, BeatmapManager beatmaps)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
this.beatmaps = beatmaps;
|
this.beatmaps = beatmaps;
|
||||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Overlays
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BindableBeatmap beatmap, BeatmapManager beatmaps, OsuColour colours)
|
private void load(Bindable<WorkingBeatmap> beatmap, BeatmapManager beatmaps, OsuColour colours)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
this.beatmaps = beatmaps;
|
this.beatmaps = beatmaps;
|
||||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap, IFrameBasedClock framedClock)
|
private void load(IBindable<WorkingBeatmap> beatmap, IFrameBasedClock framedClock)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap, IAdjustableClock clock)
|
private void load(IBindable<WorkingBeatmap> beatmap, IAdjustableClock clock)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
private WorkingBeatmap beatmap;
|
private WorkingBeatmap beatmap;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap)
|
private void load(IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap.Value;
|
this.beatmap = beatmap.Value;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap, OsuColour colours)
|
private void load(IBindable<WorkingBeatmap> beatmap, OsuColour colours)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
background.Colour = colours.Gray1;
|
background.Colour = colours.Gray1;
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap)
|
private void load(IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
private WaveformGraph waveform;
|
private WaveformGraph waveform;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap, IAdjustableClock adjustableClock, OsuColour colours)
|
private void load(IBindable<WorkingBeatmap> beatmap, IAdjustableClock adjustableClock, OsuColour colours)
|
||||||
{
|
{
|
||||||
this.adjustableClock = adjustableClock;
|
this.adjustableClock = adjustableClock;
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@ namespace osu.Game.Screens.Edit
|
|||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
||||||
|
|
||||||
public override bool HideOverlaysOnEnter => true;
|
public override bool HideOverlaysOnEnter => true;
|
||||||
public override bool AllowBeatmapRulesetChange => false;
|
|
||||||
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
private Box bottomBackground;
|
private Box bottomBackground;
|
||||||
private Container screenContainer;
|
private Container screenContainer;
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap)
|
private void load(IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
|
||||||
namespace osu.Game.Screens
|
namespace osu.Game.Screens
|
||||||
{
|
{
|
||||||
@ -12,8 +15,12 @@ namespace osu.Game.Screens
|
|||||||
/// Whether the beatmap or ruleset should be allowed to be changed by the user or game.
|
/// Whether the beatmap or ruleset should be allowed to be changed by the user or game.
|
||||||
/// Used to mark exclusive areas where this is strongly prohibited, like gameplay.
|
/// Used to mark exclusive areas where this is strongly prohibited, like gameplay.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool AllowBeatmapRulesetChange { get; }
|
bool DisallowExternalBeatmapRulesetChanges { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a top-level component should be allowed to exit the current screen to, for example,
|
||||||
|
/// complete an import.
|
||||||
|
/// </summary>
|
||||||
bool AllowExternalScreenChange { get; }
|
bool AllowExternalScreenChange { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -35,5 +42,9 @@ namespace osu.Game.Screens
|
|||||||
/// The amount of parallax to be applied while this screen is displayed.
|
/// The amount of parallax to be applied while this screen is displayed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
float BackgroundParallaxAmount { get; }
|
float BackgroundParallaxAmount { get; }
|
||||||
|
|
||||||
|
Bindable<WorkingBeatmap> Beatmap { get; }
|
||||||
|
|
||||||
|
Bindable<RulesetInfo> Ruleset { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DidLoadMenu;
|
public bool DidLoadMenu;
|
||||||
|
|
||||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
|
||||||
|
|
||||||
private MainMenu mainMenu;
|
private MainMenu mainMenu;
|
||||||
private SampleChannel welcome;
|
private SampleChannel welcome;
|
||||||
private SampleChannel seeya;
|
private SampleChannel seeya;
|
||||||
@ -47,10 +45,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
private WorkingBeatmap introBeatmap;
|
private WorkingBeatmap introBeatmap;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game, BindableBeatmap beatmap)
|
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
|
||||||
|
|
||||||
menuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
|
menuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
|
||||||
menuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
|
menuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
|
||||||
|
|
||||||
@ -95,7 +91,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (!resuming)
|
if (!resuming)
|
||||||
{
|
{
|
||||||
beatmap.Value = introBeatmap;
|
Beatmap.Value = introBeatmap;
|
||||||
|
|
||||||
if (menuVoice)
|
if (menuVoice)
|
||||||
welcome.Play();
|
welcome.Play();
|
||||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ShaderManager shaders, IBindableBeatmap beatmap)
|
private void load(ShaderManager shaders, IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);
|
shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);
|
||||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap, OsuColour colours)
|
private void load(IBindable<WorkingBeatmap> beatmap, OsuColour colours)
|
||||||
{
|
{
|
||||||
this.beatmap.BindTo(beatmap);
|
this.beatmap.BindTo(beatmap);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
CurrentBeatmap.BindValueChanged(v => updateText(), true);
|
CurrentItem.BindValueChanged(v => updateText(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private float textSize = OsuSpriteText.FONT_SIZE;
|
private float textSize = OsuSpriteText.FONT_SIZE;
|
||||||
@ -48,12 +48,14 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
|
|
||||||
private void updateText()
|
private void updateText()
|
||||||
{
|
{
|
||||||
if (!IsLoaded)
|
if (LoadState < LoadState.Loading)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
textFlow.Clear();
|
textFlow.Clear();
|
||||||
|
|
||||||
if (CurrentBeatmap.Value == null)
|
var beatmap = CurrentItem.Value?.Beatmap;
|
||||||
|
|
||||||
|
if (beatmap == null)
|
||||||
textFlow.AddText("No beatmap selected", s =>
|
textFlow.AddText("No beatmap selected", s =>
|
||||||
{
|
{
|
||||||
s.TextSize = TextSize;
|
s.TextSize = TextSize;
|
||||||
@ -65,7 +67,7 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = new LocalisedString((CurrentBeatmap.Value.Metadata.ArtistUnicode, CurrentBeatmap.Value.Metadata.Artist)),
|
Text = new LocalisedString((beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist)),
|
||||||
TextSize = TextSize,
|
TextSize = TextSize,
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
@ -75,10 +77,10 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = new LocalisedString((CurrentBeatmap.Value.Metadata.TitleUnicode, CurrentBeatmap.Value.Metadata.Title)),
|
Text = new LocalisedString((beatmap.Metadata.TitleUnicode, beatmap.Metadata.Title)),
|
||||||
TextSize = TextSize,
|
TextSize = TextSize,
|
||||||
}
|
}
|
||||||
}, null, LinkAction.OpenBeatmap, CurrentBeatmap.Value.OnlineBeatmapID.ToString(), "Open beatmap");
|
}, null, LinkAction.OpenBeatmap, beatmap.OnlineBeatmapID.ToString(), "Open beatmap");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,14 +51,16 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CurrentBeatmap.BindValueChanged(v =>
|
CurrentItem.BindValueChanged(item =>
|
||||||
{
|
{
|
||||||
beatmapAuthor.Clear();
|
beatmapAuthor.Clear();
|
||||||
|
|
||||||
if (v != null)
|
var beatmap = item?.Beatmap;
|
||||||
|
|
||||||
|
if (beatmap != null)
|
||||||
{
|
{
|
||||||
beatmapAuthor.AddText("mapped by ", s => s.Colour = OsuColour.Gray(0.8f));
|
beatmapAuthor.AddText("mapped by ", s => s.Colour = OsuColour.Gray(0.8f));
|
||||||
beatmapAuthor.AddLink(v.Metadata.Author.Username, null, LinkAction.OpenUserProfile, v.Metadata.Author.Id.ToString(), "View Profile");
|
beatmapAuthor.AddLink(beatmap.Metadata.Author.Username, null, LinkAction.OpenUserProfile, beatmap.Metadata.Author.Id.ToString(), "View Profile");
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Beatmaps.Drawables;
|
using osu.Game.Beatmaps.Drawables;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Components
|
namespace osu.Game.Screens.Multi.Components
|
||||||
@ -45,17 +46,17 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
CurrentBeatmap.BindValueChanged(_ => updateBeatmap());
|
CurrentItem.BindValueChanged(updateBeatmap, true);
|
||||||
CurrentRuleset.BindValueChanged(_ => updateBeatmap(), true);
|
|
||||||
Type.BindValueChanged(v => gameTypeContainer.Child = new DrawableGameType(v) { Size = new Vector2(height) }, true);
|
Type.BindValueChanged(v => gameTypeContainer.Child = new DrawableGameType(v) { Size = new Vector2(height) }, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateBeatmap()
|
private void updateBeatmap(PlaylistItem item)
|
||||||
{
|
{
|
||||||
if (CurrentBeatmap.Value != null)
|
if (item?.Beatmap != null)
|
||||||
{
|
{
|
||||||
rulesetContainer.FadeIn(transition_duration);
|
rulesetContainer.FadeIn(transition_duration);
|
||||||
rulesetContainer.Child = new DifficultyIcon(CurrentBeatmap.Value, CurrentRuleset.Value) { Size = new Vector2(height) };
|
rulesetContainer.Child = new DifficultyIcon(item.Beatmap, item.Ruleset) { Size = new Vector2(height) };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rulesetContainer.FadeOut(transition_duration);
|
rulesetContainer.FadeOut(transition_duration);
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Screens.Multi.Components
|
|||||||
|
|
||||||
InternalChild = sprite = CreateBackgroundSprite();
|
InternalChild = sprite = CreateBackgroundSprite();
|
||||||
|
|
||||||
sprite.Beatmap.BindTo(CurrentBeatmap);
|
CurrentItem.BindValueChanged(i => sprite.Beatmap.Value = i?.Beatmap, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual UpdateableBeatmapBackgroundSprite CreateBackgroundSprite() => new UpdateableBeatmapBackgroundSprite { RelativeSizeAxes = Axes.Both };
|
protected virtual UpdateableBeatmapBackgroundSprite CreateBackgroundSprite() => new UpdateableBeatmapBackgroundSprite { RelativeSizeAxes = Axes.Both };
|
||||||
|
@ -1,7 +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.
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -23,16 +22,13 @@ namespace osu.Game.Screens.Multi.Lounge
|
|||||||
protected readonly FilterControl Filter;
|
protected readonly FilterControl Filter;
|
||||||
|
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
private readonly Action<Screen> pushGameplayScreen;
|
|
||||||
private readonly ProcessingOverlay processingOverlay;
|
private readonly ProcessingOverlay processingOverlay;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private Bindable<Room> currentRoom { get; set; }
|
private Bindable<Room> currentRoom { get; set; }
|
||||||
|
|
||||||
public LoungeSubScreen(Action<Screen> pushGameplayScreen)
|
public LoungeSubScreen()
|
||||||
{
|
{
|
||||||
this.pushGameplayScreen = pushGameplayScreen;
|
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
Filter = new FilterControl { Depth = -1 },
|
Filter = new FilterControl { Depth = -1 },
|
||||||
@ -83,8 +79,8 @@ namespace osu.Game.Screens.Multi.Lounge
|
|||||||
content.Padding = new MarginPadding
|
content.Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = Filter.DrawHeight,
|
Top = Filter.DrawHeight,
|
||||||
Left = SearchableListOverlay.WIDTH_PADDING - DrawableRoom.SELECTION_BORDER_WIDTH + OsuScreen.HORIZONTAL_OVERFLOW_PADDING,
|
Left = SearchableListOverlay.WIDTH_PADDING - DrawableRoom.SELECTION_BORDER_WIDTH + HORIZONTAL_OVERFLOW_PADDING,
|
||||||
Right = SearchableListOverlay.WIDTH_PADDING + OsuScreen.HORIZONTAL_OVERFLOW_PADDING,
|
Right = SearchableListOverlay.WIDTH_PADDING + HORIZONTAL_OVERFLOW_PADDING,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +110,7 @@ namespace osu.Game.Screens.Multi.Lounge
|
|||||||
private void joinRequested(Room room)
|
private void joinRequested(Room room)
|
||||||
{
|
{
|
||||||
processingOverlay.Show();
|
processingOverlay.Show();
|
||||||
Manager?.JoinRoom(room, r =>
|
RoomManager?.JoinRoom(room, r =>
|
||||||
{
|
{
|
||||||
Open(room);
|
Open(room);
|
||||||
processingOverlay.Hide();
|
processingOverlay.Hide();
|
||||||
@ -132,7 +128,7 @@ namespace osu.Game.Screens.Multi.Lounge
|
|||||||
|
|
||||||
currentRoom.Value = room;
|
currentRoom.Value = room;
|
||||||
|
|
||||||
this.Push(new MatchSubScreen(room, s => pushGameplayScreen?.Invoke(s)));
|
this.Push(new MatchSubScreen(room));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
CurrentMods.BindValueChanged(m => modDisplay.Current.Value = m, true);
|
CurrentItem.BindValueChanged(i => modDisplay.Current.Value = i?.RequiredMods, true);
|
||||||
|
|
||||||
beatmapButton.Action = () => RequestBeatmapSelection?.Invoke();
|
beatmapButton.Action = () => RequestBeatmapSelection?.Invoke();
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,12 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
viewBeatmapButton.Beatmap.BindTo(CurrentBeatmap);
|
CurrentItem.BindValueChanged(item =>
|
||||||
readyButton.Beatmap.BindTo(CurrentBeatmap);
|
{
|
||||||
|
viewBeatmapButton.Beatmap.Value = item?.Beatmap;
|
||||||
|
readyButton.Beatmap.Value = item?.Beatmap;
|
||||||
|
}, true);
|
||||||
|
|
||||||
hostInfo.Host.BindTo(Host);
|
hostInfo.Host.BindTo(Host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,13 +14,13 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
{
|
{
|
||||||
public class ReadyButton : HeaderButton
|
public class ReadyButton : HeaderButton
|
||||||
{
|
{
|
||||||
public readonly IBindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
public readonly Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
||||||
|
|
||||||
[Resolved(typeof(Room), nameof(Room.EndDate))]
|
[Resolved(typeof(Room), nameof(Room.EndDate))]
|
||||||
private Bindable<DateTimeOffset> endDate { get; set; }
|
private Bindable<DateTimeOffset> endDate { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IBindableBeatmap gameBeatmap { get; set; }
|
private IBindable<WorkingBeatmap> gameBeatmap { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private BeatmapManager beatmaps { get; set; }
|
private BeatmapManager beatmaps { get; set; }
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
{
|
{
|
||||||
public class ViewBeatmapButton : HeaderButton
|
public class ViewBeatmapButton : HeaderButton
|
||||||
{
|
{
|
||||||
public readonly IBindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
public readonly Bindable<BeatmapInfo> Beatmap = new Bindable<BeatmapInfo>();
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private OsuGame osuGame { get; set; }
|
private OsuGame osuGame { get; set; }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
@ -11,17 +11,17 @@ using osu.Framework.Screens;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Multiplayer.GameTypes;
|
using osu.Game.Online.Multiplayer.GameTypes;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Screens.Multi.Play;
|
using osu.Game.Screens.Multi.Play;
|
||||||
using osu.Game.Screens.Play;
|
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
|
using PlaylistItem = osu.Game.Online.Multiplayer.PlaylistItem;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Match
|
namespace osu.Game.Screens.Multi.Match
|
||||||
{
|
{
|
||||||
public class MatchSubScreen : MultiplayerSubScreen
|
public class MatchSubScreen : MultiplayerSubScreen
|
||||||
{
|
{
|
||||||
public override bool AllowBeatmapRulesetChange => false;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
public override string Title { get; }
|
public override string Title { get; }
|
||||||
|
|
||||||
@ -33,49 +33,17 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
[Resolved(typeof(Room), nameof(Room.Name))]
|
[Resolved(typeof(Room), nameof(Room.Name))]
|
||||||
private Bindable<string> name { get; set; }
|
private Bindable<string> name { get; set; }
|
||||||
|
|
||||||
[Resolved(typeof(Room), nameof(Room.Playlist))]
|
[Resolved(typeof(Room), nameof(Room.Type))]
|
||||||
private BindableList<PlaylistItem> playlist { get; set; }
|
private Bindable<GameType> type { get; set; }
|
||||||
|
|
||||||
public MatchSubScreen(Room room, Action<Screen> pushGameplayScreen)
|
[Resolved(typeof(Room))]
|
||||||
{
|
protected BindableList<PlaylistItem> Playlist { get; private set; }
|
||||||
Title = room.RoomID.Value == null ? "New room" : room.Name;
|
|
||||||
|
|
||||||
InternalChild = new Match(pushGameplayScreen)
|
[Resolved(typeof(Room))]
|
||||||
{
|
protected Bindable<PlaylistItem> CurrentItem { get; private set; }
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
RequestBeatmapSelection = () => this.Push(new MatchSongSelect
|
|
||||||
{
|
|
||||||
Selected = item =>
|
|
||||||
{
|
|
||||||
playlist.Clear();
|
|
||||||
playlist.Add(item);
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
RequestExit = () =>
|
|
||||||
{
|
|
||||||
if (this.IsCurrentScreen())
|
|
||||||
this.Exit();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool OnExiting(IScreen next)
|
|
||||||
{
|
|
||||||
Manager?.PartRoom();
|
|
||||||
return base.OnExiting(next);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class Match : MultiplayerComposite
|
|
||||||
{
|
|
||||||
public Action RequestBeatmapSelection;
|
|
||||||
public Action RequestExit;
|
|
||||||
|
|
||||||
private readonly Action<Screen> pushGameplayScreen;
|
|
||||||
|
|
||||||
private MatchLeaderboard leaderboard;
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IBindableBeatmap gameBeatmap { get; set; }
|
protected Bindable<IEnumerable<Mod>> CurrentMods { get; private set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private BeatmapManager beatmapManager { get; set; }
|
private BeatmapManager beatmapManager { get; set; }
|
||||||
@ -83,9 +51,11 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private OsuGame game { get; set; }
|
private OsuGame game { get; set; }
|
||||||
|
|
||||||
public Match(Action<Screen> pushGameplayScreen)
|
private MatchLeaderboard leaderboard;
|
||||||
|
|
||||||
|
public MatchSubScreen(Room room)
|
||||||
{
|
{
|
||||||
this.pushGameplayScreen = pushGameplayScreen;
|
Title = room.RoomID.Value == null ? "New room" : room.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -109,7 +79,17 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
header = new Components.Header
|
header = new Components.Header
|
||||||
{
|
{
|
||||||
Depth = -1,
|
Depth = -1,
|
||||||
RequestBeatmapSelection = () => RequestBeatmapSelection?.Invoke()
|
RequestBeatmapSelection = () =>
|
||||||
|
{
|
||||||
|
this.Push(new MatchSongSelect
|
||||||
|
{
|
||||||
|
Selected = item =>
|
||||||
|
{
|
||||||
|
Playlist.Clear();
|
||||||
|
Playlist.Add(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new Drawable[] { info = new Info { OnStart = onStart } },
|
new Drawable[] { info = new Info { OnStart = onStart } },
|
||||||
@ -126,7 +106,7 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
{
|
{
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Left = 10 + OsuScreen.HORIZONTAL_OVERFLOW_PADDING,
|
Left = 10 + HORIZONTAL_OVERFLOW_PADDING,
|
||||||
Right = 10,
|
Right = 10,
|
||||||
Vertical = 10,
|
Vertical = 10,
|
||||||
},
|
},
|
||||||
@ -137,7 +117,7 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Left = 10,
|
Left = 10,
|
||||||
Right = 10 + OsuScreen.HORIZONTAL_OVERFLOW_PADDING,
|
Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
|
||||||
Vertical = 10,
|
Vertical = 10,
|
||||||
},
|
},
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -183,7 +163,11 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
chat.Exit += () => RequestExit?.Invoke();
|
chat.Exit += () =>
|
||||||
|
{
|
||||||
|
if (this.IsCurrentScreen())
|
||||||
|
this.Exit();
|
||||||
|
};
|
||||||
|
|
||||||
beatmapManager.ItemAdded += beatmapAdded;
|
beatmapManager.ItemAdded += beatmapAdded;
|
||||||
}
|
}
|
||||||
@ -192,53 +176,62 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
CurrentBeatmap.BindValueChanged(setBeatmap, true);
|
CurrentItem.BindValueChanged(currentItemChanged, true);
|
||||||
CurrentRuleset.BindValueChanged(setRuleset, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBeatmap(BeatmapInfo beatmap)
|
public override bool OnExiting(IScreen next)
|
||||||
|
{
|
||||||
|
RoomManager?.PartRoom();
|
||||||
|
return base.OnExiting(next);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles propagation of the current playlist item's content to game-wide mechanisms.
|
||||||
|
/// </summary>
|
||||||
|
private void currentItemChanged(PlaylistItem item)
|
||||||
{
|
{
|
||||||
// Retrieve the corresponding local beatmap, since we can't directly use the playlist's beatmap info
|
// Retrieve the corresponding local beatmap, since we can't directly use the playlist's beatmap info
|
||||||
var localBeatmap = beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == beatmap.OnlineBeatmapID);
|
var localBeatmap = item?.Beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == item.Beatmap.OnlineBeatmapID);
|
||||||
|
|
||||||
game?.ForcefullySetBeatmap(beatmapManager.GetWorkingBeatmap(localBeatmap));
|
Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap);
|
||||||
}
|
CurrentMods.Value = item?.RequiredMods ?? Enumerable.Empty<Mod>();
|
||||||
|
if (item?.Ruleset != null)
|
||||||
private void setRuleset(RulesetInfo ruleset)
|
Ruleset.Value = item.Ruleset;
|
||||||
{
|
|
||||||
if (ruleset == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
game?.ForcefullySetRuleset(ruleset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handle the case where a beatmap is imported (and can be used by this match).
|
||||||
|
/// </summary>
|
||||||
private void beatmapAdded(BeatmapSetInfo model, bool existing, bool silent) => Schedule(() =>
|
private void beatmapAdded(BeatmapSetInfo model, bool existing, bool silent) => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (gameBeatmap.Value != beatmapManager.DefaultBeatmap)
|
if (Beatmap.Value != beatmapManager.DefaultBeatmap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (CurrentBeatmap.Value == null)
|
if (Beatmap.Value == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Try to retrieve the corresponding local beatmap
|
// Try to retrieve the corresponding local beatmap
|
||||||
var localBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == CurrentBeatmap.Value.OnlineBeatmapID);
|
var localBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == CurrentItem.Value.Beatmap.OnlineBeatmapID);
|
||||||
|
|
||||||
if (localBeatmap != null)
|
if (localBeatmap != null)
|
||||||
game?.ForcefullySetBeatmap(beatmapManager.GetWorkingBeatmap(localBeatmap));
|
Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
[Resolved(canBeNull: true)]
|
||||||
|
private Multiplayer multiplayer { get; set; }
|
||||||
|
|
||||||
private void onStart()
|
private void onStart()
|
||||||
{
|
{
|
||||||
gameBeatmap.Value.Mods.Value = CurrentMods.Value.ToArray();
|
Beatmap.Value.Mods.Value = CurrentMods.Value.ToArray();
|
||||||
|
|
||||||
switch (Type.Value)
|
switch (type.Value)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case GameTypeTimeshift _:
|
case GameTypeTimeshift _:
|
||||||
pushGameplayScreen?.Invoke(new PlayerLoader(() => new TimeshiftPlayer(Playlist.First())
|
multiplayer?.Start(() => new TimeshiftPlayer(CurrentItem)
|
||||||
{
|
{
|
||||||
Exited = () => leaderboard.RefreshScores()
|
Exited = () => leaderboard.RefreshScores()
|
||||||
}));
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,5 +244,4 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
beatmapManager.ItemAdded -= beatmapAdded;
|
beatmapManager.ItemAdded -= beatmapAdded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -8,7 +9,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
@ -16,32 +16,22 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Input;
|
using osu.Game.Input;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Overlays;
|
|
||||||
using osu.Game.Overlays.BeatmapSet.Buttons;
|
using osu.Game.Overlays.BeatmapSet.Buttons;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osu.Game.Screens.Multi.Lounge;
|
using osu.Game.Screens.Multi.Lounge;
|
||||||
using osu.Game.Screens.Multi.Lounge.Components;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
using osu.Game.Screens.Multi.Match;
|
using osu.Game.Screens.Multi.Match;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi
|
namespace osu.Game.Screens.Multi
|
||||||
{
|
{
|
||||||
[Cached]
|
[Cached]
|
||||||
public class Multiplayer : CompositeDrawable, IOsuScreen, IOnlineComponent
|
public class Multiplayer : OsuScreen, IOnlineComponent
|
||||||
{
|
{
|
||||||
public bool AllowBeatmapRulesetChange => (screenStack.CurrentScreen as IMultiplayerSubScreen)?.AllowBeatmapRulesetChange ?? true;
|
public override bool CursorVisible => (screenStack.CurrentScreen as IMultiplayerSubScreen)?.CursorVisible ?? true;
|
||||||
public bool AllowExternalScreenChange => (screenStack.CurrentScreen as IMultiplayerSubScreen)?.AllowExternalScreenChange ?? true;
|
|
||||||
public bool CursorVisible => (screenStack.CurrentScreen as IMultiplayerSubScreen)?.AllowExternalScreenChange ?? true;
|
|
||||||
|
|
||||||
public bool HideOverlaysOnEnter => false;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
public OverlayActivation InitialOverlayActivationMode => OverlayActivation.All;
|
|
||||||
|
|
||||||
public float BackgroundParallaxAmount => 1;
|
|
||||||
|
|
||||||
public bool ValidForResume { get; set; } = true;
|
|
||||||
public bool ValidForPush { get; set; } = true;
|
|
||||||
|
|
||||||
public override bool RemoveWhenNotAlive => false;
|
|
||||||
|
|
||||||
private readonly MultiplayerWaveContainer waves;
|
private readonly MultiplayerWaveContainer waves;
|
||||||
|
|
||||||
@ -60,9 +50,6 @@ namespace osu.Game.Screens.Multi
|
|||||||
[Cached(Type = typeof(IRoomManager))]
|
[Cached(Type = typeof(IRoomManager))]
|
||||||
private RoomManager roomManager;
|
private RoomManager roomManager;
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private IBindableBeatmap beatmap { get; set; }
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuGameBase game { get; set; }
|
private OsuGameBase game { get; set; }
|
||||||
|
|
||||||
@ -77,16 +64,12 @@ namespace osu.Game.Screens.Multi
|
|||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
Padding = new MarginPadding { Horizontal = -HORIZONTAL_OVERFLOW_PADDING };
|
||||||
|
|
||||||
InternalChild = waves = new MultiplayerWaveContainer
|
InternalChild = waves = new MultiplayerWaveContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
};
|
Children = new Drawable[]
|
||||||
|
|
||||||
screenStack = new ScreenStack(loungeSubScreen = new LoungeSubScreen(pushGameplayScreen)) { RelativeSizeAxes = Axes.Both };
|
|
||||||
Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING };
|
|
||||||
|
|
||||||
waves.AddRange(new Drawable[]
|
|
||||||
{
|
{
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
@ -112,7 +95,7 @@ namespace osu.Game.Screens.Multi
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Top = Header.HEIGHT },
|
Padding = new MarginPadding { Top = Header.HEIGHT },
|
||||||
Child = screenStack
|
Child = screenStack = new ScreenStack(loungeSubScreen = new LoungeSubScreen()) { RelativeSizeAxes = Axes.Both }
|
||||||
},
|
},
|
||||||
new Header(screenStack),
|
new Header(screenStack),
|
||||||
createButton = new HeaderButton
|
createButton = new HeaderButton
|
||||||
@ -124,7 +107,7 @@ namespace osu.Game.Screens.Multi
|
|||||||
Margin = new MarginPadding
|
Margin = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = 10,
|
Top = 10,
|
||||||
Right = 10 + OsuScreen.HORIZONTAL_OVERFLOW_PADDING,
|
Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
|
||||||
},
|
},
|
||||||
Text = "Create room",
|
Text = "Create room",
|
||||||
Action = () => loungeSubScreen.Open(new Room
|
Action = () => loungeSubScreen.Open(new Room
|
||||||
@ -133,7 +116,8 @@ namespace osu.Game.Screens.Multi
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
roomManager = new RoomManager()
|
roomManager = new RoomManager()
|
||||||
});
|
}
|
||||||
|
};
|
||||||
|
|
||||||
screenStack.ScreenPushed += screenPushed;
|
screenStack.ScreenPushed += screenPushed;
|
||||||
screenStack.ScreenExited += screenExited;
|
screenStack.ScreenExited += screenExited;
|
||||||
@ -154,11 +138,9 @@ namespace osu.Game.Screens.Multi
|
|||||||
isIdle.BindValueChanged(updatePollingRate, true);
|
isIdle.BindValueChanged(updatePollingRate, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CachedModelDependencyContainer<Room> dependencies;
|
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
dependencies = new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
|
var dependencies = new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
|
||||||
dependencies.Model.BindTo(currentRoom);
|
dependencies.Model.BindTo(currentRoom);
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
@ -169,12 +151,16 @@ namespace osu.Game.Screens.Multi
|
|||||||
Logger.Log($"Polling adjusted to {roomManager.TimeBetweenPolls}");
|
Logger.Log($"Polling adjusted to {roomManager.TimeBetweenPolls}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pushGameplayScreen(IScreen gameplayScreen)
|
/// <summary>
|
||||||
|
/// Push a <see cref="Player"/> to the main screen stack to begin gameplay.
|
||||||
|
/// Generally called from a <see cref="MatchSubScreen"/> via DI resolution.
|
||||||
|
/// </summary>
|
||||||
|
public void Start(Func<Player> player)
|
||||||
{
|
{
|
||||||
if (!this.IsCurrentScreen())
|
if (!this.IsCurrentScreen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.Push(gameplayScreen);
|
this.Push(new PlayerLoader(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void APIStateChanged(APIAccess api, APIState state)
|
public void APIStateChanged(APIAccess api, APIState state)
|
||||||
@ -195,14 +181,13 @@ namespace osu.Game.Screens.Multi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnEntering(IScreen last)
|
public override void OnEntering(IScreen last)
|
||||||
{
|
{
|
||||||
this.FadeIn();
|
this.FadeIn();
|
||||||
|
|
||||||
waves.Show();
|
waves.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool OnExiting(IScreen next)
|
public override bool OnExiting(IScreen next)
|
||||||
{
|
{
|
||||||
waves.Hide();
|
waves.Hide();
|
||||||
|
|
||||||
@ -215,23 +200,29 @@ namespace osu.Game.Screens.Multi
|
|||||||
|
|
||||||
updatePollingRate(isIdle.Value);
|
updatePollingRate(isIdle.Value);
|
||||||
|
|
||||||
// the wave overlay transition takes longer than expected to run.
|
base.OnExiting(next);
|
||||||
logo?.AppendAnimatingAction(() => logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut(), false);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnResuming(IScreen last)
|
protected override void LogoExiting(OsuLogo logo)
|
||||||
|
{
|
||||||
|
base.LogoExiting(logo);
|
||||||
|
|
||||||
|
// the wave overlay transition takes longer than expected to run.
|
||||||
|
logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnResuming(IScreen last)
|
||||||
{
|
{
|
||||||
this.FadeIn(250);
|
this.FadeIn(250);
|
||||||
this.ScaleTo(1, 250, Easing.OutSine);
|
this.ScaleTo(1, 250, Easing.OutSine);
|
||||||
|
|
||||||
logo?.AppendAnimatingAction(() => OsuScreen.ApplyLogoArrivingDefaults(logo), true);
|
base.OnResuming(last);
|
||||||
|
|
||||||
updatePollingRate(isIdle.Value);
|
updatePollingRate(isIdle.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSuspending(IScreen next)
|
public override void OnSuspending(IScreen next)
|
||||||
{
|
{
|
||||||
this.ScaleTo(1.1f, 250, Easing.InSine);
|
this.ScaleTo(1.1f, 250, Easing.InSine);
|
||||||
this.FadeOut(250);
|
this.FadeOut(250);
|
||||||
@ -242,7 +233,8 @@ namespace osu.Game.Screens.Multi
|
|||||||
|
|
||||||
private void cancelLooping()
|
private void cancelLooping()
|
||||||
{
|
{
|
||||||
var track = beatmap?.Value?.Track;
|
var track = Beatmap?.Value?.Track;
|
||||||
|
|
||||||
if (track != null)
|
if (track != null)
|
||||||
track.Looping = false;
|
track.Looping = false;
|
||||||
}
|
}
|
||||||
@ -255,7 +247,7 @@ namespace osu.Game.Screens.Multi
|
|||||||
|
|
||||||
if (screenStack.CurrentScreen is MatchSubScreen)
|
if (screenStack.CurrentScreen is MatchSubScreen)
|
||||||
{
|
{
|
||||||
var track = beatmap.Value.Track;
|
var track = Beatmap.Value.Track;
|
||||||
if (track != null)
|
if (track != null)
|
||||||
{
|
{
|
||||||
track.Looping = true;
|
track.Looping = true;
|
||||||
@ -263,7 +255,7 @@ namespace osu.Game.Screens.Multi
|
|||||||
if (!track.IsRunning)
|
if (!track.IsRunning)
|
||||||
{
|
{
|
||||||
game.Audio.AddItemToList(track);
|
game.Audio.AddItemToList(track);
|
||||||
track.Seek(beatmap.Value.Metadata.PreviewTime);
|
track.Seek(Beatmap.Value.Metadata.PreviewTime);
|
||||||
track.Start();
|
track.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,10 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Rulesets;
|
|
||||||
using osu.Game.Rulesets.Mods;
|
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi
|
namespace osu.Game.Screens.Multi
|
||||||
@ -35,6 +31,9 @@ namespace osu.Game.Screens.Multi
|
|||||||
[Resolved(typeof(Room))]
|
[Resolved(typeof(Room))]
|
||||||
protected BindableList<PlaylistItem> Playlist { get; private set; }
|
protected BindableList<PlaylistItem> Playlist { get; private set; }
|
||||||
|
|
||||||
|
[Resolved(typeof(Room))]
|
||||||
|
protected Bindable<PlaylistItem> CurrentItem { get; private set; }
|
||||||
|
|
||||||
[Resolved(typeof(Room))]
|
[Resolved(typeof(Room))]
|
||||||
protected Bindable<IEnumerable<User>> Participants { get; private set; }
|
protected Bindable<IEnumerable<User>> Participants { get; private set; }
|
||||||
|
|
||||||
@ -52,35 +51,5 @@ namespace osu.Game.Screens.Multi
|
|||||||
|
|
||||||
[Resolved(typeof(Room))]
|
[Resolved(typeof(Room))]
|
||||||
protected Bindable<TimeSpan> Duration { get; private set; }
|
protected Bindable<TimeSpan> Duration { get; private set; }
|
||||||
|
|
||||||
private readonly Bindable<BeatmapInfo> currentBeatmap = new Bindable<BeatmapInfo>();
|
|
||||||
protected IBindable<BeatmapInfo> CurrentBeatmap => currentBeatmap;
|
|
||||||
|
|
||||||
private readonly Bindable<IEnumerable<Mod>> currentMods = new Bindable<IEnumerable<Mod>>();
|
|
||||||
protected IBindable<IEnumerable<Mod>> CurrentMods => currentMods;
|
|
||||||
|
|
||||||
private readonly Bindable<RulesetInfo> currentRuleset = new Bindable<RulesetInfo>();
|
|
||||||
protected IBindable<RulesetInfo> CurrentRuleset => currentRuleset;
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
Playlist.ItemsAdded += _ => updatePlaylist();
|
|
||||||
Playlist.ItemsRemoved += _ => updatePlaylist();
|
|
||||||
|
|
||||||
updatePlaylist();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updatePlaylist()
|
|
||||||
{
|
|
||||||
// Todo: We only ever have one playlist item for now. In the future, this will be user-settable
|
|
||||||
|
|
||||||
var playlistItem = Playlist.FirstOrDefault();
|
|
||||||
|
|
||||||
currentBeatmap.Value = playlistItem?.Beatmap;
|
|
||||||
currentMods.Value = playlistItem?.RequiredMods ?? Enumerable.Empty<Mod>();
|
|
||||||
currentRuleset.Value = playlistItem?.Ruleset;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,43 +3,26 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Overlays;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi
|
namespace osu.Game.Screens.Multi
|
||||||
{
|
{
|
||||||
public abstract class MultiplayerSubScreen : CompositeDrawable, IMultiplayerSubScreen, IKeyBindingHandler<GlobalAction>
|
public abstract class MultiplayerSubScreen : OsuScreen, IMultiplayerSubScreen, IKeyBindingHandler<GlobalAction>
|
||||||
{
|
{
|
||||||
public virtual bool AllowBeatmapRulesetChange => true;
|
public override bool DisallowExternalBeatmapRulesetChanges => false;
|
||||||
public bool AllowExternalScreenChange => true;
|
|
||||||
public bool CursorVisible => true;
|
|
||||||
|
|
||||||
public bool HideOverlaysOnEnter => false;
|
|
||||||
public OverlayActivation InitialOverlayActivationMode => OverlayActivation.All;
|
|
||||||
|
|
||||||
public float BackgroundParallaxAmount => 1;
|
|
||||||
|
|
||||||
public bool ValidForResume { get; set; } = true;
|
|
||||||
public bool ValidForPush { get; set; } = true;
|
|
||||||
|
|
||||||
public override bool RemoveWhenNotAlive => false;
|
public override bool RemoveWhenNotAlive => false;
|
||||||
|
|
||||||
public abstract string Title { get; }
|
|
||||||
public virtual string ShortTitle => Title;
|
public virtual string ShortTitle => Title;
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
protected IBindableBeatmap Beatmap { get; private set; }
|
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
protected OsuGame Game { get; private set; }
|
protected OsuGame Game { get; private set; }
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
protected IRoomManager Manager { get; private set; }
|
protected IRoomManager RoomManager { get; private set; }
|
||||||
|
|
||||||
protected MultiplayerSubScreen()
|
protected MultiplayerSubScreen()
|
||||||
{
|
{
|
||||||
@ -48,14 +31,14 @@ namespace osu.Game.Screens.Multi
|
|||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnEntering(IScreen last)
|
public override void OnEntering(IScreen last)
|
||||||
{
|
{
|
||||||
this.FadeInFromZero(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
this.FadeInFromZero(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
||||||
this.FadeInFromZero(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
this.FadeInFromZero(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
||||||
this.MoveToX(200).MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
this.MoveToX(200).MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool OnExiting(IScreen next)
|
public override bool OnExiting(IScreen next)
|
||||||
{
|
{
|
||||||
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
||||||
this.MoveToX(200, WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
this.MoveToX(200, WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
||||||
@ -63,19 +46,19 @@ namespace osu.Game.Screens.Multi
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnResuming(IScreen last)
|
public override void OnResuming(IScreen last)
|
||||||
{
|
{
|
||||||
this.FadeIn(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
this.FadeIn(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
||||||
this.MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
this.MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnSuspending(IScreen next)
|
public override void OnSuspending(IScreen next)
|
||||||
{
|
{
|
||||||
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
||||||
this.MoveToX(-200, WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
this.MoveToX(-200, WaveContainer.DISAPPEAR_DURATION, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool OnPressed(GlobalAction action)
|
public override bool OnPressed(GlobalAction action)
|
||||||
{
|
{
|
||||||
if (!this.IsCurrentScreen()) return false;
|
if (!this.IsCurrentScreen()) return false;
|
||||||
|
|
||||||
|
@ -50,15 +50,28 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
protected new OsuGameBase Game => base.Game as OsuGameBase;
|
protected new OsuGameBase Game => base.Game as OsuGameBase;
|
||||||
|
|
||||||
public virtual bool AllowBeatmapRulesetChange => true;
|
/// <summary>
|
||||||
|
/// Whether to disallow changes to game-wise Beatmap/Ruleset bindables for this screen (and all children).
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool DisallowExternalBeatmapRulesetChanges => false;
|
||||||
|
|
||||||
protected readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
private SampleChannel sampleExit;
|
||||||
|
|
||||||
public virtual float BackgroundParallaxAmount => 1;
|
public virtual float BackgroundParallaxAmount => 1;
|
||||||
|
|
||||||
protected readonly Bindable<RulesetInfo> Ruleset = new Bindable<RulesetInfo>();
|
public Bindable<WorkingBeatmap> Beatmap { get; set; }
|
||||||
|
|
||||||
private SampleChannel sampleExit;
|
public Bindable<RulesetInfo> Ruleset { get; set; }
|
||||||
|
|
||||||
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
|
{
|
||||||
|
var deps = new OsuScreenDependencies(DisallowExternalBeatmapRulesetChanges, base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
|
Beatmap = deps.Beatmap;
|
||||||
|
Ruleset = deps.Ruleset;
|
||||||
|
|
||||||
|
return deps;
|
||||||
|
}
|
||||||
|
|
||||||
protected BackgroundScreen Background => backgroundStack?.CurrentScreen as BackgroundScreen;
|
protected BackgroundScreen Background => backgroundStack?.CurrentScreen as BackgroundScreen;
|
||||||
|
|
||||||
@ -77,11 +90,8 @@ namespace osu.Game.Screens
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(BindableBeatmap beatmap, OsuGame osu, AudioManager audio, Bindable<RulesetInfo> ruleset)
|
private void load(OsuGame osu, AudioManager audio)
|
||||||
{
|
{
|
||||||
Beatmap.BindTo(beatmap);
|
|
||||||
Ruleset.BindTo(ruleset);
|
|
||||||
|
|
||||||
sampleExit = audio.Sample.Get(@"UI/screen-back");
|
sampleExit = audio.Sample.Get(@"UI/screen-back");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +144,6 @@ namespace osu.Game.Screens
|
|||||||
if (localBackground != null && backgroundStack?.CurrentScreen == localBackground)
|
if (localBackground != null && backgroundStack?.CurrentScreen == localBackground)
|
||||||
backgroundStack?.Exit();
|
backgroundStack?.Exit();
|
||||||
|
|
||||||
Beatmap.UnbindAll();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
41
osu.Game/Screens/OsuScreenDependencies.cs
Normal file
41
osu.Game/Screens/OsuScreenDependencies.cs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens
|
||||||
|
{
|
||||||
|
public class OsuScreenDependencies : DependencyContainer
|
||||||
|
{
|
||||||
|
public Bindable<WorkingBeatmap> Beatmap { get; }
|
||||||
|
|
||||||
|
public Bindable<RulesetInfo> Ruleset { get; }
|
||||||
|
|
||||||
|
public OsuScreenDependencies(bool requireLease, IReadOnlyDependencyContainer parent)
|
||||||
|
: base(parent)
|
||||||
|
{
|
||||||
|
if (requireLease)
|
||||||
|
{
|
||||||
|
Beatmap = parent.Get<LeasedBindable<WorkingBeatmap>>()?.GetBoundCopy();
|
||||||
|
if (Beatmap == null)
|
||||||
|
{
|
||||||
|
Cache(Beatmap = parent.Get<Bindable<WorkingBeatmap>>().BeginLease(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
Ruleset = parent.Get<LeasedBindable<RulesetInfo>>()?.GetBoundCopy();
|
||||||
|
if (Ruleset == null)
|
||||||
|
{
|
||||||
|
Cache(Ruleset = parent.Get<Bindable<RulesetInfo>>().BeginLease(true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Beatmap = (parent.Get<LeasedBindable<WorkingBeatmap>>() ?? parent.Get<Bindable<WorkingBeatmap>>()).GetBoundCopy();
|
||||||
|
Ruleset = (parent.Get<LeasedBindable<RulesetInfo>>() ?? parent.Get<Bindable<RulesetInfo>>()).GetBoundCopy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -385,7 +385,7 @@ namespace osu.Game.Screens.Play
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!AllowPause || HasFailed || !ValidForResume || pauseContainer?.IsPaused != false || RulesetContainer?.HasReplayLoaded != false) && (!pauseContainer?.IsResuming ?? true))
|
if ((!AllowPause || HasFailed || !ValidForResume || pauseContainer?.IsPaused.Value != false || RulesetContainer?.HasReplayLoaded.Value != false) && (!pauseContainer?.IsResuming ?? true))
|
||||||
{
|
{
|
||||||
// In the case of replays, we may have changed the playback rate.
|
// In the case of replays, we may have changed the playback rate.
|
||||||
applyRateFromMods();
|
applyRateFromMods();
|
||||||
|
@ -37,6 +37,8 @@ namespace osu.Game.Screens.Play
|
|||||||
private bool hideOverlays;
|
private bool hideOverlays;
|
||||||
public override bool HideOverlaysOnEnter => hideOverlays;
|
public override bool HideOverlaysOnEnter => hideOverlays;
|
||||||
|
|
||||||
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
private Task loadTask;
|
private Task loadTask;
|
||||||
|
|
||||||
public PlayerLoader(Func<Player> createPlayer)
|
public PlayerLoader(Func<Player> createPlayer)
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens.Play
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
RulesetContainer.SetReplayScore(score);
|
RulesetContainer?.SetReplayScore(score);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ScoreInfo CreateScore() => score.ScoreInfo;
|
protected override ScoreInfo CreateScore() => score.ScoreInfo;
|
||||||
|
@ -17,8 +17,6 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected new BackgroundScreenBeatmap Background => base.Background as BackgroundScreenBeatmap;
|
protected new BackgroundScreenBeatmap Background => base.Background as BackgroundScreenBeatmap;
|
||||||
|
|
||||||
public override bool AllowBeatmapRulesetChange => false;
|
|
||||||
|
|
||||||
protected const float BACKGROUND_FADE_DURATION = 800;
|
protected const float BACKGROUND_FADE_DURATION = 800;
|
||||||
|
|
||||||
protected float BackgroundOpacity => 1 - (float)DimLevel;
|
protected float BackgroundOpacity => 1 - (float)DimLevel;
|
||||||
|
@ -17,8 +17,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected override IEnumerable<IResultPageInfo> CreateResultPages() => new IResultPageInfo[]
|
protected override IEnumerable<IResultPageInfo> CreateResultPages() => new IResultPageInfo[]
|
||||||
{
|
{
|
||||||
new ScoreOverviewPageInfo(Score, Beatmap),
|
new ScoreOverviewPageInfo(Score, Beatmap.Value),
|
||||||
new LocalLeaderboardPageInfo(Score, Beatmap)
|
new LocalLeaderboardPageInfo(Score, Beatmap.Value)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
private ResultModeTabControl modeChangeButtons;
|
private ResultModeTabControl modeChangeButtons;
|
||||||
|
|
||||||
public override bool AllowBeatmapRulesetChange => false;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
protected readonly ScoreInfo Score;
|
protected readonly ScoreInfo Score;
|
||||||
|
|
||||||
|
@ -40,5 +40,21 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool OnExiting(IScreen next)
|
||||||
|
{
|
||||||
|
Beatmap.Disabled = true;
|
||||||
|
Ruleset.Disabled = true;
|
||||||
|
|
||||||
|
return base.OnExiting(next);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEntering(IScreen last)
|
||||||
|
{
|
||||||
|
base.OnEntering(last);
|
||||||
|
|
||||||
|
Beatmap.Disabled = false;
|
||||||
|
Ruleset.Disabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@ namespace osu.Game.Screens.Select
|
|||||||
private bool removeAutoModOnResume;
|
private bool removeAutoModOnResume;
|
||||||
private OsuScreen player;
|
private OsuScreen player;
|
||||||
|
|
||||||
|
public override bool AllowExternalScreenChange => true;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
@ -58,7 +60,6 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
|
|
||||||
Beatmap.Value.Track.Looping = false;
|
Beatmap.Value.Track.Looping = false;
|
||||||
Beatmap.Disabled = true;
|
|
||||||
|
|
||||||
SampleConfirm?.Play();
|
SampleConfirm?.Play();
|
||||||
|
|
||||||
|
@ -45,8 +45,6 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
protected virtual bool ShowFooter => true;
|
protected virtual bool ShowFooter => true;
|
||||||
|
|
||||||
public override bool AllowExternalScreenChange => true;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Can be null if <see cref="ShowFooter"/> is false.
|
/// Can be null if <see cref="ShowFooter"/> is false.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -78,7 +76,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
protected readonly BeatmapDetailArea BeatmapDetails;
|
protected readonly BeatmapDetailArea BeatmapDetails;
|
||||||
|
|
||||||
protected new readonly Bindable<RulesetInfo> Ruleset = new Bindable<RulesetInfo>();
|
private readonly Bindable<RulesetInfo> decoupledRuleset = new Bindable<RulesetInfo>();
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[Cached(Type = typeof(IBindable<IEnumerable<Mod>>))]
|
[Cached(Type = typeof(IBindable<IEnumerable<Mod>>))]
|
||||||
@ -268,8 +266,8 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
dependencies.CacheAs(this);
|
dependencies.CacheAs(this);
|
||||||
dependencies.CacheAs(Ruleset);
|
dependencies.CacheAs(decoupledRuleset);
|
||||||
dependencies.CacheAs<IBindable<RulesetInfo>>(Ruleset);
|
dependencies.CacheAs<IBindable<RulesetInfo>>(decoupledRuleset);
|
||||||
|
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
@ -334,9 +332,9 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
if (this.IsCurrentScreen() && !Carousel.SelectBeatmap(beatmap?.BeatmapInfo, false))
|
if (this.IsCurrentScreen() && !Carousel.SelectBeatmap(beatmap?.BeatmapInfo, false))
|
||||||
// If selecting new beatmap without bypassing filters failed, there's possibly a ruleset mismatch
|
// If selecting new beatmap without bypassing filters failed, there's possibly a ruleset mismatch
|
||||||
if (beatmap?.BeatmapInfo?.Ruleset != null && beatmap.BeatmapInfo.Ruleset != Ruleset.Value)
|
if (beatmap?.BeatmapInfo?.Ruleset != null && beatmap.BeatmapInfo.Ruleset != decoupledRuleset.Value)
|
||||||
{
|
{
|
||||||
base.Ruleset.Value = beatmap.BeatmapInfo.Ruleset;
|
Ruleset.Value = beatmap.BeatmapInfo.Ruleset;
|
||||||
Carousel.SelectBeatmap(beatmap.BeatmapInfo);
|
Carousel.SelectBeatmap(beatmap.BeatmapInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -377,12 +375,12 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
bool preview = false;
|
bool preview = false;
|
||||||
|
|
||||||
if (ruleset?.Equals(Ruleset.Value) == false)
|
if (ruleset?.Equals(decoupledRuleset.Value) == false)
|
||||||
{
|
{
|
||||||
Logger.Log($"ruleset changed from \"{Ruleset.Value}\" to \"{ruleset}\"");
|
Logger.Log($"ruleset changed from \"{decoupledRuleset.Value}\" to \"{ruleset}\"");
|
||||||
|
|
||||||
Beatmap.Value.Mods.Value = Enumerable.Empty<Mod>();
|
Beatmap.Value.Mods.Value = Enumerable.Empty<Mod>();
|
||||||
Ruleset.Value = ruleset;
|
decoupledRuleset.Value = ruleset;
|
||||||
|
|
||||||
// force a filter before attempting to change the beatmap.
|
// force a filter before attempting to change the beatmap.
|
||||||
// we may still be in the wrong ruleset as there is a debounce delay on ruleset changes.
|
// we may still be in the wrong ruleset as there is a debounce delay on ruleset changes.
|
||||||
@ -539,7 +537,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
Ruleset.UnbindAll();
|
decoupledRuleset.UnbindAll();
|
||||||
|
|
||||||
if (beatmaps != null)
|
if (beatmaps != null)
|
||||||
{
|
{
|
||||||
@ -600,9 +598,11 @@ namespace osu.Game.Screens.Select
|
|||||||
if (rulesetNoDebounce == null)
|
if (rulesetNoDebounce == null)
|
||||||
{
|
{
|
||||||
// manual binding to parent ruleset to allow for delayed load in the incoming direction.
|
// manual binding to parent ruleset to allow for delayed load in the incoming direction.
|
||||||
rulesetNoDebounce = Ruleset.Value = base.Ruleset.Value;
|
rulesetNoDebounce = decoupledRuleset.Value = Ruleset.Value;
|
||||||
base.Ruleset.ValueChanged += updateSelectedRuleset;
|
Ruleset.ValueChanged += updateSelectedRuleset;
|
||||||
Ruleset.ValueChanged += r => base.Ruleset.Value = r;
|
|
||||||
|
decoupledRuleset.ValueChanged += r => Ruleset.Value = r;
|
||||||
|
decoupledRuleset.DisabledChanged += r => Ruleset.Disabled = r;
|
||||||
|
|
||||||
Beatmap.BindDisabledChanged(disabled => Carousel.AllowSelection = !disabled, true);
|
Beatmap.BindDisabledChanged(disabled => Carousel.AllowSelection = !disabled, true);
|
||||||
Beatmap.BindValueChanged(workingBeatmapChanged);
|
Beatmap.BindValueChanged(workingBeatmapChanged);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Animations;
|
using osu.Framework.Graphics.Animations;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
@ -63,7 +64,7 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap, TextureStore textureStore)
|
private void load(IBindable<WorkingBeatmap> beatmap, TextureStore textureStore)
|
||||||
{
|
{
|
||||||
var basePath = Animation.Path.ToLowerInvariant();
|
var basePath = Animation.Path.ToLowerInvariant();
|
||||||
for (var frame = 0; frame < Animation.FrameCount; frame++)
|
for (var frame = 0; frame < Animation.FrameCount; frame++)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
@ -28,7 +29,7 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap)
|
private void load(IBindable<WorkingBeatmap> beatmap)
|
||||||
{
|
{
|
||||||
// Try first with the full name, then attempt with no path
|
// Try first with the full name, then attempt with no path
|
||||||
channel = beatmap.Value.Skin.GetSample(sample.Path) ?? beatmap.Value.Skin.GetSample(Path.ChangeExtension(sample.Path, null));
|
channel = beatmap.Value.Skin.GetSample(sample.Path) ?? beatmap.Value.Skin.GetSample(Path.ChangeExtension(sample.Path, null));
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
@ -62,7 +63,7 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IBindableBeatmap beatmap, TextureStore textureStore)
|
private void load(IBindable<WorkingBeatmap> beatmap, TextureStore textureStore)
|
||||||
{
|
{
|
||||||
var spritePath = Sprite.Path.ToLowerInvariant();
|
var spritePath = Sprite.Path.ToLowerInvariant();
|
||||||
var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath;
|
var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath;
|
||||||
|
@ -7,7 +7,7 @@ using osu.Game.Online.Multiplayer;
|
|||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
public class MultiplayerTestCase : OsuTestCase
|
public abstract class MultiplayerTestCase : OsuTestCase
|
||||||
{
|
{
|
||||||
[Cached]
|
[Cached]
|
||||||
private readonly Bindable<Room> currentRoom = new Bindable<Room>(new Room());
|
private readonly Bindable<Room> currentRoom = new Bindable<Room>(new Room());
|
||||||
|
@ -32,8 +32,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
// This is the earliest we can get OsuGameBase, which is used by the dummy working beatmap to find textures
|
// This is the earliest we can get OsuGameBase, which is used by the dummy working beatmap to find textures
|
||||||
beatmap.Default = new DummyWorkingBeatmap(Dependencies.Get<OsuGameBase>());
|
beatmap.Default = new DummyWorkingBeatmap(Dependencies.Get<OsuGameBase>());
|
||||||
|
|
||||||
Dependencies.CacheAs<BindableBeatmap>(beatmap);
|
Dependencies.CacheAs<Bindable<WorkingBeatmap>>(beatmap);
|
||||||
Dependencies.CacheAs<IBindableBeatmap>(beatmap);
|
Dependencies.CacheAs<IBindable<WorkingBeatmap>>(beatmap);
|
||||||
|
|
||||||
Dependencies.CacheAs(Ruleset);
|
Dependencies.CacheAs(Ruleset);
|
||||||
Dependencies.CacheAs<IBindable<RulesetInfo>>(Ruleset);
|
Dependencies.CacheAs<IBindable<RulesetInfo>>(Ruleset);
|
||||||
@ -58,11 +58,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
if (beatmap != null)
|
beatmap?.Value.Track.Stop();
|
||||||
{
|
|
||||||
beatmap.Disabled = true;
|
|
||||||
beatmap.Value.Track.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (localStorage.IsValueCreated)
|
if (localStorage.IsValueCreated)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2019.208.1" />
|
<PackageReference Include="ppy.osu.Framework" Version="2019.214.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
|
@ -105,8 +105,8 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.128.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2019.208.1" />
|
<PackageReference Include="ppy.osu.Framework" Version="2019.214.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.208.1" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.214.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
<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/=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>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PrivateVariableCanBeMadeReadonly/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PrivateVariableCanBeMadeReadonly/@EntryIndexedValue">WARNING</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PublicConstructorInAbstractClass/@EntryIndexedValue">WARNING</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PublicConstructorInAbstractClass/@EntryIndexedValue">WARNING</s:String>
|
||||||
@ -204,6 +205,7 @@
|
|||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HID/@EntryIndexedValue">HID</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HID/@EntryIndexedValue">HID</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HUD/@EntryIndexedValue">HUD</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HUD/@EntryIndexedValue">HUD</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IL/@EntryIndexedValue">IL</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IPC/@EntryIndexedValue">IPC</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IPC/@EntryIndexedValue">IPC</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LTRB/@EntryIndexedValue">LTRB</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LTRB/@EntryIndexedValue">LTRB</s:String>
|
||||||
|
Loading…
Reference in New Issue
Block a user