mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 20:47:26 +08:00
Fix editor menus overflowing off screen
Closes https://github.com/ppy/osu/issues/28750. Yes this is not the perfect change to fix this (which would probably be some framework change to take bounds of the parenting input manager into account). I really do not want to go there and would like to just fix this locally and move on. Due to the game-wide scaling container this sorta works for any resolution anyhow.
This commit is contained in:
parent
a3e54a6272
commit
2ceedb0f93
@ -71,7 +71,10 @@ namespace osu.Game.Screens.Edit.Components.Menus
|
||||
});
|
||||
}
|
||||
|
||||
protected override Framework.Graphics.UserInterface.Menu CreateSubMenu() => new SubMenu();
|
||||
protected override Framework.Graphics.UserInterface.Menu CreateSubMenu() => new SubMenu
|
||||
{
|
||||
MaxHeight = MaxHeight,
|
||||
};
|
||||
|
||||
protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item) => new DrawableEditorBarMenuItem(item);
|
||||
|
||||
@ -143,7 +146,10 @@ namespace osu.Game.Screens.Edit.Components.Menus
|
||||
BackgroundColour = colourProvider.Background2;
|
||||
}
|
||||
|
||||
protected override Framework.Graphics.UserInterface.Menu CreateSubMenu() => new SubMenu();
|
||||
protected override Framework.Graphics.UserInterface.Menu CreateSubMenu() => new SubMenu
|
||||
{
|
||||
MaxHeight = MaxHeight,
|
||||
};
|
||||
|
||||
protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item)
|
||||
{
|
||||
|
@ -343,6 +343,7 @@ namespace osu.Game.Screens.Edit
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
MaxHeight = 600,
|
||||
Items = new[]
|
||||
{
|
||||
new MenuItem(CommonStrings.MenuBarFile)
|
||||
|
Loading…
Reference in New Issue
Block a user