1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 07:33:15 +08:00

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