mirror of
https://github.com/osukey/osukey.git
synced 2025-06-23 20:27:58 +09:00
Fix offset of music controller when toolbar is hidden
This commit is contained in:
parent
fc59e6dec5
commit
bdb39a79a9
@ -441,7 +441,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
loadComponentSingleFile(musicController = new MusicController
|
loadComponentSingleFile(musicController = new MusicController
|
||||||
{
|
{
|
||||||
Position = new Vector2(0, Toolbar.HEIGHT),
|
GetToolbarHeight = () => ToolbarOffset,
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
}, floatingOverlayContent.Add);
|
}, floatingOverlayContent.Add);
|
||||||
|
@ -56,6 +56,11 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provide a source for the toolbar height.
|
||||||
|
/// </summary>
|
||||||
|
public Func<float> GetToolbarHeight;
|
||||||
|
|
||||||
public MusicController()
|
public MusicController()
|
||||||
{
|
{
|
||||||
Width = 400;
|
Width = 400;
|
||||||
@ -244,6 +249,8 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
base.UpdateAfterChildren();
|
base.UpdateAfterChildren();
|
||||||
Height = dragContainer.Height;
|
Height = dragContainer.Height;
|
||||||
|
|
||||||
|
dragContainer.Padding = new MarginPadding { Top = GetToolbarHeight?.Invoke() ?? 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user