Merge branch 'master' of github.com:ppy/osu into general-improvements

This commit is contained in:
Thomas Müller
2016-10-09 16:02:35 +02:00
2 changed files with 13 additions and 2 deletions

View File

@ -3,12 +3,15 @@
using System;
using System.Collections.Generic;
using osu.Framework.Configuration;
using osu.Game.GameModes.Backgrounds;
namespace osu.Game.GameModes.Play
{
class PlaySongSelect : GameModeWhiteBox
{
private Bindable<PlayMode> playMode;
protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4");
protected override IEnumerable<Type> PossibleChildren => new[] {
@ -22,7 +25,15 @@ namespace osu.Game.GameModes.Play
OsuGame osu = Game as OsuGame;
osu.PlayMode.ValueChanged += PlayMode_ValueChanged;
playMode = osu.PlayMode;
playMode.ValueChanged += PlayMode_ValueChanged;
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
playMode.ValueChanged -= PlayMode_ValueChanged;
}
private void PlayMode_ValueChanged(object sender, EventArgs e)