2017-05-19 01:21:58 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Testing;
|
2017-05-19 22:28:01 +08:00
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2017-05-22 14:07:08 +08:00
|
|
|
|
using osu.Game.Screens.Play.ReplaySettings;
|
2017-05-19 01:21:58 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Desktop.VisualTests.Tests
|
|
|
|
|
{
|
|
|
|
|
internal class TestCaseReplaySettingsOverlay : TestCase
|
|
|
|
|
{
|
|
|
|
|
public override string Description => @"Settings visible in replay/auto";
|
|
|
|
|
|
2017-05-19 22:28:01 +08:00
|
|
|
|
private ExampleContainer container;
|
|
|
|
|
|
2017-05-19 01:21:58 +08:00
|
|
|
|
public override void Reset()
|
|
|
|
|
{
|
|
|
|
|
base.Reset();
|
|
|
|
|
|
|
|
|
|
Add(new ReplaySettingsOverlay()
|
|
|
|
|
{
|
2017-05-19 22:28:01 +08:00
|
|
|
|
Anchor = Anchor.TopRight,
|
|
|
|
|
Origin = Anchor.TopRight,
|
2017-05-19 01:21:58 +08:00
|
|
|
|
});
|
2017-05-19 22:28:01 +08:00
|
|
|
|
|
|
|
|
|
Add(container = new ExampleContainer());
|
|
|
|
|
|
|
|
|
|
AddStep(@"Add button", () => container.Add(new OsuButton
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Text = @"Button",
|
|
|
|
|
}));
|
|
|
|
|
|
2017-05-30 16:02:04 +08:00
|
|
|
|
AddStep(@"Add checkbox", () => container.Add(new ReplaySettingsCheckbox
|
2017-05-19 22:28:01 +08:00
|
|
|
|
{
|
|
|
|
|
LabelText = "Checkbox",
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
AddStep(@"Add textbox", () => container.Add(new FocusedTextBox
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
Height = 30,
|
|
|
|
|
PlaceholderText = "Textbox",
|
|
|
|
|
HoldFocus = false,
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-21 23:22:27 +08:00
|
|
|
|
private class ExampleContainer : SettingsDropdownContainer
|
2017-05-19 22:28:01 +08:00
|
|
|
|
{
|
2017-05-28 05:56:11 +08:00
|
|
|
|
protected override string Title => @"example";
|
2017-05-19 01:21:58 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|