1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 14:42:56 +08:00

initial wiki header

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-04-19 16:24:47 +07:00
parent 222c34c0a1
commit 5117c51105
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,25 @@
// 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.Game.Overlays;
using osu.Game.Overlays.Wiki;
namespace osu.Game.Tests.Visual.Online
{
public class TestSceneWikiHeader : OsuTestScene
{
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Orange);
public TestSceneWikiHeader()
{
Child = new WikiHeader
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre
};
}
}
}

View File

@ -0,0 +1,31 @@
// 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;
namespace osu.Game.Overlays.Wiki
{
public class WikiHeader : BreadcrumbControlOverlayHeader
{
private const string index_page_string = "index";
public WikiHeader()
{
TabControl.AddItem(index_page_string);
}
protected override Drawable CreateBackground() => new OverlayHeaderBackground(@"Headers/wiki");
protected override OverlayTitle CreateTitle() => new WikiHeaderTitle();
private class WikiHeaderTitle : OverlayTitle
{
public WikiHeaderTitle()
{
Title = "wiki";
Description = "knowledge base";
IconTexture = "Icons/Hexacons/wiki";
}
}
}
}