mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 08:22:56 +08:00
Fix mute button falling off the screen when UI scaling is used
This commit is contained in:
parent
fd2f2dbd42
commit
94cf99bf97
@ -46,6 +46,13 @@ namespace osu.Game.Overlays
|
|||||||
Width = 300,
|
Width = 300,
|
||||||
Colour = ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.75f), Color4.Black.Opacity(0))
|
Colour = ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.75f), Color4.Black.Opacity(0))
|
||||||
},
|
},
|
||||||
|
muteButton = new MuteButton
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
Margin = new MarginPadding(10),
|
||||||
|
Current = { BindTarget = IsMuted }
|
||||||
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
@ -56,19 +63,11 @@ namespace osu.Game.Overlays
|
|||||||
Margin = new MarginPadding { Left = offset },
|
Margin = new MarginPadding { Left = offset },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
volumeMeterEffect = new VolumeMeter("EFFECTS", 125, colours.BlueDarker)
|
volumeMeterEffect = new VolumeMeter("EFFECTS", 125, colours.BlueDarker),
|
||||||
{
|
|
||||||
Margin = new MarginPadding { Top = 100 + MuteButton.HEIGHT } // to counter the mute button and re-center the volume meters
|
|
||||||
},
|
|
||||||
volumeMeterMaster = new VolumeMeter("MASTER", 150, colours.PinkDarker),
|
volumeMeterMaster = new VolumeMeter("MASTER", 150, colours.PinkDarker),
|
||||||
volumeMeterMusic = new VolumeMeter("MUSIC", 125, colours.BlueDarker),
|
volumeMeterMusic = new VolumeMeter("MUSIC", 125, colours.BlueDarker),
|
||||||
muteButton = new MuteButton
|
|
||||||
{
|
|
||||||
Margin = new MarginPadding { Top = 100 },
|
|
||||||
Current = { BindTarget = IsMuted }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
volumeMeterMaster.Bindable.BindTo(audio.Volume);
|
volumeMeterMaster.Bindable.BindTo(audio.Volume);
|
||||||
|
Loading…
Reference in New Issue
Block a user