mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Simplfiy and share notification dimsiss method across test scenes
Might as well inline, but I feel like it will require adding the same comment across all usages, because just `State.Value = Hidden` in an until step feels off, dunno.
This commit is contained in:
@ -23,7 +23,9 @@ using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osu.Game.Screens.Play;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
using IntroSequence = osu.Game.Configuration.IntroSequence;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
@ -106,6 +108,11 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
protected void ConfirmAtMainMenu() => AddUntilStep("Wait for main menu", () => Game.ScreenStack.CurrentScreen is MainMenu menu && menu.IsLoaded);
|
||||
|
||||
/// <summary>
|
||||
/// Dismisses any notifications pushed which block from interacting with the game (or block screens from loading, e.g. <see cref="Player"/>).
|
||||
/// </summary>
|
||||
protected void DismissAnyNotifications() => Game.Notifications.State.Value = Visibility.Hidden;
|
||||
|
||||
public class TestOsuGame : OsuGame
|
||||
{
|
||||
public new const float SIDE_OVERLAY_OFFSET_RATIO = OsuGame.SIDE_OVERLAY_OFFSET_RATIO;
|
||||
|
Reference in New Issue
Block a user