mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 10:47:22 +09:00
Ensure scroll-to-top button is displayed above all overlay content
This commit is contained in:
parent
dc421bd2af
commit
79e1d978e7
@ -77,6 +77,14 @@ namespace osu.Game.Overlays
|
|||||||
base.Content.Add(mainContent);
|
base.Content.Add(mainContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
// Ensure the scroll-to-top button is displayed above the fixed header.
|
||||||
|
AddInternal(ScrollFlow.Button.CreateProxy());
|
||||||
|
}
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
protected override void UpdateAfterChildren()
|
||||||
{
|
{
|
||||||
base.UpdateAfterChildren();
|
base.UpdateAfterChildren();
|
||||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Overlays
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const int button_scroll_position = 200;
|
private const int button_scroll_position = 200;
|
||||||
|
|
||||||
protected ScrollBackButton Button;
|
public ScrollBackButton Button { get; private set; }
|
||||||
|
|
||||||
private readonly Bindable<float?> lastScrollTarget = new Bindable<float?>();
|
private readonly Bindable<float?> lastScrollTarget = new Bindable<float?>();
|
||||||
|
|
||||||
|
@ -249,12 +249,14 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private partial class ProfileSectionsContainer : SectionsContainer<ProfileSection>
|
private partial class ProfileSectionsContainer : SectionsContainer<ProfileSection>
|
||||||
{
|
{
|
||||||
|
private OverlayScrollContainer scroll = null!;
|
||||||
|
|
||||||
public ProfileSectionsContainer()
|
public ProfileSectionsContainer()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override UserTrackingScrollContainer CreateScrollContainer() => new OverlayScrollContainer();
|
protected override UserTrackingScrollContainer CreateScrollContainer() => scroll = new OverlayScrollContainer();
|
||||||
|
|
||||||
// Reverse child ID is required so expanding beatmap panels can appear above sections below them.
|
// Reverse child ID is required so expanding beatmap panels can appear above sections below them.
|
||||||
// This can also be done by setting Depth when adding new sections above if using ReverseChildID turns out to have any issues.
|
// This can also be done by setting Depth when adding new sections above if using ReverseChildID turns out to have any issues.
|
||||||
@ -267,6 +269,14 @@ namespace osu.Game.Overlays
|
|||||||
Padding = new MarginPadding { Horizontal = 10 },
|
Padding = new MarginPadding { Horizontal = 10 },
|
||||||
Margin = new MarginPadding { Bottom = 10 },
|
Margin = new MarginPadding { Bottom = 10 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
// Ensure the scroll-to-top button is displayed above the fixed header.
|
||||||
|
AddInternal(scroll.Button.CreateProxy());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user