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:
parent
222c34c0a1
commit
5117c51105
25
osu.Game.Tests/Visual/Online/TestSceneWikiHeader.cs
Normal file
25
osu.Game.Tests/Visual/Online/TestSceneWikiHeader.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
31
osu.Game/Overlays/Wiki/WikiHeader.cs
Normal file
31
osu.Game/Overlays/Wiki/WikiHeader.cs
Normal 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user