1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 05:52:55 +08:00
osu-lazer/osu.Game/Overlays/Toolbar/ToolbarUserArea.cs

41 lines
1.3 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-01-31 15:59:38 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using OpenTK;
namespace osu.Game.Overlays.Toolbar
{
class ToolbarUserArea : Container
{
public LoginOverlay LoginOverlay;
2017-01-31 15:59:38 +08:00
private ToolbarUserButton button;
public override RectangleF BoundingBox => button.BoundingBox;
public override bool Contains(Vector2 screenSpacePos) => true;
public ToolbarUserArea()
{
RelativeSizeAxes = Axes.Y;
2017-02-04 21:27:05 +08:00
AutoSizeAxes = Axes.X;
2017-01-31 15:59:38 +08:00
Children = new Drawable[] {
button = new ToolbarUserButton
{
Action = () => LoginOverlay.ToggleVisibility(),
2017-01-31 15:59:38 +08:00
},
LoginOverlay = new LoginOverlay
2017-01-31 15:59:38 +08:00
{
BypassAutoSizeAxes = Axes.Both,
2017-01-31 15:59:38 +08:00
Position = new Vector2(0, 1),
RelativePositionAxes = Axes.Y,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
}
};
}
}
}