mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 09:27:34 +08:00
Add padding to the text container
This commit is contained in:
parent
ec75837965
commit
89e9f84753
@ -11,6 +11,8 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
|||||||
{
|
{
|
||||||
public class PlaybackSettings : ReplayGroup
|
public class PlaybackSettings : ReplayGroup
|
||||||
{
|
{
|
||||||
|
private const int padding = 10;
|
||||||
|
|
||||||
protected override string Title => @"playback";
|
protected override string Title => @"playback";
|
||||||
|
|
||||||
public IAdjustableClock AdjustableClock { set; get; }
|
public IAdjustableClock AdjustableClock { set; get; }
|
||||||
@ -26,6 +28,7 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Padding = new MarginPadding { Horizontal = padding },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
@ -54,6 +57,8 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sliderbar.Bindable.ValueChanged += rateMultiplier => multiplierText.Text = $"{rateMultiplier}x";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -64,11 +69,7 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var clockRate = AdjustableClock.Rate;
|
var clockRate = AdjustableClock.Rate;
|
||||||
sliderbar.Bindable.ValueChanged += rateMultiplier =>
|
sliderbar.Bindable.ValueChanged += rateMultiplier => AdjustableClock.Rate = clockRate * rateMultiplier;
|
||||||
{
|
|
||||||
AdjustableClock.Rate = clockRate * rateMultiplier;
|
|
||||||
multiplierText.Text = $"{rateMultiplier}x";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user