mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +08:00
Privatise tick to TickContainer
This commit is contained in:
parent
7182442b21
commit
070db63157
@ -14,7 +14,6 @@ namespace osu.Game.Tests.Visual
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(BeatSnapVisualiser),
|
||||
typeof(Tick),
|
||||
typeof(TickContainer)
|
||||
};
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Screens.Compose.BeatSnap
|
||||
{
|
||||
public class Tick : Box
|
||||
{
|
||||
private readonly int divisor;
|
||||
|
||||
public Tick(int divisor)
|
||||
{
|
||||
this.divisor = divisor;
|
||||
|
||||
Size = new Vector2(2, 10);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
if (divisor >= 16)
|
||||
Colour = colours.Red;
|
||||
else if (divisor >= 8)
|
||||
Colour = colours.Yellow;
|
||||
else
|
||||
Colour = colours.Gray4;
|
||||
}
|
||||
}
|
||||
}
|
@ -65,5 +65,28 @@ namespace osu.Game.Screens.Edit.Screens.Compose.BeatSnap
|
||||
private void updatePosition() => marker.X = getTickPosition(Array.IndexOf(availableDivisors, Divisor.Value));
|
||||
|
||||
private float getTickPosition(int index) => (index + 1) * tickSpacing;
|
||||
|
||||
private class Tick : Box
|
||||
{
|
||||
private readonly int divisor;
|
||||
|
||||
public Tick(int divisor)
|
||||
{
|
||||
this.divisor = divisor;
|
||||
|
||||
Size = new Vector2(2, 10);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
if (divisor >= 16)
|
||||
Colour = colours.Red;
|
||||
else if (divisor >= 8)
|
||||
Colour = colours.Yellow;
|
||||
else
|
||||
Colour = colours.Gray4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -381,7 +381,6 @@
|
||||
<Compile Include="Rulesets\Scoring\Legacy\LegacyScoreParser.cs" />
|
||||
<Compile Include="Rulesets\UI\JudgementContainer.cs" />
|
||||
<Compile Include="Screens\Edit\Screens\Compose\BeatSnap\BeatSnapVisualiser.cs" />
|
||||
<Compile Include="Screens\Edit\Screens\Compose\BeatSnap\Tick.cs" />
|
||||
<Compile Include="Screens\Edit\Screens\Compose\BeatSnap\TickContainer.cs" />
|
||||
<Compile Include="Screens\Edit\Screens\Compose\Layers\BorderLayer.cs" />
|
||||
<Compile Include="Screens\Edit\Screens\Compose\Layers\HitObjectMaskLayer.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user