1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Add close button to dialog

This commit is contained in:
smoogipoo 2020-09-08 17:21:29 +09:00
parent d2650fc1a0
commit 4737add00b

View File

@ -5,9 +5,11 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osuTK;
namespace osu.Game.Collections
@ -55,6 +57,12 @@ namespace osu.Game.Collections
Content = new[]
{
new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new Drawable[]
{
new OsuSpriteText
{
@ -63,6 +71,18 @@ namespace osu.Game.Collections
Text = "Manage collections",
Font = OsuFont.GetFont(size: 30),
Padding = new MarginPadding { Vertical = 10 },
},
new IconButton
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Icon = FontAwesome.Solid.Times,
Colour = colours.GreySeafoamDarker,
Scale = new Vector2(0.8f),
X = -10,
Action = () => State.Value = Visibility.Hidden
}
}
}
},
new Drawable[]