mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 18:32:56 +08:00
Use RangePadding
to align mouse with slider
This commit is contained in:
parent
fa00f8b92a
commit
b5f8093941
@ -90,10 +90,10 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
private Vector2 getPositionForDivisor(int divisor)
|
||||
{
|
||||
float localX = 1 - 1 / (float)divisor;
|
||||
float localX = (1 - 1 / (float)divisor) * tickSliderBar.UsableWidth + tickSliderBar.RangePadding;
|
||||
return tickSliderBar.ToScreenSpace(new Vector2(
|
||||
localX,
|
||||
0.5f
|
||||
tickSliderBar.DrawHeight / 2
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
{
|
||||
CurrentNumber.BindTo(this.beatDivisor = beatDivisor);
|
||||
|
||||
Padding = new MarginPadding { Horizontal = 5 };
|
||||
RangePadding = 5;
|
||||
Padding = new MarginPadding { Horizontal = RangePadding };
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user