mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Move logo depth to a forward passing
This commit is contained in:
parent
3ea0f58daa
commit
e8f7213b3b
@ -297,8 +297,6 @@ namespace osu.Game
|
||||
if (hideToolbar) Toolbar.Hide();
|
||||
}
|
||||
|
||||
public void ChangeLogoDepth(bool inFrontOfFooter) => ScreenContainer.ChangeChildDepth(logoContainer, inFrontOfFooter ? float.MinValue : 0);
|
||||
|
||||
protected override UserInputManager CreateUserInputManager()
|
||||
{
|
||||
var userInputManager = base.CreateUserInputManager();
|
||||
@ -996,6 +994,7 @@ namespace osu.Game
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = ScreenFooter = new ScreenFooter(backReceptor)
|
||||
{
|
||||
RequestLogoInFront = inFront => ScreenContainer.ChangeChildDepth(logoContainer, inFront ? float.MinValue : 0),
|
||||
OnBack = () =>
|
||||
{
|
||||
if (!(ScreenStack.CurrentScreen is IOsuScreen currentScreen))
|
||||
|
@ -44,6 +44,8 @@ namespace osu.Game.Screens.Footer
|
||||
|
||||
public ScreenBackButton BackButton { get; private set; } = null!;
|
||||
|
||||
public Action<bool>? RequestLogoInFront { get; set; }
|
||||
|
||||
public Action? OnBack;
|
||||
|
||||
public ScreenFooter(BackReceptor? receptor = null)
|
||||
@ -114,7 +116,7 @@ namespace osu.Game.Screens.Footer
|
||||
changeLogoDepthDelegate = null;
|
||||
|
||||
logoTrackingContainer.StartTracking(logo, duration, easing);
|
||||
game?.ChangeLogoDepth(inFrontOfFooter: true);
|
||||
RequestLogoInFront?.Invoke(true);
|
||||
}
|
||||
|
||||
public void StopTrackingLogo()
|
||||
@ -122,7 +124,7 @@ namespace osu.Game.Screens.Footer
|
||||
logoTrackingContainer.StopTracking();
|
||||
|
||||
if (game != null)
|
||||
changeLogoDepthDelegate = Scheduler.AddDelayed(() => game.ChangeLogoDepth(inFrontOfFooter: false), transition_duration);
|
||||
changeLogoDepthDelegate = Scheduler.AddDelayed(() => RequestLogoInFront?.Invoke(false), transition_duration);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
|
Loading…
Reference in New Issue
Block a user