mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 08:07:24 +08:00
Add popover containers to overlays
This commit is contained in:
parent
7ed26369a3
commit
d7e5bcbd3c
@ -10,6 +10,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Overlays.BeatmapSet;
|
using osu.Game.Overlays.BeatmapSet;
|
||||||
@ -44,20 +45,25 @@ namespace osu.Game.Overlays
|
|||||||
Info info;
|
Info info;
|
||||||
CommentsSection comments;
|
CommentsSection comments;
|
||||||
|
|
||||||
Child = new FillFlowContainer
|
Child = new PopoverContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Child = new FillFlowContainer
|
||||||
Spacing = new Vector2(0, 20),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
info = new Info(),
|
RelativeSizeAxes = Axes.X,
|
||||||
new ScoresContainer
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 20),
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Beatmap = { BindTarget = Header.HeaderContent.Picker.Beatmap }
|
info = new Info(),
|
||||||
},
|
new ScoresContainer
|
||||||
comments = new CommentsSection()
|
{
|
||||||
|
Beatmap = { BindTarget = Header.HeaderContent.Picker.Beatmap }
|
||||||
|
},
|
||||||
|
comments = new CommentsSection()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -63,28 +64,33 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
{
|
{
|
||||||
CommentsContainer comments;
|
CommentsContainer comments;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Child = new PopoverContainer
|
||||||
{
|
{
|
||||||
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
|
RelativeSizeAxes = Axes.X,
|
||||||
new Box
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
|
||||||
Height = 2,
|
new Box
|
||||||
Colour = colourProvider.Background6,
|
{
|
||||||
Margin = new MarginPadding { Top = 30 },
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
Height = 2,
|
||||||
new ChangelogSupporterPromo
|
Colour = colourProvider.Background6,
|
||||||
{
|
Margin = new MarginPadding { Top = 30 },
|
||||||
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
},
|
||||||
},
|
new ChangelogSupporterPromo
|
||||||
new Box
|
{
|
||||||
{
|
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
||||||
RelativeSizeAxes = Axes.X,
|
},
|
||||||
Height = 2,
|
new Box
|
||||||
Colour = colourProvider.Background6,
|
{
|
||||||
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
Height = 2,
|
||||||
comments = new CommentsContainer()
|
Colour = colourProvider.Background6,
|
||||||
|
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
||||||
|
},
|
||||||
|
comments = new CommentsContainer()
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
comments.ShowComments(CommentableType.Build, build.Id);
|
comments.ShowComments(CommentableType.Build, build.Id);
|
||||||
|
Loading…
Reference in New Issue
Block a user