1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Fix TestCasePlayer

This commit is contained in:
David Zhao 2019-03-12 17:33:16 +09:00
parent 921c4ce242
commit 9368081b99
2 changed files with 7 additions and 9 deletions

View File

@ -87,7 +87,7 @@ namespace osu.Game
public readonly Bindable<OverlayActivation> OverlayActivationMode = new Bindable<OverlayActivation>();
private readonly OsuScreenStack screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
private OsuScreenStack screenStack;
private VolumeOverlay volume;
private OnScreenDisplay onscreenDisplay;
private OsuLogo osuLogo;
@ -199,6 +199,8 @@ namespace osu.Game
LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolumeAdjust);
IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);
screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
}
private ExternalLinkOpener externalLinkOpener;

View File

@ -108,17 +108,13 @@ namespace osu.Game.Tests.Visual
Player?.Exit();
var player = CreatePlayer(r);
var p = Player = CreatePlayer(r);
playerWeakReferences.Add(player);
playerWeakReferences.Add(p);
LoadComponentAsync(player, p =>
{
Player = p;
LoadScreen(p);
});
LoadScreen(Player);
return player;
return p;
}
protected virtual Player CreatePlayer(Ruleset ruleset) => new Player