1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 03:52:55 +08:00
osu-lazer/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs
2019-02-28 13:31:40 +09:00

43 lines
1.3 KiB
C#

// 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 osuTK;
using RectangleF = osu.Framework.Graphics.Primitives.RectangleF;
namespace osu.Game.Overlays.Toolbar
{
public class ToolbarUserArea : Container
{
public LoginOverlay LoginOverlay;
private ToolbarUserButton button;
public override RectangleF BoundingBox => button.BoundingBox;
[BackgroundDependencyLoader]
private void load()
{
RelativeSizeAxes = Axes.Y;
AutoSizeAxes = Axes.X;
Children = new Drawable[]
{
button = new ToolbarUserButton
{
Action = () => LoginOverlay.ToggleVisibility(),
},
LoginOverlay = new LoginOverlay
{
BypassAutoSizeAxes = Axes.Both,
Position = new Vector2(0, 1),
RelativePositionAxes = Axes.Y,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
}
};
}
}
}