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

Merge pull request #22545 from Joehuu/fix-user-profile-context-menu

Fix beatmap cards not showing context menu on user profile
This commit is contained in:
Dean Herbert 2023-02-08 17:07:28 +09:00 committed by GitHub
commit 21fa29f47f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 70 additions and 72 deletions

View File

@ -12,7 +12,6 @@ using osu.Framework.Graphics.Shapes;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.Cursor;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Overlays.Profile.Header.Components;
@ -104,13 +103,7 @@ namespace osu.Game.Overlays.Profile.Header
Colour = Colour4.Black.Opacity(0.25f),
}
},
new OsuContextMenuContainer
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Child = new FillFlowContainer
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
@ -174,7 +167,6 @@ namespace osu.Game.Overlays.Profile.Header
},
}
},
},
}
},
coverToggle = new ToggleCoverButton

View File

@ -14,6 +14,7 @@ using osu.Framework.Input.Events;
using osu.Game.Extensions;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Cursor;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online;
@ -100,7 +101,10 @@ namespace osu.Game.Overlays
Origin = Anchor.TopCentre,
};
Add(sectionsContainer = new ProfileSectionsContainer
Add(new OsuContextMenuContainer
{
RelativeSizeAxes = Axes.Both,
Child = sectionsContainer = new ProfileSectionsContainer
{
ExpandableHeader = Header,
FixedHeader = tabs,
@ -110,7 +114,9 @@ namespace osu.Game.Overlays
Colour = ColourProvider.Background5,
RelativeSizeAxes = Axes.Both
},
}
});
sectionsContainer.SelectedSection.ValueChanged += section =>
{
if (lastSection != section.NewValue)