mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Add basic header text
This commit is contained in:
parent
b936043956
commit
a7982787d4
@ -5,6 +5,8 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
|
||||
namespace osu.Game.Skinning.Editor
|
||||
@ -15,6 +17,8 @@ namespace osu.Game.Skinning.Editor
|
||||
|
||||
private readonly Drawable target;
|
||||
|
||||
private OsuTextFlowContainer headerText;
|
||||
|
||||
protected override bool StartHidden => true;
|
||||
|
||||
public SkinEditor(Drawable target)
|
||||
@ -25,16 +29,31 @@ namespace osu.Game.Skinning.Editor
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
InternalChild = new OsuContextMenuContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
headerText = new OsuTextFlowContainer()
|
||||
{
|
||||
TextAnchor = Anchor.TopCentre,
|
||||
Padding = new MarginPadding(20),
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
RelativeSizeAxes = Axes.X
|
||||
},
|
||||
new SkinBlueprintContainer(target),
|
||||
}
|
||||
};
|
||||
|
||||
headerText.AddParagraph("Skin editor (preview)", cp => cp.Font = OsuFont.Default.With(size: 24));
|
||||
headerText.AddParagraph("This is a preview of what is to come. Changes are lost on changing screens.", cp =>
|
||||
{
|
||||
cp.Font = OsuFont.Default.With(size: 12);
|
||||
cp.Colour = colours.Yellow;
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user