mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update with framework bindable changes
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user