mirror of
https://github.com/ppy/osu
synced 2025-01-17 03:21:09 +00:00
Fix screen breadcrumb control updating on click
This commit is contained in:
parent
db86098062
commit
2cdbada87e
@ -3,6 +3,7 @@
|
||||
|
||||
using System.Linq;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Screens;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
@ -19,8 +20,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
if (stack.CurrentScreen != null)
|
||||
onPushed(null, stack.CurrentScreen);
|
||||
}
|
||||
|
||||
Current.ValueChanged += current => current.NewValue.MakeCurrent();
|
||||
protected override void SelectTab(TabItem<IScreen> tab)
|
||||
{
|
||||
// override base method to prevent current item from being changed on click.
|
||||
// depend on screen push/exit to change current item instead.
|
||||
tab.Value.MakeCurrent();
|
||||
}
|
||||
|
||||
private void onPushed(IScreen lastScreen, IScreen newScreen)
|
||||
|
Loading…
Reference in New Issue
Block a user