Remove unnecessary hover / shadow logic

This commit is contained in:
Dean Herbert 2021-04-13 19:25:03 +09:00
parent b2c17979de
commit e7b0042a60

View File

@ -28,7 +28,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{ {
public class TimelineHitObjectBlueprint : SelectionBlueprint public class TimelineHitObjectBlueprint : SelectionBlueprint
{ {
private const float shadow_radius = 5;
private const float circle_size = 38; private const float circle_size = 38;
private Container repeatsContainer; private Container repeatsContainer;
@ -96,8 +95,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
OnDragHandled = e => OnDragHandled?.Invoke(e) OnDragHandled = e => OnDragHandled?.Invoke(e)
}); });
} }
updateShadows();
} }
protected override void LoadComplete() protected override void LoadComplete()
@ -116,6 +113,16 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
} }
} }
protected override void OnSelected()
{
// base logic hides selected blueprints when not selected, but timeline doesn't do that.
}
protected override void OnDeselected()
{
// base logic hides selected blueprints when not selected, but timeline doesn't do that.
}
private void updateComboIndex() => comboIndexText.Text = (indexInCurrentComboBindable.Value + 1).ToString(); private void updateComboIndex() => comboIndexText.Text = (indexInCurrentComboBindable.Value + 1).ToString();
private void updateComboColour() private void updateComboColour()
@ -180,20 +187,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
protected override bool ShouldBeConsideredForInput(Drawable child) => true; protected override bool ShouldBeConsideredForInput(Drawable child) => true;
protected override void OnSelected()
{
updateShadows();
}
private void updateShadows()
{
}
protected override void OnDeselected()
{
updateShadows();
}
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
circle.ReceivePositionalInputAt(screenSpacePos); circle.ReceivePositionalInputAt(screenSpacePos);
@ -384,7 +377,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
var effect = new EdgeEffectParameters var effect = new EdgeEffectParameters
{ {
Type = EdgeEffectType.Shadow, Type = EdgeEffectType.Shadow,
Radius = shadow_radius, Radius = 5,
Colour = Color4.Black.Opacity(0.4f) Colour = Color4.Black.Opacity(0.4f)
}; };