mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Use RoomID for creation
This commit is contained in:
@ -100,7 +100,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
|
||||
private class BeatmapSelectButton : TriangleButton
|
||||
{
|
||||
private readonly IBindable<bool> createdBind = new Bindable<bool>();
|
||||
private readonly IBindable<int?> roomIDBind = new Bindable<int?>();
|
||||
|
||||
[Resolved]
|
||||
private Room room { get; set; }
|
||||
@ -113,8 +113,8 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
createdBind.BindTo(room.Created);
|
||||
createdBind.BindValueChanged(v => Enabled.Value = !v, true);
|
||||
roomIDBind.BindTo(room.RoomID);
|
||||
roomIDBind.BindValueChanged(v => Enabled.Value = !v.HasValue, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
{
|
||||
public class MatchTabControl : PageTabControl<MatchPage>
|
||||
{
|
||||
private readonly IBindable<bool> created = new Bindable<bool>();
|
||||
private readonly IBindable<int?> roomIdBind = new Bindable<int?>();
|
||||
|
||||
[Resolved]
|
||||
private Room room { get; set; }
|
||||
@ -28,10 +28,10 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
created.BindTo(room.Created);
|
||||
created.BindValueChanged(v =>
|
||||
roomIdBind.BindTo(room.RoomID);
|
||||
roomIdBind.BindValueChanged(v =>
|
||||
{
|
||||
if (v)
|
||||
if (v.HasValue)
|
||||
{
|
||||
Items.ForEach(t => t.Enabled.Value = !(t is SettingsMatchPage));
|
||||
Current.Value = new RoomMatchPage();
|
||||
|
@ -25,7 +25,6 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
// Todo: Perform API request
|
||||
|
||||
room.Created.Value = true;
|
||||
rooms.Add(room);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user