mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Fix most warnings.
This commit is contained in:
@ -23,7 +23,7 @@ namespace osu.Desktop.VisualTests.Platform
|
||||
platform = new SQLitePlatformWin32();
|
||||
else
|
||||
platform = new SQLitePlatformGeneric();
|
||||
return new SQLiteConnection(platform, $@":memory:");
|
||||
return new SQLiteConnection(platform, @":memory:");
|
||||
}
|
||||
}
|
||||
}
|
@ -4,9 +4,9 @@
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Screens.Select.Options;
|
||||
|
||||
namespace osu.Desktop.VisualTests
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseBeatmapOptionsOverlay : TestCase
|
||||
internal class TestCaseBeatmapOptionsOverlay : TestCase
|
||||
{
|
||||
public override string Description => @"Beatmap options in song select";
|
||||
|
||||
|
@ -8,7 +8,7 @@ using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseChatDisplay : TestCase
|
||||
internal class TestCaseChatDisplay : TestCase
|
||||
{
|
||||
private ScheduledDelegate messageRequest;
|
||||
|
||||
@ -18,7 +18,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
Add(new ChatOverlay()
|
||||
Add(new ChatOverlay
|
||||
{
|
||||
State = Visibility.Visible
|
||||
});
|
||||
|
@ -8,11 +8,11 @@ using osu.Game.Overlays.Dialog;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseDialogOverlay : TestCase
|
||||
internal class TestCaseDialogOverlay : TestCase
|
||||
{
|
||||
public override string Description => @"Display dialogs";
|
||||
|
||||
DialogOverlay overlay;
|
||||
private DialogOverlay overlay;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
|
@ -2,23 +2,16 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Screens.Tournament;
|
||||
using osu.Game.Screens.Tournament.Teams;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseDrawings : TestCase
|
||||
internal class TestCaseDrawings : TestCase
|
||||
{
|
||||
public override string Description => "Tournament drawings";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(Storage storage)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
@ -29,7 +22,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
});
|
||||
}
|
||||
|
||||
class TestTeamList : ITeamList
|
||||
private class TestTeamList : ITeamList
|
||||
{
|
||||
public IEnumerable<Team> Teams { get; } = new[]
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ using OpenTK;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseGamefield : TestCase
|
||||
internal class TestCaseGamefield : TestCase
|
||||
{
|
||||
public override string Description => @"Showing hitobjects and what not.";
|
||||
|
||||
@ -31,7 +31,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
int time = 500;
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
objects.Add(new HitCircle()
|
||||
objects.Add(new HitCircle
|
||||
{
|
||||
StartTime = time,
|
||||
Position = new Vector2(RNG.Next(0, 512), RNG.Next(0, 384)),
|
||||
|
@ -17,12 +17,12 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseHitObjects : TestCase
|
||||
internal class TestCaseHitObjects : TestCase
|
||||
{
|
||||
private StopwatchClock rateAdjustClock;
|
||||
private FramedClock framedClock;
|
||||
|
||||
bool auto = false;
|
||||
private bool auto;
|
||||
|
||||
public TestCaseHitObjects()
|
||||
{
|
||||
@ -31,9 +31,9 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
playbackSpeed.ValueChanged += delegate { rateAdjustClock.Rate = playbackSpeed.Value; };
|
||||
}
|
||||
|
||||
HitObjectType mode = HitObjectType.Slider;
|
||||
private HitObjectType mode = HitObjectType.Slider;
|
||||
|
||||
BindableNumber<double> playbackSpeed = new BindableDouble(0.5) { MinValue = 0, MaxValue = 1 };
|
||||
private BindableNumber<double> playbackSpeed = new BindableDouble(0.5) { MinValue = 0, MaxValue = 1 };
|
||||
private Container playfieldContainer;
|
||||
private Container approachContainer;
|
||||
|
||||
@ -61,7 +61,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
add(new DrawableSlider(new Slider
|
||||
{
|
||||
StartTime = framedClock.CurrentTime + 600,
|
||||
ControlPoints = new List<Vector2>()
|
||||
ControlPoints = new List<Vector2>
|
||||
{
|
||||
new Vector2(-200, 0),
|
||||
new Vector2(400, 0),
|
||||
@ -93,7 +93,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
AddButton(@"slider", () => load(HitObjectType.Slider));
|
||||
AddButton(@"spinner", () => load(HitObjectType.Spinner));
|
||||
|
||||
AddToggle(@"auto", (state) => { auto = state; load(mode); });
|
||||
AddToggle(@"auto", state => { auto = state; load(mode); });
|
||||
|
||||
ButtonsContainer.Add(new SpriteText { Text = "Playback Speed" });
|
||||
ButtonsContainer.Add(new BasicSliderBar<double>
|
||||
@ -122,8 +122,9 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
load(mode);
|
||||
}
|
||||
|
||||
int depth;
|
||||
void add(DrawableHitObject h)
|
||||
private int depth;
|
||||
|
||||
private void add(DrawableHitObject h)
|
||||
{
|
||||
h.Anchor = Anchor.Centre;
|
||||
h.Depth = depth++;
|
||||
|
@ -15,7 +15,7 @@ using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseKeyCounter : TestCase
|
||||
internal class TestCaseKeyCounter : TestCase
|
||||
{
|
||||
public override string Description => @"Tests key counter";
|
||||
|
||||
|
@ -9,7 +9,7 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseMenuButtonSystem : TestCase
|
||||
internal class TestCaseMenuButtonSystem : TestCase
|
||||
{
|
||||
public override string Description => @"Main menu button system";
|
||||
|
||||
|
@ -8,7 +8,7 @@ using osu.Game.Modes;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseModSelectOverlay : TestCase
|
||||
internal class TestCaseModSelectOverlay : TestCase
|
||||
{
|
||||
public override string Description => @"Tests the mod select overlay";
|
||||
|
||||
|
@ -9,7 +9,7 @@ using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseMusicController : TestCase
|
||||
internal class TestCaseMusicController : TestCase
|
||||
{
|
||||
public override string Description => @"Tests music controller ui.";
|
||||
|
||||
@ -30,7 +30,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Anchor = Anchor.Centre
|
||||
};
|
||||
Add(mc);
|
||||
AddToggle(@"Show", (state) => mc.State = state ? Visibility.Visible : Visibility.Hidden);
|
||||
AddToggle(@"Show", state => mc.State = state ? Visibility.Visible : Visibility.Hidden);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,11 @@ using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseNotificationManager : TestCase
|
||||
internal class TestCaseNotificationManager : TestCase
|
||||
{
|
||||
public override string Description => @"I handle notifications";
|
||||
|
||||
NotificationManager manager;
|
||||
private NotificationManager manager;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
@ -30,7 +30,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Origin = Anchor.TopRight,
|
||||
});
|
||||
|
||||
AddToggle(@"show", (state) => manager.State = state ? Visibility.Visible : Visibility.Hidden);
|
||||
AddToggle(@"show", state => manager.State = state ? Visibility.Visible : Visibility.Hidden);
|
||||
|
||||
AddButton(@"simple #1", sendNotification1);
|
||||
AddButton(@"simple #2", sendNotification2);
|
||||
@ -95,7 +95,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
progressingNotifications.Add(n);
|
||||
}
|
||||
|
||||
List<ProgressNotification> progressingNotifications = new List<ProgressNotification>();
|
||||
private List<ProgressNotification> progressingNotifications = new List<ProgressNotification>();
|
||||
|
||||
private void sendProgress1()
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseOptions : TestCase
|
||||
internal class TestCaseOptions : TestCase
|
||||
{
|
||||
public override string Description => @"Tests the options overlay";
|
||||
|
||||
|
@ -7,7 +7,7 @@ using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCasePauseOverlay : TestCase
|
||||
internal class TestCasePauseOverlay : TestCase
|
||||
{
|
||||
public override string Description => @"Tests the pause overlay";
|
||||
|
||||
|
@ -11,7 +11,7 @@ using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCasePlaySongSelect : TestCase
|
||||
internal class TestCasePlaySongSelect : TestCase
|
||||
{
|
||||
private BeatmapDatabase db, oldDb;
|
||||
private TestStorage storage;
|
||||
|
@ -18,7 +18,7 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCasePlayer : TestCase
|
||||
internal class TestCasePlayer : TestCase
|
||||
{
|
||||
private WorkingBeatmap beatmap;
|
||||
|
||||
@ -27,6 +27,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(BeatmapDatabase db)
|
||||
{
|
||||
// ReSharper disable once ReplaceWithSingleCallToFirstOrDefault (TableQuery doesn't have correct LINQ implementation for First/FirstOrDefault).
|
||||
var beatmapInfo = db.Query<BeatmapInfo>().Where(b => b.Mode == PlayMode.Osu).FirstOrDefault();
|
||||
if (beatmapInfo != null)
|
||||
beatmap = db.GetWorkingBeatmap(beatmapInfo);
|
||||
@ -43,7 +44,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
int time = 1500;
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
objects.Add(new HitCircle()
|
||||
objects.Add(new HitCircle
|
||||
{
|
||||
StartTime = time,
|
||||
Position = new Vector2(i % 4 == 0 || i % 4 == 2 ? 0 : 512,
|
||||
@ -91,7 +92,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
});
|
||||
}
|
||||
|
||||
class TestWorkingBeatmap : WorkingBeatmap
|
||||
private class TestWorkingBeatmap : WorkingBeatmap
|
||||
{
|
||||
public TestWorkingBeatmap(Beatmap beatmap)
|
||||
: base(beatmap.BeatmapInfo, beatmap.BeatmapInfo.BeatmapSet)
|
||||
|
@ -18,7 +18,7 @@ using osu.Framework.Graphics.Primitives;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseScoreCounter : TestCase
|
||||
internal class TestCaseScoreCounter : TestCase
|
||||
{
|
||||
public override string Description => @"Tests multiple counters";
|
||||
|
||||
|
@ -12,7 +12,7 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseTextAwesome : TestCase
|
||||
internal class TestCaseTextAwesome : TestCase
|
||||
{
|
||||
public override string Description => @"Tests display of icons";
|
||||
|
||||
@ -22,7 +22,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
|
||||
FillFlowContainer flow;
|
||||
|
||||
Add(flow = new FillFlowContainer()
|
||||
Add(flow = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(0.5f),
|
||||
|
@ -7,7 +7,7 @@ using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCaseTwoLayerButton : TestCase
|
||||
internal class TestCaseTwoLayerButton : TestCase
|
||||
{
|
||||
public override string Description => @"Back and skip and what not";
|
||||
|
||||
|
@ -7,13 +7,13 @@ using osu.Game.Screens.Backgrounds;
|
||||
|
||||
namespace osu.Desktop.VisualTests
|
||||
{
|
||||
class VisualTestGame : OsuGameBase
|
||||
internal class VisualTestGame : OsuGameBase
|
||||
{
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
(new BackgroundScreenDefault() { Depth = 10 }).LoadAsync(this, AddInternal);
|
||||
new BackgroundScreenDefault { Depth = 10 }.LoadAsync(this, AddInternal);
|
||||
|
||||
// Have to construct this here, rather than in the constructor, because
|
||||
// we depend on some dependencies to be loaded within OsuGameBase.load().
|
||||
|
Reference in New Issue
Block a user