mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 10:23:20 +08:00
Compare commits
31 Commits
d7dbfc1502
...
f7f6a6aaba
Author | SHA1 | Date | |
---|---|---|---|
|
f7f6a6aaba | ||
|
be05f2a1c2 | ||
|
6ff1dec7b2 | ||
|
ce4aac4184 | ||
|
e920cfa187 | ||
|
ce8e4120b7 | ||
|
b505ecc7ba | ||
|
b14dde937d | ||
|
6c0ccc5ebe | ||
|
52b8753a12 | ||
|
23522b02d8 | ||
|
6afe083ec9 | ||
|
ddac71628d | ||
|
164b809c89 | ||
|
f4e155bfa6 | ||
|
3cfa455369 | ||
|
932afcde01 | ||
|
f792b6de00 | ||
|
4ae3ccfe48 | ||
|
0f73941808 | ||
|
7fdf13911b | ||
|
782ce24ca6 | ||
|
9c707ed341 | ||
|
5ce55e9cb4 | ||
|
3e1b4f4ac5 | ||
|
ae9119eef0 | ||
|
2420793466 | ||
|
3713bb48b7 | ||
|
7d4062d2ad | ||
|
29e7adcd3b | ||
|
8f7d2752c0 |
@ -231,6 +231,36 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
|||||||
AddAssert("slider still has 2 anchors", () => secondSlider.Path.ControlPoints.Count, () => Is.EqualTo(2));
|
AddAssert("slider still has 2 anchors", () => secondSlider.Path.ControlPoints.Count, () => Is.EqualTo(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestControlClickDoesNotDiscardExistingSelectionEvenIfNothingHit()
|
||||||
|
{
|
||||||
|
var firstSlider = new Slider
|
||||||
|
{
|
||||||
|
StartTime = 0,
|
||||||
|
Position = new Vector2(0, 0),
|
||||||
|
Path = new SliderPath
|
||||||
|
{
|
||||||
|
ControlPoints =
|
||||||
|
{
|
||||||
|
new PathControlPoint(),
|
||||||
|
new PathControlPoint(new Vector2(100))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
AddStep("add object", () => EditorBeatmap.AddRange([firstSlider]));
|
||||||
|
AddStep("select first slider", () => EditorBeatmap.SelectedHitObjects.AddRange([firstSlider]));
|
||||||
|
|
||||||
|
AddStep("move mouse to middle of playfield", () => InputManager.MoveMouseTo(blueprintContainer.ScreenSpaceDrawQuad.Centre));
|
||||||
|
AddStep("control-click left mouse", () =>
|
||||||
|
{
|
||||||
|
InputManager.PressKey(Key.ControlLeft);
|
||||||
|
InputManager.Click(MouseButton.Left);
|
||||||
|
InputManager.ReleaseKey(Key.ControlLeft);
|
||||||
|
});
|
||||||
|
AddAssert("selection preserved", () => EditorBeatmap.SelectedHitObjects.Count, () => Is.EqualTo(1));
|
||||||
|
}
|
||||||
|
|
||||||
private ComposeBlueprintContainer blueprintContainer
|
private ComposeBlueprintContainer blueprintContainer
|
||||||
=> Editor.ChildrenOfType<ComposeBlueprintContainer>().First();
|
=> Editor.ChildrenOfType<ComposeBlueprintContainer>().First();
|
||||||
|
|
||||||
|
@ -144,6 +144,13 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
|
|||||||
foreach (var nested in hitObject.NestedHitObjects)
|
foreach (var nested in hitObject.NestedHitObjects)
|
||||||
simulateHit(nested, ref attributes);
|
simulateHit(nested, ref attributes);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case StrongNestedHitObject:
|
||||||
|
// we never need to deal with these directly.
|
||||||
|
// the only thing strong hits do in terms of scoring is double their object's score increase,
|
||||||
|
// which is already handled at the parent object level via the `strongable.IsStrong` check lower down in this method.
|
||||||
|
// not handling these here can lead to them falsely being counted as combo-increasing when handling strong drum rolls!
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hitObject is DrumRollTick tick)
|
if (hitObject is DrumRollTick tick)
|
||||||
|
@ -5,25 +5,64 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Online.Rooms.RoomStatuses;
|
using osu.Game.Online.Rooms.RoomStatuses;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||||
|
using osu.Game.Tests.Resources;
|
||||||
using osu.Game.Tests.Visual.OnlinePlay;
|
using osu.Game.Tests.Visual.OnlinePlay;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Playlists
|
namespace osu.Game.Tests.Visual.Playlists
|
||||||
{
|
{
|
||||||
public partial class TestScenePlaylistsRoomSubScreen : OnlinePlayTestScene
|
public partial class TestScenePlaylistsRoomSubScreen : OnlinePlayTestScene
|
||||||
{
|
{
|
||||||
|
private const double track_length = 10000;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; } = null!;
|
private IAPIProvider api { get; set; } = null!;
|
||||||
|
|
||||||
protected new TestRoomManager RoomManager => (TestRoomManager)base.RoomManager;
|
protected new TestRoomManager RoomManager => (TestRoomManager)base.RoomManager;
|
||||||
|
|
||||||
|
private BeatmapManager beatmaps = null!;
|
||||||
|
private RulesetStore rulesets = null!;
|
||||||
|
private BeatmapSetInfo? importedSet;
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(GameHost host, AudioManager audio)
|
||||||
|
{
|
||||||
|
Dependencies.Cache(rulesets = new RealmRulesetStore(Realm));
|
||||||
|
Dependencies.Cache(beatmaps = new BeatmapManager(LocalStorage, Realm, null, audio, Resources, host, Beatmap.Default));
|
||||||
|
Dependencies.Cache(new ScoreManager(rulesets, () => beatmaps, LocalStorage, Realm, API));
|
||||||
|
Dependencies.Cache(Realm);
|
||||||
|
|
||||||
|
beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
|
||||||
|
|
||||||
|
Realm.Write(r =>
|
||||||
|
{
|
||||||
|
foreach (var set in r.All<BeatmapSetInfo>())
|
||||||
|
{
|
||||||
|
foreach (var b in set.Beatmaps)
|
||||||
|
{
|
||||||
|
// These will all have a virtual track length of 1000, see WorkingBeatmap.GetVirtualTrack().
|
||||||
|
b.Length = track_length - 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
importedSet = beatmaps.GetAllUsableBeatmapSets().First();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestStatusUpdateOnEnter()
|
public void TestStatusUpdateOnEnter()
|
||||||
{
|
{
|
||||||
@ -69,5 +108,42 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
AddAssert("close button present", () => roomScreen.ChildrenOfType<DangerousRoundedButton>().Any());
|
AddAssert("close button present", () => roomScreen.ChildrenOfType<DangerousRoundedButton>().Any());
|
||||||
AddUntilStep("wait for close button to disappear", () => !roomScreen.ChildrenOfType<DangerousRoundedButton>().Any());
|
AddUntilStep("wait for close button to disappear", () => !roomScreen.ChildrenOfType<DangerousRoundedButton>().Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase(120_000, true)] // Definitely enough time.
|
||||||
|
[TestCase(45_000, true)] // Enough time.
|
||||||
|
[TestCase(35_000, false)] // Not enough time to complete beatmap after lenience.
|
||||||
|
[TestCase(20_000, false)] // Not enough time.
|
||||||
|
[TestCase(5_000, false)] // Not enough time to complete beatmap before lenience.
|
||||||
|
[TestCase(37_500, true, 2)] // Enough time to complete beatmap after mods are applied.
|
||||||
|
public void TestReadyButtonEnablementPeriod(int offsetMs, bool enabled, double rate = 1)
|
||||||
|
{
|
||||||
|
Room room = null!;
|
||||||
|
PlaylistsRoomSubScreen roomScreen = null!;
|
||||||
|
|
||||||
|
AddStep("create room", () =>
|
||||||
|
{
|
||||||
|
RoomManager.AddRoom(room = new Room
|
||||||
|
{
|
||||||
|
Name = @"Test Room",
|
||||||
|
Host = api.LocalUser.Value,
|
||||||
|
Category = RoomCategory.Normal,
|
||||||
|
StartDate = DateTimeOffset.Now,
|
||||||
|
EndDate = DateTimeOffset.Now.AddMilliseconds(offsetMs),
|
||||||
|
Playlist =
|
||||||
|
[
|
||||||
|
new PlaylistItem(importedSet!.Beatmaps[0])
|
||||||
|
{
|
||||||
|
RequiredMods = rate == 1
|
||||||
|
? []
|
||||||
|
: [new APIMod(new OsuModDoubleTime { SpeedChange = { Value = rate } })]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep("push screen", () => LoadScreen(roomScreen = new PlaylistsRoomSubScreen(room)));
|
||||||
|
AddUntilStep("wait for screen load", () => roomScreen.IsCurrentScreen());
|
||||||
|
AddUntilStep("ready button enabled", () => roomScreen.ChildrenOfType<PlaylistsReadyButton>().SingleOrDefault()?.Enabled.Value, () => Is.EqualTo(enabled));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,6 +174,11 @@ namespace osu.Game
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly IBindable<OverlayActivation> OverlayActivationMode = new Bindable<OverlayActivation>();
|
public readonly IBindable<OverlayActivation> OverlayActivationMode = new Bindable<OverlayActivation>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the back button is currently displayed.
|
||||||
|
/// </summary>
|
||||||
|
private readonly IBindable<bool> backButtonVisibility = new Bindable<bool>();
|
||||||
|
|
||||||
IBindable<LocalUserPlayingState> ILocalUserPlayInfo.PlayingState => playingState;
|
IBindable<LocalUserPlayingState> ILocalUserPlayInfo.PlayingState => playingState;
|
||||||
|
|
||||||
private readonly Bindable<LocalUserPlayingState> playingState = new Bindable<LocalUserPlayingState>();
|
private readonly Bindable<LocalUserPlayingState> playingState = new Bindable<LocalUserPlayingState>();
|
||||||
@ -1019,7 +1024,7 @@ namespace osu.Game
|
|||||||
if (!(ScreenStack.CurrentScreen is IOsuScreen currentScreen))
|
if (!(ScreenStack.CurrentScreen is IOsuScreen currentScreen))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!((Drawable)currentScreen).IsLoaded || (currentScreen.AllowBackButton && !currentScreen.OnBackButton()))
|
if (!((Drawable)currentScreen).IsLoaded || (currentScreen.AllowUserExit && !currentScreen.OnBackButton()))
|
||||||
ScreenStack.Exit();
|
ScreenStack.Exit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1189,6 +1194,14 @@ namespace osu.Game
|
|||||||
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();
|
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
backButtonVisibility.ValueChanged += visible =>
|
||||||
|
{
|
||||||
|
if (visible.NewValue)
|
||||||
|
BackButton.Show();
|
||||||
|
else
|
||||||
|
BackButton.Hide();
|
||||||
|
};
|
||||||
|
|
||||||
// Importantly, this should be run after binding PostNotification to the import handlers so they can present the import after game startup.
|
// Importantly, this should be run after binding PostNotification to the import handlers so they can present the import after game startup.
|
||||||
handleStartupImport();
|
handleStartupImport();
|
||||||
}
|
}
|
||||||
@ -1581,12 +1594,14 @@ namespace osu.Game
|
|||||||
|
|
||||||
if (current is IOsuScreen currentOsuScreen)
|
if (current is IOsuScreen currentOsuScreen)
|
||||||
{
|
{
|
||||||
|
backButtonVisibility.UnbindFrom(currentOsuScreen.BackButtonVisibility);
|
||||||
OverlayActivationMode.UnbindFrom(currentOsuScreen.OverlayActivationMode);
|
OverlayActivationMode.UnbindFrom(currentOsuScreen.OverlayActivationMode);
|
||||||
API.Activity.UnbindFrom(currentOsuScreen.Activity);
|
API.Activity.UnbindFrom(currentOsuScreen.Activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newScreen is IOsuScreen newOsuScreen)
|
if (newScreen is IOsuScreen newOsuScreen)
|
||||||
{
|
{
|
||||||
|
backButtonVisibility.BindTo(newOsuScreen.BackButtonVisibility);
|
||||||
OverlayActivationMode.BindTo(newOsuScreen.OverlayActivationMode);
|
OverlayActivationMode.BindTo(newOsuScreen.OverlayActivationMode);
|
||||||
API.Activity.BindTo(newOsuScreen.Activity);
|
API.Activity.BindTo(newOsuScreen.Activity);
|
||||||
|
|
||||||
@ -1597,11 +1612,6 @@ namespace osu.Game
|
|||||||
else
|
else
|
||||||
Toolbar.Show();
|
Toolbar.Show();
|
||||||
|
|
||||||
if (newOsuScreen.AllowBackButton)
|
|
||||||
BackButton.Show();
|
|
||||||
else
|
|
||||||
BackButton.Hide();
|
|
||||||
|
|
||||||
if (newOsuScreen.ShowFooter)
|
if (newOsuScreen.ShowFooter)
|
||||||
{
|
{
|
||||||
BackButton.Hide();
|
BackButton.Hide();
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private OsuGame game { get; set; }
|
private OsuGame game { get; set; }
|
||||||
|
|
||||||
public override bool AllowBackButton => false;
|
public override bool AllowUserExit => false;
|
||||||
|
|
||||||
public override bool AllowExternalScreenChange => false;
|
public override bool AllowExternalScreenChange => false;
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ namespace osu.Game.Overlays
|
|||||||
content.ResizeHeightTo(0, animate ? transition_duration : 0, Easing.OutQuint);
|
content.ResizeHeightTo(0, animate ? transition_duration : 0, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
headerContent.FadeColour(Expanded.Value ? Color4.White : OsuColour.Gray(0.5f), 200, Easing.OutQuint);
|
headerContent.FadeColour(Expanded.Value ? Color4.White : OsuColour.Gray(0.7f), 200, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFadeState()
|
private void updateFadeState()
|
||||||
|
@ -433,7 +433,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
/// Finishes the current blueprint selection.
|
/// Finishes the current blueprint selection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">The mouse event which triggered end of selection.</param>
|
/// <param name="e">The mouse event which triggered end of selection.</param>
|
||||||
/// <returns>Whether a click selection was active.</returns>
|
/// <returns>
|
||||||
|
/// Whether the mouse event is considered to be fully handled.
|
||||||
|
/// If the return value is <see langword="false"/>, the standard click / mouse up action will follow.
|
||||||
|
/// </returns>
|
||||||
private bool endClickSelection(MouseButtonEvent e)
|
private bool endClickSelection(MouseButtonEvent e)
|
||||||
{
|
{
|
||||||
// If already handled a selection, double-click, or drag, we don't want to perform a mouse up / click action.
|
// If already handled a selection, double-click, or drag, we don't want to perform a mouse up / click action.
|
||||||
@ -443,14 +446,16 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
if (e.ControlPressed)
|
if (e.ControlPressed)
|
||||||
{
|
{
|
||||||
// if a selection didn't occur, we may want to trigger a deselection.
|
|
||||||
|
|
||||||
// Iterate from the top of the input stack (blueprints closest to the front of the screen first).
|
// Iterate from the top of the input stack (blueprints closest to the front of the screen first).
|
||||||
// Priority is given to already-selected blueprints.
|
// Priority is given to already-selected blueprints.
|
||||||
foreach (SelectionBlueprint<T> blueprint in SelectionBlueprints.AliveChildren.Where(b => b.IsHovered).OrderByDescending(b => b.IsSelected))
|
foreach (SelectionBlueprint<T> blueprint in SelectionBlueprints.AliveChildren.Where(b => b.IsHovered).OrderByDescending(b => b.IsSelected))
|
||||||
return clickSelectionHandled = SelectionHandler.MouseUpSelectionRequested(blueprint, e);
|
return clickSelectionHandled = SelectionHandler.MouseUpSelectionRequested(blueprint, e);
|
||||||
|
|
||||||
return false;
|
// can only be reached if there are no hovered blueprints.
|
||||||
|
// in that case, we still want to suppress mouse up / click handling, because when control is pressed,
|
||||||
|
// it is presumed we want to add to existing selection, not remove from it
|
||||||
|
// (unless explicitly control-clicking a selected object, which is handled above).
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedBlueprintAlreadySelectedOnMouseDown && SelectedItems.Count == 1)
|
if (selectedBlueprintAlreadySelectedOnMouseDown && SelectedItems.Count == 1)
|
||||||
|
@ -80,8 +80,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
public override float BackgroundParallaxAmount => 0.1f;
|
public override float BackgroundParallaxAmount => 0.1f;
|
||||||
|
|
||||||
public override bool AllowBackButton => false;
|
|
||||||
|
|
||||||
public override bool HideOverlaysOnEnter => true;
|
public override bool HideOverlaysOnEnter => true;
|
||||||
|
|
||||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
@ -194,6 +192,8 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool InitialBackButtonVisibility => false;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
@ -760,11 +760,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
switch (e.Action)
|
switch (e.Action)
|
||||||
{
|
{
|
||||||
case GlobalAction.Back:
|
|
||||||
// as we don't want to display the back button, manual handling of exit action is required.
|
|
||||||
this.Exit();
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case GlobalAction.EditorCloneSelection:
|
case GlobalAction.EditorCloneSelection:
|
||||||
Clone();
|
Clone();
|
||||||
return true;
|
return true;
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
public override float BackgroundParallaxAmount => 0.1f;
|
public override float BackgroundParallaxAmount => 0.1f;
|
||||||
|
|
||||||
public override bool AllowBackButton => false;
|
public override bool AllowUserExit => false;
|
||||||
|
|
||||||
public override bool HideOverlaysOnEnter => true;
|
public override bool HideOverlaysOnEnter => true;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Footer;
|
using osu.Game.Screens.Footer;
|
||||||
@ -21,15 +22,21 @@ namespace osu.Game.Screens
|
|||||||
bool DisallowExternalBeatmapRulesetChanges { get; }
|
bool DisallowExternalBeatmapRulesetChanges { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the user can exit this <see cref="IOsuScreen"/> by pressing the back button.
|
/// Whether the user can exit this <see cref="IOsuScreen"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool AllowBackButton { get; }
|
/// <remarks>
|
||||||
|
/// When overriden to <c>false</c>,
|
||||||
|
/// the user is blocked from exiting the screen via the <see cref="GlobalAction.Back"/> action,
|
||||||
|
/// and the back button is hidden from this screen by the initial state of <see cref="BackButtonVisibility"/> being set to hidden.
|
||||||
|
/// </remarks>
|
||||||
|
bool AllowUserExit { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether a footer (and a back button) should be displayed underneath the screen.
|
/// Whether a footer (and a back button) should be displayed underneath the screen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Temporarily, the back button is shown regardless of whether <see cref="AllowBackButton"/> is true.
|
/// Temporarily, the footer's own back button is shown regardless of whether <see cref="BackButtonVisibility"/> is set to hidden.
|
||||||
|
/// This will be corrected as the footer becomes used more commonly.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
bool ShowFooter { get; }
|
bool ShowFooter { get; }
|
||||||
|
|
||||||
@ -59,6 +66,11 @@ namespace osu.Game.Screens
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
IBindable<OverlayActivation> OverlayActivationMode { get; }
|
IBindable<OverlayActivation> OverlayActivationMode { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the back button should be displayed in this screen.
|
||||||
|
/// </summary>
|
||||||
|
IBindable<bool> BackButtonVisibility { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current <see cref="UserActivity"/> for this screen.
|
/// The current <see cref="UserActivity"/> for this screen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public override bool HideOverlaysOnEnter => Buttons == null || Buttons.State == ButtonSystemState.Initial;
|
public override bool HideOverlaysOnEnter => Buttons == null || Buttons.State == ButtonSystemState.Initial;
|
||||||
|
|
||||||
public override bool AllowBackButton => false;
|
public override bool AllowUserExit => false;
|
||||||
|
|
||||||
public override bool AllowExternalScreenChange => true;
|
public override bool AllowExternalScreenChange => true;
|
||||||
|
|
||||||
|
@ -126,7 +126,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
|||||||
syncManager = new SpectatorSyncManager(masterClockContainer)
|
syncManager = new SpectatorSyncManager(masterClockContainer)
|
||||||
{
|
{
|
||||||
ReadyToStart = performInitialSeek,
|
ReadyToStart = performInitialSeek,
|
||||||
}
|
},
|
||||||
|
new PlayerSettingsOverlay()
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < Users.Count; i++)
|
for (int i = 0; i < Users.Count; i++)
|
||||||
|
@ -180,7 +180,7 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
if (!(screenStack.CurrentScreen is IOnlinePlaySubScreen onlineSubScreen))
|
if (!(screenStack.CurrentScreen is IOnlinePlaySubScreen onlineSubScreen))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (((Drawable)onlineSubScreen).IsLoaded && onlineSubScreen.AllowBackButton && onlineSubScreen.OnBackButton())
|
if (((Drawable)onlineSubScreen).IsLoaded && onlineSubScreen.AllowUserExit && onlineSubScreen.OnBackButton())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (screenStack.CurrentScreen != null && !(screenStack.CurrentScreen is LoungeSubScreen))
|
if (screenStack.CurrentScreen != null && !(screenStack.CurrentScreen is LoungeSubScreen))
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// 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;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -10,7 +11,9 @@ using osu.Framework.Localisation;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Screens.OnlinePlay.Components;
|
using osu.Game.Screens.OnlinePlay.Components;
|
||||||
|
using osu.Game.Utils;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Playlists
|
namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||||
{
|
{
|
||||||
@ -19,6 +22,9 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IBindable<WorkingBeatmap> gameBeatmap { get; set; } = null!;
|
private IBindable<WorkingBeatmap> gameBeatmap { get; set; } = null!;
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private IBindable<IReadOnlyList<Mod>> mods { get; set; } = null!;
|
||||||
|
|
||||||
private readonly Room room;
|
private readonly Room room;
|
||||||
|
|
||||||
public PlaylistsReadyButton(Room room)
|
public PlaylistsReadyButton(Room room)
|
||||||
@ -63,14 +69,14 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
Enabled.Value = hasRemainingAttempts && enoughTimeLeft;
|
Enabled.Value = hasRemainingAttempts && enoughTimeLeft();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override LocalisableString TooltipText
|
public override LocalisableString TooltipText
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!enoughTimeLeft)
|
if (!enoughTimeLeft())
|
||||||
return "No time left!";
|
return "No time left!";
|
||||||
|
|
||||||
if (!hasRemainingAttempts)
|
if (!hasRemainingAttempts)
|
||||||
@ -80,9 +86,17 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool enoughTimeLeft =>
|
private bool enoughTimeLeft()
|
||||||
// This should probably consider the length of the currently selected item, rather than a constant 30 seconds.
|
{
|
||||||
room.EndDate != null && DateTimeOffset.UtcNow.AddSeconds(30).AddMilliseconds(gameBeatmap.Value.Track.Length) < room.EndDate;
|
double rate = ModUtils.CalculateRateWithMods(mods.Value);
|
||||||
|
|
||||||
|
// We want to avoid users not being able to submit scores if they chose to not skip,
|
||||||
|
// so track length is chosen over playable length.
|
||||||
|
double trackLength = Math.Round(gameBeatmap.Value.Track.Length / rate);
|
||||||
|
|
||||||
|
// Additional 30 second delay added to account for load and/or submit time.
|
||||||
|
return room.EndDate != null && DateTimeOffset.UtcNow.AddSeconds(30).AddMilliseconds(trackLength) < room.EndDate;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
public string Description => Title;
|
public string Description => Title;
|
||||||
|
|
||||||
public virtual bool AllowBackButton => true;
|
public virtual bool AllowUserExit => true;
|
||||||
|
|
||||||
public virtual bool ShowFooter => false;
|
public virtual bool ShowFooter => false;
|
||||||
|
|
||||||
@ -56,6 +56,15 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
IBindable<OverlayActivation> IOsuScreen.OverlayActivationMode => OverlayActivationMode;
|
IBindable<OverlayActivation> IOsuScreen.OverlayActivationMode => OverlayActivationMode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The initial visibility state of the back button when this screen is entered for the first time.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual bool InitialBackButtonVisibility => AllowUserExit;
|
||||||
|
|
||||||
|
public readonly Bindable<bool> BackButtonVisibility;
|
||||||
|
|
||||||
|
IBindable<bool> IOsuScreen.BackButtonVisibility => BackButtonVisibility;
|
||||||
|
|
||||||
public virtual bool CursorVisible => true;
|
public virtual bool CursorVisible => true;
|
||||||
|
|
||||||
protected new OsuGameBase Game => base.Game as OsuGameBase;
|
protected new OsuGameBase Game => base.Game as OsuGameBase;
|
||||||
@ -154,6 +163,7 @@ namespace osu.Game.Screens
|
|||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
OverlayActivationMode = new Bindable<OverlayActivation>(InitialOverlayActivationMode);
|
OverlayActivationMode = new Bindable<OverlayActivation>(InitialOverlayActivationMode);
|
||||||
|
BackButtonVisibility = new Bindable<bool>(InitialBackButtonVisibility);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
|
@ -1,46 +1,102 @@
|
|||||||
// 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.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osuTK;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Play.PlayerSettings;
|
using osu.Game.Screens.Play.PlayerSettings;
|
||||||
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.HUD
|
namespace osu.Game.Screens.Play.HUD
|
||||||
{
|
{
|
||||||
public partial class PlayerSettingsOverlay : VisibilityContainer
|
public partial class PlayerSettingsOverlay : ExpandingContainer
|
||||||
{
|
{
|
||||||
|
public VisualSettings VisualSettings { get; private set; }
|
||||||
|
|
||||||
|
private const float padding = 10;
|
||||||
|
|
||||||
|
public const float EXPANDED_WIDTH = player_settings_width + padding * 2;
|
||||||
|
|
||||||
|
private const float player_settings_width = 270;
|
||||||
|
|
||||||
private const int fade_duration = 200;
|
private const int fade_duration = 200;
|
||||||
|
|
||||||
public readonly VisualSettings VisualSettings;
|
public override void Show() => this.FadeIn(fade_duration);
|
||||||
|
public override void Hide() => this.FadeOut(fade_duration);
|
||||||
|
|
||||||
|
// we'll handle this ourselves because we have slightly custom logic.
|
||||||
|
protected override bool ExpandOnHover => false;
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
private readonly FillFlowContainer content;
|
private readonly FillFlowContainer content;
|
||||||
|
|
||||||
public PlayerSettingsOverlay()
|
private readonly IconButton button;
|
||||||
{
|
|
||||||
Anchor = Anchor.TopRight;
|
|
||||||
Origin = Anchor.TopRight;
|
|
||||||
AutoSizeAxes = Axes.Both;
|
|
||||||
|
|
||||||
InternalChild = content = new FillFlowContainer
|
private InputManager inputManager = null!;
|
||||||
|
|
||||||
|
public PlayerSettingsOverlay()
|
||||||
|
: base(0, EXPANDED_WIDTH)
|
||||||
|
{
|
||||||
|
Origin = Anchor.TopRight;
|
||||||
|
Anchor = Anchor.TopRight;
|
||||||
|
|
||||||
|
base.Content.Add(content = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopRight,
|
|
||||||
Origin = Anchor.TopRight,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(0, 20),
|
Spacing = new Vector2(0, 20),
|
||||||
|
Margin = new MarginPadding(padding),
|
||||||
Children = new PlayerSettingsGroup[]
|
Children = new PlayerSettingsGroup[]
|
||||||
{
|
{
|
||||||
VisualSettings = new VisualSettings { Expanded = { Value = false } },
|
VisualSettings = new VisualSettings { Expanded = { Value = false } },
|
||||||
new AudioSettings { Expanded = { Value = false } }
|
new AudioSettings { Expanded = { Value = false } }
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
|
AddInternal(button = new IconButton
|
||||||
|
{
|
||||||
|
Icon = FontAwesome.Solid.Cog,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
Anchor = Anchor.TopLeft,
|
||||||
|
Margin = new MarginPadding(5),
|
||||||
|
Action = () => Expanded.Toggle()
|
||||||
|
});
|
||||||
|
|
||||||
|
AddInternal(new Box
|
||||||
|
{
|
||||||
|
Colour = ColourInfo.GradientHorizontal(Color4.Black.Opacity(0), Color4.Black.Opacity(0.8f)),
|
||||||
|
Depth = float.MaxValue,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn() => this.FadeIn(fade_duration);
|
protected override void LoadComplete()
|
||||||
protected override void PopOut() => this.FadeOut(fade_duration);
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
inputManager = GetContainingInputManager()!;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
|
||||||
|
Expanded.Value = inputManager.CurrentState.Mouse.Position.X >= button.ScreenSpaceDrawQuad.TopLeft.X;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
|
{
|
||||||
|
// handle un-expanding manually because our children do weird hover blocking stuff.
|
||||||
|
}
|
||||||
|
|
||||||
public void AddAtStart(PlayerSettingsGroup drawable) => content.Insert(-1, drawable);
|
public void AddAtStart(PlayerSettingsGroup drawable) => content.Insert(-1, drawable);
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList<Mod> mods, bool alwaysShowLeaderboard = true)
|
public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList<Mod> mods, bool alwaysShowLeaderboard = true)
|
||||||
{
|
{
|
||||||
|
Container rightSettings;
|
||||||
|
|
||||||
this.drawableRuleset = drawableRuleset;
|
this.drawableRuleset = drawableRuleset;
|
||||||
this.mods = mods;
|
this.mods = mods;
|
||||||
|
|
||||||
@ -146,7 +148,6 @@ namespace osu.Game.Screens.Play
|
|||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
ModDisplay = CreateModsContainer(),
|
ModDisplay = CreateModsContainer(),
|
||||||
PlayerSettingsOverlay = CreatePlayerSettingsOverlay(),
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
bottomRightElements = new FillFlowContainer
|
bottomRightElements = new FillFlowContainer
|
||||||
@ -164,6 +165,14 @@ namespace osu.Game.Screens.Play
|
|||||||
HoldToQuit = CreateHoldForMenuButton(),
|
HoldToQuit = CreateHoldForMenuButton(),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
rightSettings = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
PlayerSettingsOverlay = new PlayerSettingsOverlay(),
|
||||||
|
}
|
||||||
|
},
|
||||||
LeaderboardFlow = new FillFlowContainer
|
LeaderboardFlow = new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
@ -173,7 +182,7 @@ namespace osu.Game.Screens.Play
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
hideTargets = new List<Drawable> { mainComponents, topRightElements };
|
hideTargets = new List<Drawable> { mainComponents, topRightElements, rightSettings };
|
||||||
|
|
||||||
if (rulesetComponents != null)
|
if (rulesetComponents != null)
|
||||||
hideTargets.Add(rulesetComponents);
|
hideTargets.Add(rulesetComponents);
|
||||||
@ -389,8 +398,6 @@ namespace osu.Game.Screens.Play
|
|||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
};
|
};
|
||||||
|
|
||||||
protected PlayerSettingsOverlay CreatePlayerSettingsOverlay() => new PlayerSettingsOverlay();
|
|
||||||
|
|
||||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||||
{
|
{
|
||||||
if (e.Repeat)
|
if (e.Repeat)
|
||||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action OnGameplayStarted;
|
public event Action OnGameplayStarted;
|
||||||
|
|
||||||
public override bool AllowBackButton => false; // handled by HoldForMenuButton
|
public override bool AllowUserExit => false; // handled by HoldForMenuButton
|
||||||
|
|
||||||
protected override bool PlayExitSound => !isRestarting;
|
protected override bool PlayExitSound => !isRestarting;
|
||||||
|
|
||||||
@ -83,6 +83,11 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual bool PauseOnFocusLost => true;
|
protected virtual bool PauseOnFocusLost => true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether to show the fail overlay (with buttons to retry / exit) on failing.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual bool ShowFailOverlay => true;
|
||||||
|
|
||||||
public Action<bool> RestartRequested;
|
public Action<bool> RestartRequested;
|
||||||
|
|
||||||
private bool isRestarting;
|
private bool isRestarting;
|
||||||
@ -1009,6 +1014,9 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void onFailComplete()
|
private void onFailComplete()
|
||||||
{
|
{
|
||||||
|
if (!ShowFailOverlay)
|
||||||
|
return;
|
||||||
|
|
||||||
GameplayClockContainer.Stop();
|
GameplayClockContainer.Stop();
|
||||||
|
|
||||||
FailOverlay.Retries = RestartCount;
|
FailOverlay.Retries = RestartCount;
|
||||||
|
@ -485,6 +485,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
if (quickRestart)
|
if (quickRestart)
|
||||||
{
|
{
|
||||||
|
BackButtonVisibility.Value = false;
|
||||||
|
|
||||||
// A quick restart starts by triggering a fade to black
|
// A quick restart starts by triggering a fade to black
|
||||||
AddInternal(quickRestartBlackLayer = new Box
|
AddInternal(quickRestartBlackLayer = new Box
|
||||||
{
|
{
|
||||||
@ -503,6 +505,8 @@ namespace osu.Game.Screens.Play
|
|||||||
.Delay(quick_restart_initial_delay)
|
.Delay(quick_restart_initial_delay)
|
||||||
.ScaleTo(1)
|
.ScaleTo(1)
|
||||||
.FadeInFromZero(500, Easing.OutQuint);
|
.FadeInFromZero(500, Easing.OutQuint);
|
||||||
|
|
||||||
|
this.Delay(quick_restart_initial_delay).Schedule(() => BackButtonVisibility.Value = true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
@ -34,6 +35,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
protected override UserActivity InitialActivity => new UserActivity.WatchingReplay(Score.ScoreInfo);
|
protected override UserActivity InitialActivity => new UserActivity.WatchingReplay(Score.ScoreInfo);
|
||||||
|
|
||||||
|
protected override bool ShowFailOverlay => false;
|
||||||
|
|
||||||
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
|
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
|
||||||
protected override bool CheckModsAllowFailure()
|
protected override bool CheckModsAllowFailure()
|
||||||
{
|
{
|
||||||
@ -157,6 +160,20 @@ namespace osu.Game.Screens.Play
|
|||||||
Seek(target);
|
Seek(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnFail()
|
||||||
|
{
|
||||||
|
// Replays will always show the results screen on failing.
|
||||||
|
Scheduler.AddDelayed(() =>
|
||||||
|
{
|
||||||
|
if (!this.IsCurrentScreen())
|
||||||
|
// This player instance may already be in the process of exiting.
|
||||||
|
return;
|
||||||
|
|
||||||
|
ValidForResume = false;
|
||||||
|
this.Push(CreateResults(Score.ScoreInfo));
|
||||||
|
}, RESULTS_DISPLAY_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,6 @@ namespace osu.Game.Screens.Select
|
|||||||
if (beatmap == null || bpmLabelContainer == null)
|
if (beatmap == null || bpmLabelContainer == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// this doesn't consider mods which apply variable rates, yet.
|
|
||||||
double rate = ModUtils.CalculateRateWithMods(mods.Value);
|
double rate = ModUtils.CalculateRateWithMods(mods.Value);
|
||||||
|
|
||||||
int bpmMax = FormatUtils.RoundBPM(beatmap.ControlPointInfo.BPMMaximum, rate);
|
int bpmMax = FormatUtils.RoundBPM(beatmap.ControlPointInfo.BPMMaximum, rate);
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Screens
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract partial class StartupScreen : OsuScreen
|
public abstract partial class StartupScreen : OsuScreen
|
||||||
{
|
{
|
||||||
public override bool AllowBackButton => false;
|
public override bool AllowUserExit => false;
|
||||||
|
|
||||||
public override bool HideOverlaysOnEnter => true;
|
public override bool HideOverlaysOnEnter => true;
|
||||||
|
|
||||||
|
@ -286,6 +286,7 @@ namespace osu.Game.Utils
|
|||||||
{
|
{
|
||||||
double rate = 1;
|
double rate = 1;
|
||||||
|
|
||||||
|
// TODO: This doesn't consider mods which apply variable rates, yet.
|
||||||
foreach (var mod in mods.OfType<IApplicableToRate>())
|
foreach (var mod in mods.OfType<IApplicableToRate>())
|
||||||
rate = mod.ApplyToRate(0, rate);
|
rate = mod.ApplyToRate(0, rate);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user