1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 13:47:21 +08:00

Fix slider circles not being selected by default

This commit is contained in:
smoogipoo 2020-01-24 17:51:24 +09:00
parent 811ddb02a4
commit 027778acc1

View File

@ -41,14 +41,15 @@ namespace osu.Game.Rulesets.Edit
protected SelectionBlueprint(HitObject hitObject)
{
HitObject = hitObject;
RelativeSizeAxes = Axes.Both;
AlwaysPresent = true;
}
[BackgroundDependencyLoader]
private void load()
protected override void LoadComplete()
{
OnDeselected();
AlwaysPresent = true;
base.LoadComplete();
updateState();
}
private SelectionState state;
@ -65,6 +66,15 @@ namespace osu.Game.Rulesets.Edit
state = value;
if (IsLoaded)
updateState();
StateChanged?.Invoke(state);
}
}
private void updateState()
{
switch (state)
{
case SelectionState.Selected:
@ -77,9 +87,6 @@ namespace osu.Game.Rulesets.Edit
Deselected?.Invoke(this);
break;
}
StateChanged?.Invoke(state);
}
}
protected virtual void OnDeselected() => Hide();