mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Fix context menus not working
This commit is contained in:
@ -9,6 +9,7 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osuTK;
|
||||
|
||||
@ -81,7 +82,22 @@ namespace osu.Game.Graphics.UserInterface
|
||||
return new DrawableOsuMenuItem(item);
|
||||
}
|
||||
|
||||
protected override ScrollContainer<Drawable> CreateScrollContainer(Direction direction) => new OsuScrollContainer(direction);
|
||||
protected override ScrollContainer<Drawable> CreateScrollContainer(Direction direction) => new OsuMenuScrollContainer(direction);
|
||||
|
||||
// Hotfix for https://github.com/ppy/osu/issues/17961
|
||||
public class OsuMenuScrollContainer : OsuScrollContainer
|
||||
{
|
||||
public OsuMenuScrollContainer(Direction direction)
|
||||
: base(direction)
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override Menu CreateSubMenu() => new OsuMenu(Direction.Vertical)
|
||||
{
|
||||
|
Reference in New Issue
Block a user