1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Create Basic V2 footer and test

This commit is contained in:
mk56-spn 2022-12-01 11:57:50 +01:00
parent 54c0b2c20c
commit 18b4317e99
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,29 @@
// 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 NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Screens.Select.FooterV2;
namespace osu.Game.Tests.Visual.SongSelect
{
public partial class TestSceneSongSelectFooterV2 : OsuManualInputManagerTestScene
{
[SetUp]
public void SetUp() => Schedule(() =>
{
FooterV2 footer;
Child = footer = new FooterV2
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre
};
});
[Test]
public void TestBasic()
{
}
}
}

View File

@ -0,0 +1,39 @@
// 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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
namespace osu.Game.Screens.Select.FooterV2
{
public partial class FooterV2 : CompositeDrawable
{
//Should be 60, setting to 50 for now for the sake of matching the current BackButton height.
private const int height = 50;
[BackgroundDependencyLoader]
private void load(OsuColour colour)
{
RelativeSizeAxes = Axes.X;
Height = height;
InternalChildren = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colour.B5
}
};
}
protected override bool OnMouseDown(MouseDownEvent e) => true;
protected override bool OnClick(ClickEvent e) => true;
protected override bool OnHover(HoverEvent e) => true;
}
}