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

Add popover containers to overlays

This commit is contained in:
ansel 2022-10-17 13:41:46 +03:00
parent 7ed26369a3
commit d7e5bcbd3c
2 changed files with 41 additions and 29 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.BeatmapSet;
@ -44,6 +45,10 @@ namespace osu.Game.Overlays
Info info;
CommentsSection comments;
Child = new PopoverContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Child = new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
@ -59,6 +64,7 @@ namespace osu.Game.Overlays
},
comments = new CommentsSection()
}
}
};
Header.BeatmapSet.BindTo(beatmapSet);

View File

@ -10,6 +10,7 @@ using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
@ -63,6 +64,10 @@ namespace osu.Game.Overlays.Changelog
{
CommentsContainer comments;
Child = new PopoverContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new Drawable[]
{
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
@ -85,6 +90,7 @@ namespace osu.Game.Overlays.Changelog
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
},
comments = new CommentsContainer()
}
};
comments.ShowComments(CommentableType.Build, build.Id);