2019-01-24 17:43:03 +09:00
|
|
|
|
// 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.
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-10-02 19:33:58 +03:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2018-11-20 16:51:59 +09:00
|
|
|
|
using osuTK;
|
2018-01-13 22:25:09 +03:00
|
|
|
|
using osu.Game.Screens.Play.PlayerSettings;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-10-02 19:33:58 +03:00
|
|
|
|
namespace osu.Game.Screens.Play.HUD
|
|
|
|
|
{
|
2018-01-13 22:25:09 +03:00
|
|
|
|
public partial class PlayerSettingsOverlay : VisibilityContainer
|
2017-10-02 19:33:58 +03:00
|
|
|
|
{
|
|
|
|
|
private const int fade_duration = 200;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-10-02 19:33:58 +03:00
|
|
|
|
public readonly PlaybackSettings PlaybackSettings;
|
2019-02-28 13:31:40 +09:00
|
|
|
|
|
2018-01-10 02:24:51 +03:00
|
|
|
|
public readonly VisualSettings VisualSettings;
|
2019-03-06 20:30:14 +09:00
|
|
|
|
|
2018-01-13 22:25:09 +03:00
|
|
|
|
public PlayerSettingsOverlay()
|
2017-10-02 19:33:58 +03:00
|
|
|
|
{
|
2020-10-15 17:11:02 +09:00
|
|
|
|
Anchor = Anchor.TopRight;
|
|
|
|
|
Origin = Anchor.TopRight;
|
|
|
|
|
AutoSizeAxes = Axes.Both;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-01-15 20:52:52 +03:00
|
|
|
|
Child = new FillFlowContainer<PlayerSettingsGroup>
|
2017-10-02 19:33:58 +03:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopRight,
|
|
|
|
|
Origin = Anchor.TopRight,
|
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
|
Spacing = new Vector2(0, 20),
|
2018-01-15 20:52:52 +03:00
|
|
|
|
Children = new PlayerSettingsGroup[]
|
2017-10-02 19:33:58 +03:00
|
|
|
|
{
|
2023-01-13 23:07:59 +00:00
|
|
|
|
PlaybackSettings = new PlaybackSettings { Expanded = { Value = false } },
|
2023-06-09 17:58:44 +09:00
|
|
|
|
VisualSettings = new VisualSettings { Expanded = { Value = false } },
|
|
|
|
|
new AudioSettings { Expanded = { Value = false } }
|
2017-10-02 19:33:58 +03:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2017-10-02 19:33:58 +03:00
|
|
|
|
protected override void PopIn() => this.FadeIn(fade_duration);
|
|
|
|
|
protected override void PopOut() => this.FadeOut(fade_duration);
|
|
|
|
|
}
|
|
|
|
|
}
|