mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 14:53:21 +08:00
Fix bindable binding to make the editor load a screen by default again
This commit is contained in:
parent
837d1ba12e
commit
38ae9d905e
@ -20,8 +20,6 @@ namespace osu.Game.Screens.Edit.Menus
|
||||
{
|
||||
public readonly Bindable<EditorScreenMode> Mode = new Bindable<EditorScreenMode>();
|
||||
|
||||
private readonly ScreenSelectionTabControl tabControl;
|
||||
|
||||
public EditorMenuBar()
|
||||
: base(Direction.Horizontal, true)
|
||||
{
|
||||
@ -31,6 +29,7 @@ namespace osu.Game.Screens.Edit.Menus
|
||||
ItemsContainer.Padding = new MarginPadding { Left = 100 };
|
||||
BackgroundColour = OsuColour.FromHex("111");
|
||||
|
||||
ScreenSelectionTabControl tabControl;
|
||||
AddRangeInternal(new Drawable[]
|
||||
{
|
||||
tabControl = new ScreenSelectionTabControl
|
||||
@ -41,13 +40,13 @@ namespace osu.Game.Screens.Edit.Menus
|
||||
}
|
||||
});
|
||||
|
||||
tabControl.Current.BindTo(Mode);
|
||||
Mode.BindTo(tabControl.Current);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
tabControl.Current.TriggerChange();
|
||||
Mode.TriggerChange();
|
||||
}
|
||||
|
||||
protected override Framework.Graphics.UserInterface.Menu CreateSubMenu() => new SubMenu();
|
||||
|
Loading…
Reference in New Issue
Block a user