mirror of
https://github.com/ppy/osu
synced 2024-12-23 23:33:36 +00:00
CI cleanups.
This commit is contained in:
parent
71acf1c57d
commit
7de36b7aa2
@ -1,27 +1,12 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK.Input;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
@ -35,13 +20,13 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
int max_columns = 9;
|
||||
const int max_columns = 9;
|
||||
|
||||
for (int i = 1; i <= max_columns; i++)
|
||||
{
|
||||
int tempI = i;
|
||||
|
||||
AddStep($@"{i} column" + (i > 1 ? "s" : ""), () =>
|
||||
AddStep($"{i} column" + (i > 1 ? "s" : ""), () =>
|
||||
{
|
||||
Clear();
|
||||
Add(new ManiaPlayfield(tempI)
|
||||
@ -51,8 +36,8 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
});
|
||||
});
|
||||
|
||||
AddStep($"Trigger keys down", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyDown));
|
||||
AddStep($"Trigger keys up", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyUp));
|
||||
AddStep("Trigger keys down", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyDown));
|
||||
AddStep("Trigger keys up", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyUp));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,9 +56,9 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
|
||||
public Key Key;
|
||||
|
||||
private Box background;
|
||||
private Container hitTargetBar;
|
||||
private Container keyIcon;
|
||||
private readonly Box background;
|
||||
private readonly Container hitTargetBar;
|
||||
private readonly Container keyIcon;
|
||||
|
||||
public Column()
|
||||
{
|
||||
|
@ -25,9 +25,9 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
public ManiaPlayfield(int columns)
|
||||
{
|
||||
if (columns > 9)
|
||||
throw new ArgumentException($@"{columns} columns is not supported.");
|
||||
throw new ArgumentException($"{columns} columns is not supported.");
|
||||
if (columns <= 0)
|
||||
throw new ArgumentException($@"Can't have zero or fewer columns.");
|
||||
throw new ArgumentException("Can't have zero or fewer columns.");
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
var columnColours = new Color4[]
|
||||
Color4[] columnColours = new[]
|
||||
{
|
||||
colours.RedDark,
|
||||
colours.GreenDark,
|
||||
@ -73,7 +73,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
int columnCount = Columns.Children.Count();
|
||||
int halfColumns = columnCount / 2;
|
||||
|
||||
var keys = new Key[] { Key.A, Key.S, Key.D, Key.F, Key.Space, Key.J, Key.K, Key.L, Key.Semicolon };
|
||||
Key[] keys = new[] { Key.A, Key.S, Key.D, Key.F, Key.Space, Key.J, Key.K, Key.L, Key.Semicolon };
|
||||
|
||||
for (int i = 0; i < halfColumns; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user