Update with framework bindable changes

This commit is contained in:
smoogipoo
2019-02-21 18:56:34 +09:00
parent d637b184e4
commit bca347427f
195 changed files with 567 additions and 555 deletions

View File

@ -158,7 +158,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
{
base.LoadComplete();
beatDivisor.ValueChanged += v => updateText();
beatDivisor.ValueChanged += e => updateText();
updateText();
}
@ -219,9 +219,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
AddInternal(marker = new Marker());
CurrentNumber.ValueChanged += v =>
CurrentNumber.ValueChanged += e =>
{
marker.MoveToX(getMappedPosition(v), 100, Easing.OutQuint);
marker.MoveToX(getMappedPosition(e.NewValue), 100, Easing.OutQuint);
marker.Flash();
};
}
@ -238,11 +238,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
{
case Key.Right:
beatDivisor.Next();
OnUserChange(Current);
OnUserChange(Current.Value);
return true;
case Key.Left:
beatDivisor.Previous();
OnUserChange(Current);
OnUserChange(Current.Value);
return true;
default:
return false;
@ -279,7 +279,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
var xPosition = (ToLocalSpace(screenSpaceMousePosition).X - RangePadding) / UsableWidth;
CurrentNumber.Value = availableDivisors.OrderBy(d => Math.Abs(getMappedPosition(d) - xPosition)).First();
OnUserChange(Current);
OnUserChange(Current.Value);
}
private float getMappedPosition(float divisor) => (float)Math.Pow((divisor - 1) / (availableDivisors.Last() - 1), 0.90f);