mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
Fix TestCasePlayer
This commit is contained in:
parent
921c4ce242
commit
9368081b99
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user