1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Give OptionsOverlay an offset to make up for toolbar possibly being present.

This commit is contained in:
Dean Herbert 2016-11-09 15:23:32 +09:00
parent d9bd3717d0
commit a5dcae859c

View File

@ -6,6 +6,7 @@ using System.Linq;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Input;
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
@ -72,6 +73,7 @@ namespace osu.Game.Overlays
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirection.VerticalOnly,
Children = new Drawable[]
{
new SpriteText
@ -112,6 +114,13 @@ namespace osu.Game.Overlays
};
}
protected override void Load(BaseGame game)
{
base.Load(game);
scrollContainer.Padding = new MarginPadding { Top = (game as OsuGame)?.Toolbar.DrawHeight ?? 0 };
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)