2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-09-18 21:32:49 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2018-03-02 14:34:31 +08:00
|
|
|
|
using NUnit.Framework;
|
2017-09-18 21:32:49 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2017-10-03 00:33:58 +08:00
|
|
|
|
using osu.Game.Screens.Play.HUD;
|
2018-01-14 03:25:09 +08:00
|
|
|
|
using osu.Game.Screens.Play.PlayerSettings;
|
2017-09-18 21:32:49 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
|
{
|
2018-03-02 14:34:31 +08:00
|
|
|
|
[TestFixture]
|
2017-12-20 20:47:45 +08:00
|
|
|
|
public class TestCaseReplaySettingsOverlay : OsuTestCase
|
2017-09-18 21:32:49 +08:00
|
|
|
|
{
|
|
|
|
|
public TestCaseReplaySettingsOverlay()
|
|
|
|
|
{
|
|
|
|
|
ExampleContainer container;
|
|
|
|
|
|
2018-01-14 03:25:09 +08:00
|
|
|
|
Add(new PlayerSettingsOverlay
|
2017-09-18 21:32:49 +08:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopRight,
|
|
|
|
|
Origin = Anchor.TopRight,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Add(container = new ExampleContainer());
|
|
|
|
|
|
2017-11-26 00:52:52 +08:00
|
|
|
|
AddStep(@"Add button", () => container.Add(new TriangleButton
|
2017-09-18 21:32:49 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Text = @"Button",
|
|
|
|
|
}));
|
|
|
|
|
|
2018-01-14 03:25:09 +08:00
|
|
|
|
AddStep(@"Add checkbox", () => container.Add(new PlayerCheckbox
|
2017-09-18 21:32:49 +08:00
|
|
|
|
{
|
|
|
|
|
LabelText = "Checkbox",
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
AddStep(@"Add textbox", () => container.Add(new FocusedTextBox
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Height = 30,
|
|
|
|
|
PlaceholderText = "Textbox",
|
|
|
|
|
HoldFocus = false,
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-16 01:52:52 +08:00
|
|
|
|
private class ExampleContainer : PlayerSettingsGroup
|
2017-09-18 21:32:49 +08:00
|
|
|
|
{
|
|
|
|
|
protected override string Title => @"example";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|