1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Merge branch 'master' into skinnable-scaling-container-background

This commit is contained in:
Dean Herbert 2019-03-25 13:33:39 +09:00 committed by GitHub
commit fcc91efc1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
109 changed files with 321 additions and 236 deletions

View File

@ -9,7 +9,6 @@ using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Framework.Input.States;
@ -33,7 +32,7 @@ using osu.Game.Users;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Background
{
[TestFixture]
public class TestCaseBackgroundScreenBeatmap : ManualInputManagerTestCase
@ -54,8 +53,6 @@ namespace osu.Game.Tests.Visual
private BeatmapManager manager;
private RulesetStore rulesets;
private ScreenStackCacheContainer screenStackContainer;
[BackgroundDependencyLoader]
private void load(GameHost host)
{
@ -82,8 +79,10 @@ namespace osu.Game.Tests.Visual
[SetUp]
public virtual void SetUp() => Schedule(() =>
{
Child = screenStackContainer = new ScreenStackCacheContainer { RelativeSizeAxes = Axes.Both };
screenStackContainer.ScreenStack.Push(songSelect = new DummySongSelect());
Child = new OsuScreenStack(songSelect = new DummySongSelect())
{
RelativeSizeAxes = Axes.Both
};
});
/// <summary>
@ -373,20 +372,6 @@ namespace osu.Game.Tests.Visual
}
}
private class ScreenStackCacheContainer : Container
{
[Cached]
private BackgroundScreenStack backgroundScreenStack;
public readonly ScreenStack ScreenStack;
public ScreenStackCacheContainer()
{
Add(backgroundScreenStack = new BackgroundScreenStack { RelativeSizeAxes = Axes.Both });
Add(ScreenStack = new ScreenStack { RelativeSizeAxes = Axes.Both });
}
}
private class TestPlayerLoader : PlayerLoader
{
public VisualSettings VisualSettingsPos => VisualSettings;

View File

@ -9,7 +9,7 @@ using osu.Game.Input;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Components
{
[TestFixture]
public class TestCaseIdleTracker : ManualInputManagerTestCase

View File

@ -13,7 +13,7 @@ using osu.Game.Online;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Components
{
public class TestCasePollingComponent : OsuTestCase
{

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Audio;
using osu.Game.Beatmaps;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Components
{
public class TestCasePreviewTrackManager : OsuTestCase, IPreviewTrackOwner
{

View File

@ -9,7 +9,7 @@ using osu.Game.Screens.Edit;
using osu.Game.Screens.Edit.Compose.Components;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
public class TestCaseBeatDivisorControl : OsuTestCase
{

View File

@ -9,7 +9,7 @@ using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Edit.Compose;
using osu.Game.Tests.Beatmaps;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseEditorCompose : EditorClockTestCase

View File

@ -7,7 +7,7 @@ using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Screens.Edit.Components.RadioButtons;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseEditorComposeRadioButtons : OsuTestCase

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osuTK;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -14,9 +13,10 @@ using osu.Framework.Graphics.UserInterface;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Screens.Edit.Compose.Components.Timeline;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseEditorComposeTimeline : EditorClockTestCase

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Edit.Components.Menus;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseEditorMenuBar : OsuTestCase

View File

@ -14,7 +14,7 @@ using osu.Game.Tests.Beatmaps;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseEditorSeekSnapping : EditorClockTestCase

View File

@ -6,12 +6,12 @@ using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osuTK;
using osu.Game.Screens.Edit.Components.Timelines.Summary;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Edit.Components.Timelines.Summary;
using osu.Game.Tests.Beatmaps;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseEditorSummaryTimeline : EditorClockTestCase

View File

@ -7,7 +7,6 @@ using JetBrains.Annotations;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Timing;
using osuTK;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects;
@ -20,8 +19,9 @@ using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Screens.Edit.Compose;
using osu.Game.Screens.Edit.Compose.Components;
using osu.Game.Tests.Beatmaps;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
[Cached(Type = typeof(IPlacementHandler))]

View File

@ -10,7 +10,7 @@ using osu.Game.Screens.Edit.Components;
using osu.Game.Tests.Beatmaps;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCasePlaybackControl : OsuTestCase

View File

@ -12,7 +12,7 @@ using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseWaveContainer : OsuTestCase

View File

@ -2,16 +2,16 @@
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Audio;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
[TestFixture]
public class TestCaseWaveform : OsuTestCase

View File

@ -14,7 +14,7 @@ using osu.Game.Screens.Edit.Compose.Components.Timeline;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Editor
{
public class TestCaseZoomableScrollContainer : ManualInputManagerTestCase
{

View File

@ -7,7 +7,7 @@ using osu.Game.Rulesets;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[Description("Player instantiated with an autoplay mod.")]
public class TestCaseAutoplay : AllPlayersTestCase

View File

@ -1,12 +1,12 @@
// 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.Game.Beatmaps.Timing;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Game.Beatmaps.Timing;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseBreakOverlay : OsuTestCase

View File

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using osuTK.Input;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -13,8 +12,9 @@ using osu.Framework.Logging;
using osu.Game.Input.Bindings;
using osu.Game.Screens.Play;
using osuTK;
using osuTK.Input;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[Description("player pause/fail screens")]
public class TestCaseGameplayMenuOverlay : ManualInputManagerTestCase

View File

@ -10,7 +10,7 @@ using osu.Game.Screens.Play.HUD;
using osuTK;
using osuTK.Input;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[Description("'Hold to Quit' UI element")]
public class TestCaseHoldForMenuButton : ManualInputManagerTestCase

View File

@ -11,7 +11,7 @@ using osu.Framework.Timing;
using osu.Game.Screens.Play;
using osuTK.Input;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseKeyCounter : ManualInputManagerTestCase

View File

@ -8,7 +8,7 @@ using osu.Game.Overlays;
using osu.Game.Overlays.MedalSplash;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseMedalOverlay : OsuTestCase

View File

@ -9,7 +9,7 @@ using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
public class TestCasePause : PlayerTestCase
{

View File

@ -9,20 +9,16 @@ using osu.Game.Beatmaps;
using osu.Game.Screens;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
public class TestCasePlayerLoader : ManualInputManagerTestCase
{
private PlayerLoader loader;
private readonly ScreenStack stack;
[Cached]
private BackgroundScreenStack backgroundStack;
private readonly OsuScreenStack stack;
public TestCasePlayerLoader()
{
InputManager.Add(backgroundStack = new BackgroundScreenStack { RelativeSizeAxes = Axes.Both });
InputManager.Add(stack = new ScreenStack { RelativeSizeAxes = Axes.Both });
InputManager.Add(stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both });
}
[BackgroundDependencyLoader]

View File

@ -8,7 +8,7 @@ using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
public class TestCasePlayerReferenceLeaking : AllPlayersTestCase
{

View File

@ -8,7 +8,7 @@ using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[Description("Player instantiated with a replay.")]
public class TestCaseReplay : AllPlayersTestCase

View File

@ -7,7 +7,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Play.PlayerSettings;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseReplaySettingsOverlay : OsuTestCase

View File

@ -13,7 +13,7 @@ using osu.Game.Screens.Ranking;
using osu.Game.Screens.Ranking.Pages;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseResults : ScreenTestCase

View File

@ -9,7 +9,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play.HUD;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseScoreCounter : OsuTestCase

View File

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osuTK;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -15,8 +14,9 @@ using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Timing;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseScrollingHitObjects : OsuTestCase

View File

@ -13,7 +13,7 @@ using osu.Game.Graphics;
using osu.Game.Skinning;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
public class TestCaseSkinReloadable : OsuTestCase
{

View File

@ -4,7 +4,7 @@
using NUnit.Framework;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseSkipOverlay : OsuTestCase

View File

@ -10,7 +10,7 @@ using osu.Framework.Timing;
using osu.Game.Rulesets.Objects;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseSongProgress : OsuTestCase

View File

@ -13,7 +13,7 @@ using osu.Game.Overlays;
using osu.Game.Storyboards.Drawables;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Gameplay
{
[TestFixture]
public class TestCaseStoryboard : OsuTestCase

View File

@ -6,7 +6,7 @@ using osu.Game.Online.API;
using osu.Game.Screens.Menu;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Menus
{
public class TestCaseDisclaimer : ScreenTestCase
{

View File

@ -4,14 +4,14 @@
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osu.Game.Screens.Menu;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Menus
{
[TestFixture]
public class TestCaseIntroSequence : OsuTestCase

View File

@ -9,7 +9,7 @@ using osu.Game.Screens;
using osu.Game.Screens.Menu;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Menus
{
[TestFixture]
public class TestCaseLoaderAnimation : OsuTestCase

View File

@ -8,7 +8,7 @@ using NUnit.Framework;
using osu.Framework.Graphics.Containers;
using osu.Game.Overlays.Toolbar;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Menus
{
[TestFixture]
public class TestCaseToolbar : OsuTestCase

View File

@ -14,7 +14,7 @@ using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Users;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestCaseLoungeRoomsContainer : MultiplayerTestCase
{

View File

@ -10,7 +10,7 @@ using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Screens.Multi.Match.Components;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestCaseMatchHeader : MultiplayerTestCase
{

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics;
using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestCaseMatchHostInfo : OsuTestCase
{

View File

@ -11,7 +11,7 @@ using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.Game.Rulesets;
using osu.Game.Screens.Multi.Match.Components;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
[TestFixture]
public class TestCaseMatchInfo : MultiplayerTestCase

View File

@ -10,7 +10,7 @@ using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestCaseMatchLeaderboard : MultiplayerTestCase
{

View File

@ -6,7 +6,7 @@ using osu.Framework.Graphics;
using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
[TestFixture]
public class TestCaseMatchParticipants : MultiplayerTestCase

View File

@ -16,7 +16,7 @@ using osu.Game.Screens.Multi.Ranking.Types;
using osu.Game.Screens.Ranking;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestCaseMatchResults : MultiplayerTestCase
{

View File

@ -15,7 +15,7 @@ using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi;
using osu.Game.Screens.Multi.Match.Components;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestCaseMatchSettingsOverlay : MultiplayerTestCase
{

View File

@ -7,7 +7,7 @@ using osu.Framework.Screens;
using osu.Game.Screens;
using osu.Game.Screens.Multi;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
[TestFixture]
public class TestCaseMultiHeader : OsuTestCase
@ -16,7 +16,7 @@ namespace osu.Game.Tests.Visual
{
int index = 0;
ScreenStack screenStack = new ScreenStack(new TestMultiplayerSubScreen(index)) { RelativeSizeAxes = Axes.Both };
OsuScreenStack screenStack = new OsuScreenStack(new TestMultiplayerSubScreen(index)) { RelativeSizeAxes = Axes.Both };
Children = new Drawable[]
{

View File

@ -4,25 +4,24 @@
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Game.Screens.Multi;
using osu.Game.Screens.Multi.Lounge;
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
[TestFixture]
public class TestCaseMultiScreen : ScreenTestCase
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(Multiplayer),
typeof(Screens.Multi.Multiplayer),
typeof(LoungeSubScreen),
typeof(FilterControl)
};
public TestCaseMultiScreen()
{
Multiplayer multi = new Multiplayer();
Screens.Multi.Multiplayer multi = new Screens.Multi.Multiplayer();
AddStep(@"show", () => LoadScreen(multi));
}

View File

@ -9,7 +9,7 @@ using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestCaseRoomStatus : OsuTestCase
{

View File

@ -11,7 +11,7 @@ using osu.Game.Overlays;
using osu.Game.Overlays.AccountCreation;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
public class TestCaseAccountCreationOverlay : OsuTestCase
{

View File

@ -9,7 +9,7 @@ using osu.Framework.Graphics;
using osu.Game.Overlays.Profile.Header;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseBadgeContainer : OsuTestCase

View File

@ -14,7 +14,7 @@ using osu.Game.Overlays.BeatmapSet.Scores;
using osu.Game.Rulesets;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseBeatmapSetOverlay : OsuTestCase

View File

@ -15,7 +15,7 @@ using osu.Game.Overlays.Chat.Tabs;
using osu.Game.Users;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
public class TestCaseChannelTabControl : OsuTestCase
{

View File

@ -12,7 +12,7 @@ using osu.Game.Overlays;
using osu.Game.Overlays.Chat;
using osu.Game.Overlays.Chat.Tabs;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[Description("Testing chat api and overlay")]
public class TestCaseChatDisplay : OsuTestCase

View File

@ -1,24 +1,24 @@
// 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 osuTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Online.Chat;
using osu.Game.Overlays.Chat;
using osu.Game.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat;
using osu.Game.Overlays;
using osu.Game.Overlays.Chat;
using osu.Game.Users;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseChatLink : OsuTestCase

View File

@ -8,7 +8,7 @@ using osu.Game.Beatmaps;
using osu.Game.Overlays;
using osu.Game.Rulesets;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseDirect : OsuTestCase

View File

@ -11,7 +11,7 @@ using osu.Game.Rulesets.Osu;
using osu.Game.Tests.Beatmaps;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
public class TestCaseDirectPanel : OsuTestCase
{

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
using osu.Game.Graphics.UserInterface;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
public class TestCaseExternalLinkButton : OsuTestCase
{

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseGraph : OsuTestCase

View File

@ -12,7 +12,7 @@ using osu.Game.Overlays.Profile.Sections;
using osu.Game.Overlays.Profile.Sections.Historical;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseHistoricalSection : OsuTestCase

View File

@ -1,19 +1,19 @@
// 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 System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osuTK;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using System.Collections.Generic;
using System;
using NUnit.Framework;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Profile.Header;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseRankGraph : OsuTestCase

View File

@ -8,7 +8,7 @@ using osu.Game.Overlays;
using osu.Game.Overlays.Social;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseSocial : OsuTestCase

View File

@ -7,7 +7,7 @@ using osu.Game.Online.Chat;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
public class TestCaseStandAloneChatDisplay : OsuTestCase
{

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseUserPanel : OsuTestCase

View File

@ -13,7 +13,7 @@ using osu.Game.Overlays.Profile;
using osu.Game.Overlays.Profile.Header;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseUserProfile : OsuTestCase

View File

@ -1,20 +1,20 @@
// 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 System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.Profile.Sections;
using osu.Game.Overlays.Profile.Sections.Recent;
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseUserProfileRecentSection : OsuTestCase

View File

@ -1,6 +1,9 @@
// 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 System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -8,11 +11,8 @@ using osu.Game.Graphics;
using osu.Game.Overlays.Profile.Sections;
using osu.Game.Overlays.Profile.Sections.Ranks;
using osu.Game.Users;
using System;
using System.Collections.Generic;
using NUnit.Framework;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestCaseUserRanks : OsuTestCase

View File

@ -4,7 +4,7 @@
using NUnit.Framework;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Settings
{
[TestFixture]
public class TestCaseKeyConfiguration : OsuTestCase

View File

@ -6,7 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Settings
{
[TestFixture]
public class TestCaseSettings : OsuTestCase

View File

@ -17,7 +17,7 @@ using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Carousel;
using osu.Game.Screens.Select.Filter;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[TestFixture]
public class TestCaseBeatmapCarousel : OsuTestCase

View File

@ -10,7 +10,7 @@ using osu.Game.Beatmaps;
using osu.Game.Screens.Select;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[TestFixture]
[System.ComponentModel.Description("PlaySongSelect leaderboard/details area")]

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Screens.Select;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[Description("PlaySongSelect beatmap details")]
public class TestCaseBeatmapDetails : OsuTestCase

View File

@ -5,7 +5,6 @@ using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using NUnit.Framework;
using osuTK;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -20,8 +19,9 @@ using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Taiko;
using osu.Game.Screens.Select;
using osu.Game.Tests.Beatmaps;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[TestFixture]
public class TestCaseBeatmapInfoWedge : OsuTestCase

View File

@ -7,7 +7,7 @@ using osu.Game.Screens.Select.Options;
using osuTK.Graphics;
using osuTK.Input;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[Description("bottom beatmap details")]
public class TestCaseBeatmapOptionsOverlay : OsuTestCase

View File

@ -1,24 +1,24 @@
// 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 System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.MathUtils;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.BeatmapSet.Scores;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Users;
using System.Collections.Generic;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Rulesets.Osu;
using osu.Game.Scoring;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[System.ComponentModel.Description("in BeatmapOverlay")]
public class TestCaseBeatmapScoresContainer : OsuTestCase

View File

@ -4,18 +4,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using osu.Framework.Graphics;
using osu.Game.Screens.Select.Leaderboards;
using osu.Game.Users;
using osu.Framework.Allocation;
using osuTK;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Online.Leaderboards;
using osu.Game.Rulesets;
using osu.Game.Scoring;
using osu.Game.Screens.Select.Leaderboards;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[Description("PlaySongSelect leaderboard")]
public class TestCaseLeaderboard : OsuTestCase

View File

@ -23,7 +23,7 @@ using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Carousel;
using osu.Game.Screens.Select.Filter;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.SongSelect
{
[TestFixture]
public class TestCasePlaySongSelect : ScreenTestCase
@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(SongSelect),
typeof(Screens.Select.SongSelect),
typeof(BeatmapCarousel),
typeof(CarouselItem),

View File

@ -0,0 +1,82 @@
// 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 NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Screens;
using osu.Game.Screens.Play;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
{
[TestFixture]
public class TestCaseOsuScreenStack : OsuTestCase
{
private TestOsuScreenStack stack;
[SetUpSteps]
public void SetUpSteps()
{
AddStep("Create new screen stack", () => { Child = stack = new TestOsuScreenStack { RelativeSizeAxes = Axes.Both }; });
}
[Test]
public void ParallaxAssignmentTest()
{
NoParallaxTestScreen noParallaxScreen = null;
TestScreen parallaxScreen = null;
AddStep("Push no parallax", () => stack.Push(noParallaxScreen = new NoParallaxTestScreen("NO PARALLAX")));
AddUntilStep("Wait for current", () => noParallaxScreen.IsLoaded);
AddAssert("Parallax is off", () => stack.ParallaxAmount == 0);
AddStep("Push parallax", () => noParallaxScreen.Push(parallaxScreen = new TestScreen("PARALLAX")));
AddUntilStep("Wait for current", () => parallaxScreen.IsLoaded);
AddAssert("Parallax is on", () => stack.ParallaxAmount > 0);
AddStep("Exit from new screen", () => { noParallaxScreen.MakeCurrent(); });
AddAssert("Parallax is off", () => stack.ParallaxAmount == 0);
}
private class TestScreen : ScreenWithBeatmapBackground
{
private readonly string screenText;
public TestScreen(string screenText)
{
this.screenText = screenText;
}
[BackgroundDependencyLoader]
private void load()
{
AddInternal(new SpriteText
{
Text = screenText,
Colour = Color4.White,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
});
}
}
private class NoParallaxTestScreen : TestScreen
{
public NoParallaxTestScreen(string screenText)
: base(screenText)
{
}
public override float BackgroundParallaxAmount => 0.0f;
}
private class TestOsuScreenStack : OsuScreenStack
{
public new float ParallaxAmount => base.ParallaxAmount;
}
}
}

View File

@ -6,7 +6,7 @@ using System.ComponentModel;
using osu.Game.Screens.Tournament;
using osu.Game.Screens.Tournament.Teams;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.Tournament
{
[Description("for tournament use")]
public class TestCaseDrawings : ScreenTestCase

View File

@ -8,16 +8,16 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Lists;
using osu.Framework.Timing;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using osuTK.Graphics;
using osu.Framework.Lists;
using osu.Game.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseBeatSyncedContainer : OsuTestCase

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseBreadcrumbs : OsuTestCase

View File

@ -11,7 +11,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Game.Screens.Menu;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseButtonSystem : OsuTestCase

View File

@ -7,12 +7,12 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.Cursor;
using osu.Game.Graphics.UserInterface;
using osuTK;
using osuTK.Graphics;
using osu.Game.Graphics.Cursor;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseContextMenu : OsuTestCase

View File

@ -14,7 +14,7 @@ using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseCursors : ManualInputManagerTestCase

View File

@ -6,7 +6,7 @@ using osu.Game.Graphics;
using osu.Game.Overlays;
using osu.Game.Overlays.Dialog;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseDialogOverlay : OsuTestCase

View File

@ -9,7 +9,7 @@ using osu.Game.Graphics;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestCaseDrawableDate : OsuTestCase
{

View File

@ -8,7 +8,7 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Screens.Menu;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestCaseHoldToConfirmOverlay : OsuTestCase
{

View File

@ -2,16 +2,16 @@
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseIconButton : OsuTestCase

View File

@ -1,15 +1,15 @@
// 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 System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using System;
using System.Collections.Generic;
using osu.Game.Screens.Edit.Setup.Components.LabelledComponents;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseLabelledTextBox : OsuTestCase

View File

@ -7,7 +7,7 @@ using osu.Framework.Testing;
using osu.Game.Graphics.UserInterface;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestCaseLoadingAnimation : GridTestCase
{

View File

@ -2,26 +2,26 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Mods;
using osu.Game.Overlays.Mods.Sections;
using osu.Game.Rulesets;
using osu.Game.Screens.Play.HUD;
using osuTK;
using osu.Game.Rulesets.Mania.Mods;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Mods;
using System.Linq;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Bindables;
using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Mods.Sections;
using osu.Game.Rulesets.Mania.Mods;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play.HUD;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[Description("mod select and icon display")]
public class TestCaseMods : OsuTestCase

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Timing;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseMusicController : OsuTestCase

View File

@ -12,7 +12,7 @@ using osu.Framework.MathUtils;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseNotificationOverlay : OsuTestCase

View File

@ -8,7 +8,7 @@ using osu.Framework.Configuration.Tracking;
using osu.Framework.Graphics;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseOnScreenDisplay : OsuTestCase

View File

@ -6,7 +6,7 @@ using osu.Framework.Screens;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Backgrounds;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestCaseParallaxContainer : OsuTestCase
{

View File

@ -6,7 +6,7 @@ using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Overlays.Dialog;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCasePopupDialog : OsuTestCase

View File

@ -13,20 +13,20 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Screens;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseScreenBreadcrumbControl : OsuTestCase
{
private readonly ScreenBreadcrumbControl breadcrumbs;
private readonly ScreenStack screenStack;
private readonly OsuScreenStack screenStack;
public TestCaseScreenBreadcrumbControl()
{
OsuSpriteText titleText;
IScreen startScreen = new TestScreenOne();
screenStack = new ScreenStack(startScreen) { RelativeSizeAxes = Axes.Both };
screenStack = new OsuScreenStack(startScreen) { RelativeSizeAxes = Axes.Both };
Children = new Drawable[]
{

View File

@ -8,7 +8,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Select.Filter;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[Description("SongSelect filter control")]
public class TestCaseTabControl : OsuTestCase

View File

@ -9,7 +9,7 @@ using osu.Framework.Graphics.Cursor;
using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public class TestCaseTextAwesome : OsuTestCase

View File

@ -4,7 +4,7 @@
using System.ComponentModel;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Tests.Visual
namespace osu.Game.Tests.Visual.UserInterface
{
[Description("mostly back button")]
public class TestCaseTwoLayerButton : OsuTestCase

Some files were not shown because too many files have changed in this diff Show More