1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 22:19:30 +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() protected override void Update()
{ {
base.Update();
leftBox.Scale = new Vector2(MathHelper.Clamp( leftBox.Scale = new Vector2(MathHelper.Clamp(
nub.DrawPosition.X - nub.DrawSize.X / 2 + 2, 0, DrawWidth), 1); nub.DrawPosition.X - nub.DrawSize.X / 2 + 2, 0, DrawWidth), 1);
rightBox.Scale = new Vector2(MathHelper.Clamp( rightBox.Scale = new Vector2(MathHelper.Clamp(
DrawWidth - nub.DrawPosition.X - nub.DrawSize.X / 2 + 2, 0, DrawWidth), 1); 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.Position = new Vector2(DrawWidth * value, nub.Position.Y);
nub.MoveToX(DrawWidth * value, 300, EasingTypes.OutQuint);
else
nub.Position = new Vector2(DrawWidth * value, nub.Position.Y);
} }
} }
} }