Disable select beatmap button after room is created

This commit is contained in:
smoogipoo 2018-12-10 19:03:22 +09:00
parent 3c44f9e4f1
commit cd41c45686

View File

@ -13,6 +13,7 @@ using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Overlays.SearchableList;
using osuTK.Graphics;
@ -99,10 +100,22 @@ namespace osu.Game.Screens.Multi.Screens.Match
private class BeatmapSelectButton : TriangleButton
{
private readonly IBindable<bool> createdBind = new Bindable<bool>();
[Resolved]
private Room room { get; set; }
public BeatmapSelectButton()
{
Text = "Select beatmap";
}
[BackgroundDependencyLoader]
private void load()
{
createdBind.BindTo(room.Created);
createdBind.BindValueChanged(v => Enabled.Value = !v, true);
}
}
private class HeaderBeatmapBackgroundSprite : UpdateableBeatmapBackgroundSprite
@ -110,10 +123,4 @@ namespace osu.Game.Screens.Multi.Screens.Match
protected override double FadeDuration => 0;
}
}
public enum MatchHeaderPage
{
Settings,
Room,
}
}