mirror of https://github.com/ppy/osu
Move load method up
This commit is contained in:
parent
a6f3dc53f7
commit
c28a9bdb80
|
@ -51,7 +51,6 @@ public class ManiaBeatSnapGrid : Component
|
|||
|
||||
public (double start, double end)? SelectionTimeRange
|
||||
{
|
||||
get => selectionTimeRange;
|
||||
set
|
||||
{
|
||||
if (value == selectionTimeRange)
|
||||
|
@ -62,17 +61,6 @@ public class ManiaBeatSnapGrid : Component
|
|||
}
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (!lineCache.IsValid)
|
||||
{
|
||||
lineCache.Validate();
|
||||
createLines();
|
||||
}
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
@ -90,6 +78,17 @@ private void load()
|
|||
beatDivisor.BindValueChanged(_ => createLines(), true);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (!lineCache.IsValid)
|
||||
{
|
||||
lineCache.Validate();
|
||||
createLines();
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Stack<DrawableGridLine> availableLines = new Stack<DrawableGridLine>();
|
||||
|
||||
private void createLines()
|
||||
|
|
Loading…
Reference in New Issue