mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:43:21 +08:00
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osuTK;
|
|
using osu.Game.Screens.Play.PlayerSettings;
|
|
|
|
namespace osu.Game.Screens.Play.HUD
|
|
{
|
|
public partial class PlayerSettingsOverlay : VisibilityContainer
|
|
{
|
|
private const int fade_duration = 200;
|
|
|
|
public readonly PlaybackSettings PlaybackSettings;
|
|
|
|
public readonly VisualSettings VisualSettings;
|
|
|
|
public PlayerSettingsOverlay()
|
|
{
|
|
Anchor = Anchor.TopRight;
|
|
Origin = Anchor.TopRight;
|
|
AutoSizeAxes = Axes.Both;
|
|
|
|
Child = new FillFlowContainer<PlayerSettingsGroup>
|
|
{
|
|
Anchor = Anchor.TopRight,
|
|
Origin = Anchor.TopRight,
|
|
AutoSizeAxes = Axes.Both,
|
|
Direction = FillDirection.Vertical,
|
|
Spacing = new Vector2(0, 20),
|
|
Children = new PlayerSettingsGroup[]
|
|
{
|
|
PlaybackSettings = new PlaybackSettings { Expanded = { Value = false } },
|
|
VisualSettings = new VisualSettings { Expanded = { Value = false } },
|
|
new AudioSettings { Expanded = { Value = false } }
|
|
}
|
|
};
|
|
}
|
|
|
|
protected override void PopIn() => this.FadeIn(fade_duration);
|
|
protected override void PopOut() => this.FadeOut(fade_duration);
|
|
}
|
|
}
|