1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Drop SliderBarEventSource

This commit is contained in:
Drew DeVault 2016-12-15 00:11:37 -05:00
parent abc6db18b3
commit 80574423cb

View File

@ -145,19 +145,16 @@ namespace osu.Game.Overlays.Options
protected override void Update()
{
base.Update();
leftBox.Scale = new Vector2(MathHelper.Clamp(
nub.DrawPosition.X - nub.DrawSize.X / 2 + 2, 0, DrawWidth), 1);
rightBox.Scale = new Vector2(MathHelper.Clamp(
DrawWidth - nub.DrawPosition.X - nub.DrawSize.X / 2 + 2, 0, DrawWidth), 1);
base.Update();
}
protected override void UpdateValue(float value, SliderBarEventSource eventSource)
protected override void UpdateValue(float value)
{
if (eventSource == SliderBarEventSource.Keyboard)
nub.MoveToX(DrawWidth * value, 300, EasingTypes.OutQuint);
else
nub.Position = new Vector2(DrawWidth * value, nub.Position.Y);
nub.Position = new Vector2(DrawWidth * value, nub.Position.Y);
}
}
}