mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Header1
This commit is contained in:
34
osu.Game.Tests/Visual/TestCaseChangelog.cs
Normal file
34
osu.Game.Tests/Visual/TestCaseChangelog.cs
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright(c) 2007-2018 ppy Pty Ltd<contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseChangelog : OsuTestCase
|
||||
{
|
||||
private ChangelogOverlay changelog;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Add(changelog = new ChangelogOverlay());
|
||||
changelog.ToggleVisibility();
|
||||
|
||||
//AddStep(@"toggle", changelog.ToggleVisibility);
|
||||
AddStep(@"toggle text 1", () => changelog.header.ActivateRelease("Release 20180626.1"));
|
||||
AddStep(@"toggle text 2", () => changelog.header.ActivateRelease("Lazer 2018.713.1"));
|
||||
AddStep(@"toggle text 3", () => changelog.header.ActivateRelease("Beta 20180626"));
|
||||
AddStep(@"go to listing", changelog.header.ActivateListing);
|
||||
}
|
||||
|
||||
public TestCaseChangelog()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
76
osu.Game.Tests/Visual/TestCaseTextBadgePair.cs
Normal file
76
osu.Game.Tests/Visual/TestCaseTextBadgePair.cs
Normal file
@ -0,0 +1,76 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using NUnit.Framework;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays.Changelog.Header;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseTextBadgePair : OsuTestCase
|
||||
{
|
||||
private readonly Container container;
|
||||
private readonly Box bottomLine;
|
||||
private readonly TextBadgePair textBadgePair;
|
||||
|
||||
public TestCaseTextBadgePair()
|
||||
{
|
||||
|
||||
Add(container = new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new OpenTK.Vector2(300, 40),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
Colour = Color4.Gray,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
bottomLine = new Box // purple line
|
||||
{
|
||||
Colour = Color4.Purple,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 3,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
},
|
||||
textBadgePair = new TextBadgePair(Color4.White, "testing")
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
AddStep(@"deactivate", () => textBadgePair.Deactivate());
|
||||
AddStep(@"activate", () => textBadgePair.Activate());
|
||||
AddStep(@"purple text", () => textBadgePair.SetTextColor(Color4.Purple, 100));
|
||||
AddStep(@"white text", () => textBadgePair.SetTextColor(Color4.White, 100));
|
||||
AddStep(@"purple badge", () => textBadgePair.SetBadgeColor(Color4.Purple, 100));
|
||||
AddStep(@"white badge", () => textBadgePair.SetBadgeColor(Color4.White, 100));
|
||||
AddStep(@"hide text", () => textBadgePair.HideText(250));
|
||||
AddStep(@"show text", () => textBadgePair.ShowText(250));
|
||||
}
|
||||
|
||||
//[BackgroundDependencyLoader]
|
||||
//private void load(OsuColour colours)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
//private enum BreadcrumbTab
|
||||
//{
|
||||
// Click,
|
||||
// The,
|
||||
// Circles,
|
||||
//}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user