mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
Avoid MatchSettingsOverlay
base class potentially accessing an uninitialised field
This commit is contained in:
parent
0db316d644
commit
24f330e5c1
@ -25,8 +25,12 @@ namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
private void load()
|
||||
{
|
||||
Masking = true;
|
||||
|
||||
Add(Settings = CreateSettings());
|
||||
}
|
||||
|
||||
protected abstract OnlinePlayComposite CreateSettings();
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
Settings.MoveToY(0, TRANSITION_DURATION, Easing.OutQuint);
|
||||
|
@ -27,16 +27,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
{
|
||||
public class MultiplayerMatchSettingsOverlay : MatchSettingsOverlay
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Child = Settings = new MatchSettings
|
||||
protected override OnlinePlayComposite CreateSettings()
|
||||
=> new MatchSettings
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
RelativePositionAxes = Axes.Y,
|
||||
SettingsApplied = Hide
|
||||
};
|
||||
}
|
||||
|
||||
protected class MatchSettings : OnlinePlayComposite
|
||||
{
|
||||
|
@ -26,16 +26,13 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
{
|
||||
public Action EditPlaylist;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Child = Settings = new MatchSettings
|
||||
protected override OnlinePlayComposite CreateSettings()
|
||||
=> new MatchSettings
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
RelativePositionAxes = Axes.Y,
|
||||
EditPlaylist = () => EditPlaylist?.Invoke()
|
||||
};
|
||||
}
|
||||
|
||||
protected class MatchSettings : OnlinePlayComposite
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user