2019-01-24 16:43:03 +08: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 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Framework.Graphics;
|
2019-10-28 17:37:58 +08:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
using osu.Game.Screens.Play.HUD;
|
|
|
|
|
using osu.Game.Screens.Play.PlayerSettings;
|
|
|
|
|
|
2019-03-25 00:02:36 +08:00
|
|
|
|
namespace osu.Game.Tests.Visual.Gameplay
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2019-05-15 03:37:25 +08:00
|
|
|
|
public class TestSceneReplaySettingsOverlay : OsuTestScene
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-05-15 03:37:25 +08:00
|
|
|
|
public TestSceneReplaySettingsOverlay()
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
ExampleContainer container;
|
|
|
|
|
|
|
|
|
|
Add(new PlayerSettingsOverlay
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopRight,
|
|
|
|
|
Origin = Anchor.TopRight,
|
2019-10-28 17:37:58 +08:00
|
|
|
|
State = { Value = Visibility.Visible }
|
2018-04-13 17:19:50 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Add(container = new ExampleContainer());
|
|
|
|
|
|
|
|
|
|
AddStep(@"Add button", () => container.Add(new TriangleButton
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Text = @"Button",
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
AddStep(@"Add checkbox", () => container.Add(new PlayerCheckbox
|
|
|
|
|
{
|
|
|
|
|
LabelText = "Checkbox",
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
AddStep(@"Add textbox", () => container.Add(new FocusedTextBox
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Height = 30,
|
|
|
|
|
PlaceholderText = "Textbox",
|
|
|
|
|
HoldFocus = false,
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private class ExampleContainer : PlayerSettingsGroup
|
|
|
|
|
{
|
2020-09-09 17:48:02 +08:00
|
|
|
|
public ExampleContainer()
|
|
|
|
|
: base("example")
|
|
|
|
|
{
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|