mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:43:01 +08:00
Merge branch 'master' into overlay-improvements
This commit is contained in:
commit
4b3e7c3613
@ -139,6 +139,8 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
public void ScrollTo(Drawable section) => scrollContainer.ScrollTo(scrollContainer.GetChildPosInContent(section) - (FixedHeader?.BoundingBox.Height ?? 0));
|
||||
|
||||
public void ScrollToTop() => scrollContainer.ScrollTo(0);
|
||||
|
||||
private float lastKnownScroll;
|
||||
protected override void UpdateAfterChildren()
|
||||
{
|
||||
|
@ -74,20 +74,18 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Right = metadata_width + BeatmapSetOverlay.RIGHT_WIDTH + spacing * 2 },
|
||||
Child = new ScrollContainer
|
||||
Child = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollbarVisible = false,
|
||||
Child = description = new MetadataSection("Description"),
|
||||
},
|
||||
},
|
||||
new ScrollContainer
|
||||
new Container
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = metadata_width,
|
||||
ScrollbarVisible = false,
|
||||
Padding = new MarginPadding { Horizontal = 10 },
|
||||
Margin = new MarginPadding { Right = BeatmapSetOverlay.RIGHT_WIDTH + spacing },
|
||||
Child = new FillFlowContainer
|
||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Overlays
|
||||
private APIAccess api;
|
||||
private RulesetStore rulesets;
|
||||
|
||||
private readonly ScrollContainer scroll;
|
||||
|
||||
// receive input outside our bounds so we can trigger a close event on ourselves.
|
||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
|
||||
|
||||
@ -61,7 +63,7 @@ namespace osu.Game.Overlays
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.Gray(0.2f)
|
||||
},
|
||||
new ScrollContainer
|
||||
scroll = new ScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollbarVisible = false,
|
||||
@ -120,6 +122,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
header.BeatmapSet = info.BeatmapSet = set;
|
||||
Show();
|
||||
scroll.ScrollTo(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
|
||||
Show();
|
||||
sectionsContainer.ScrollToTop();
|
||||
}
|
||||
|
||||
private void userLoadComplete(User user)
|
||||
|
Loading…
Reference in New Issue
Block a user