mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:43:04 +08:00
Fix slider circles not being selected by default
This commit is contained in:
parent
811ddb02a4
commit
027778acc1
@ -41,14 +41,15 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
protected SelectionBlueprint(HitObject hitObject)
|
protected SelectionBlueprint(HitObject hitObject)
|
||||||
{
|
{
|
||||||
HitObject = hitObject;
|
HitObject = hitObject;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
AlwaysPresent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
protected override void LoadComplete()
|
||||||
private void load()
|
|
||||||
{
|
{
|
||||||
OnDeselected();
|
base.LoadComplete();
|
||||||
AlwaysPresent = true;
|
updateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private SelectionState state;
|
private SelectionState state;
|
||||||
@ -65,6 +66,15 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
|
|
||||||
state = value;
|
state = value;
|
||||||
|
|
||||||
|
if (IsLoaded)
|
||||||
|
updateState();
|
||||||
|
|
||||||
|
StateChanged?.Invoke(state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateState()
|
||||||
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case SelectionState.Selected:
|
case SelectionState.Selected:
|
||||||
@ -77,9 +87,6 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
Deselected?.Invoke(this);
|
Deselected?.Invoke(this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
StateChanged?.Invoke(state);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnDeselected() => Hide();
|
protected virtual void OnDeselected() => Hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user