mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Disable select beatmap button after room is created
This commit is contained in:
parent
3c44f9e4f1
commit
cd41c45686
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user