mirror of
https://github.com/ppy/osu
synced 2024-12-12 09:58:22 +00:00
Rename grid creation method + parameter
This commit is contained in:
parent
5f0cd356d7
commit
9ecec806c2
@ -138,63 +138,63 @@ namespace osu.Game.Tests.Visual.Editor
|
||||
{
|
||||
}
|
||||
|
||||
protected override void CreateGrid(Vector2 startPosition)
|
||||
protected override void CreateContent(Vector2 centrePosition)
|
||||
{
|
||||
AddInternal(new Circle
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(5),
|
||||
Position = startPosition
|
||||
Position = centrePosition
|
||||
});
|
||||
|
||||
int beatIndex = 0;
|
||||
|
||||
for (float s = startPosition.X + DistanceSpacing; s <= DrawWidth; s += DistanceSpacing, beatIndex++)
|
||||
for (float s = centrePosition.X + DistanceSpacing; s <= DrawWidth; s += DistanceSpacing, beatIndex++)
|
||||
{
|
||||
AddInternal(new Circle
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(5, 10),
|
||||
Position = new Vector2(s, startPosition.Y),
|
||||
Position = new Vector2(s, centrePosition.Y),
|
||||
Colour = GetColourForBeatIndex(beatIndex)
|
||||
});
|
||||
}
|
||||
|
||||
beatIndex = 0;
|
||||
|
||||
for (float s = startPosition.X - DistanceSpacing; s >= 0; s -= DistanceSpacing, beatIndex++)
|
||||
for (float s = centrePosition.X - DistanceSpacing; s >= 0; s -= DistanceSpacing, beatIndex++)
|
||||
{
|
||||
AddInternal(new Circle
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(5, 10),
|
||||
Position = new Vector2(s, startPosition.Y),
|
||||
Position = new Vector2(s, centrePosition.Y),
|
||||
Colour = GetColourForBeatIndex(beatIndex)
|
||||
});
|
||||
}
|
||||
|
||||
beatIndex = 0;
|
||||
|
||||
for (float s = startPosition.Y + DistanceSpacing; s <= DrawHeight; s += DistanceSpacing, beatIndex++)
|
||||
for (float s = centrePosition.Y + DistanceSpacing; s <= DrawHeight; s += DistanceSpacing, beatIndex++)
|
||||
{
|
||||
AddInternal(new Circle
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(10, 5),
|
||||
Position = new Vector2(startPosition.X, s),
|
||||
Position = new Vector2(centrePosition.X, s),
|
||||
Colour = GetColourForBeatIndex(beatIndex)
|
||||
});
|
||||
}
|
||||
|
||||
beatIndex = 0;
|
||||
|
||||
for (float s = startPosition.Y - DistanceSpacing; s >= 0; s -= DistanceSpacing, beatIndex++)
|
||||
for (float s = centrePosition.Y - DistanceSpacing; s >= 0; s -= DistanceSpacing, beatIndex++)
|
||||
{
|
||||
AddInternal(new Circle
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(10, 5),
|
||||
Position = new Vector2(startPosition.X, s),
|
||||
Position = new Vector2(centrePosition.X, s),
|
||||
Colour = GetColourForBeatIndex(beatIndex)
|
||||
});
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (!gridCache.IsValid)
|
||||
{
|
||||
ClearInternal();
|
||||
CreateGrid(StartPosition);
|
||||
CreateContent(CentrePosition);
|
||||
gridCache.Validate();
|
||||
}
|
||||
}
|
||||
@ -100,7 +100,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
/// <summary>
|
||||
/// Creates the content which visualises the grid ticks.
|
||||
/// </summary>
|
||||
protected abstract void CreateGrid(Vector2 startPosition);
|
||||
protected abstract void CreateContent(Vector2 centrePosition);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the velocity of gameplay at a point in time in pixels per millisecond.
|
||||
|
Loading…
Reference in New Issue
Block a user