mirror of
https://github.com/ppy/osu
synced 2025-01-01 11:52:20 +00: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.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,20 +45,25 @@ namespace osu.Game.Overlays
|
||||
Info info;
|
||||
CommentsSection comments;
|
||||
|
||||
Child = new FillFlowContainer
|
||||
Child = new PopoverContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Children = new Drawable[]
|
||||
Child = new FillFlowContainer
|
||||
{
|
||||
info = new Info(),
|
||||
new ScoresContainer
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
Beatmap = { BindTarget = Header.HeaderContent.Picker.Beatmap }
|
||||
},
|
||||
comments = new CommentsSection()
|
||||
info = new Info(),
|
||||
new ScoresContainer
|
||||
{
|
||||
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.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,28 +64,33 @@ namespace osu.Game.Overlays.Changelog
|
||||
{
|
||||
CommentsContainer comments;
|
||||
|
||||
Children = new Drawable[]
|
||||
Child = new PopoverContainer
|
||||
{
|
||||
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
|
||||
new Box
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 2,
|
||||
Colour = colourProvider.Background6,
|
||||
Margin = new MarginPadding { Top = 30 },
|
||||
},
|
||||
new ChangelogSupporterPromo
|
||||
{
|
||||
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
||||
},
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 2,
|
||||
Colour = colourProvider.Background6,
|
||||
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
||||
},
|
||||
comments = new CommentsContainer()
|
||||
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 2,
|
||||
Colour = colourProvider.Background6,
|
||||
Margin = new MarginPadding { Top = 30 },
|
||||
},
|
||||
new ChangelogSupporterPromo
|
||||
{
|
||||
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
||||
},
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 2,
|
||||
Colour = colourProvider.Background6,
|
||||
Alpha = api.LocalUser.Value.IsSupporter ? 0 : 1,
|
||||
},
|
||||
comments = new CommentsContainer()
|
||||
}
|
||||
};
|
||||
|
||||
comments.ShowComments(CommentableType.Build, build.Id);
|
||||
|
Loading…
Reference in New Issue
Block a user