mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add a testcase
This commit is contained in:
@ -0,0 +1,35 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Overlays.Toolbar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
|
{
|
||||||
|
public class TestSceneToolbarRulesetSelector : OsuTestScene
|
||||||
|
{
|
||||||
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
|
{
|
||||||
|
typeof(ToolbarRulesetSelector),
|
||||||
|
typeof(ToolbarRulesetButton),
|
||||||
|
};
|
||||||
|
|
||||||
|
public TestSceneToolbarRulesetSelector()
|
||||||
|
{
|
||||||
|
ToolbarRulesetSelector selector;
|
||||||
|
|
||||||
|
Add(new Container
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
AutoSizeAxes = Axes.X,
|
||||||
|
Height = Toolbar.HEIGHT,
|
||||||
|
Child = selector = new ToolbarRulesetSelector()
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
AutoSizeAxes = Axes.X;
|
AutoSizeAxes = Axes.X;
|
||||||
|
|
||||||
AddRangeInternal(new Drawable[]
|
AddRangeInternal(new[]
|
||||||
{
|
{
|
||||||
new OpaqueBackground
|
new OpaqueBackground
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
},
|
},
|
||||||
modeButtonLine = new Container
|
modeButtonLine = new Container
|
||||||
{
|
{
|
||||||
Size = new Vector2(padding* 2 + ToolbarButton.WIDTH, 3),
|
Size = new Vector2(padding * 2 + ToolbarButton.WIDTH, 3),
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.TopLeft,
|
Origin = Anchor.TopLeft,
|
||||||
Masking = true,
|
Masking = true,
|
||||||
|
Reference in New Issue
Block a user