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