mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Merge pull request #9061 from smoogipoo/fix-enter-in-multi
Fix being able to press enter to create matches
This commit is contained in:
@ -69,6 +69,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
settings.NameField.Current.Value = expected_name;
|
settings.NameField.Current.Value = expected_name;
|
||||||
settings.DurationField.Current.Value = expectedDuration;
|
settings.DurationField.Current.Value = expectedDuration;
|
||||||
|
Room.Playlist.Add(new PlaylistItem { Beatmap = { Value = CreateBeatmap(Ruleset.Value).BeatmapInfo } });
|
||||||
|
|
||||||
roomManager.CreateRequested = r =>
|
roomManager.CreateRequested = r =>
|
||||||
{
|
{
|
||||||
@ -89,6 +90,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
|
|
||||||
AddStep("setup", () =>
|
AddStep("setup", () =>
|
||||||
{
|
{
|
||||||
|
Room.Name.Value = "Test Room";
|
||||||
|
Room.Playlist.Add(new PlaylistItem { Beatmap = { Value = CreateBeatmap(Ruleset.Value).BeatmapInfo } });
|
||||||
|
|
||||||
fail = true;
|
fail = true;
|
||||||
roomManager.CreateRequested = _ => !fail;
|
roomManager.CreateRequested = _ => !fail;
|
||||||
});
|
});
|
||||||
|
@ -133,7 +133,6 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
TabbableContentContainer = this,
|
TabbableContentContainer = this,
|
||||||
OnCommit = (sender, text) => apply(),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new Section("Duration")
|
new Section("Duration")
|
||||||
@ -196,7 +195,6 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
TabbableContentContainer = this,
|
TabbableContentContainer = this,
|
||||||
ReadOnly = true,
|
ReadOnly = true,
|
||||||
OnCommit = (sender, text) => apply()
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new Section("Password (optional)")
|
new Section("Password (optional)")
|
||||||
@ -207,7 +205,6 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
TabbableContentContainer = this,
|
TabbableContentContainer = this,
|
||||||
ReadOnly = true,
|
ReadOnly = true,
|
||||||
OnCommit = (sender, text) => apply()
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -331,6 +328,9 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
|
|
||||||
private void apply()
|
private void apply()
|
||||||
{
|
{
|
||||||
|
if (!ApplyButton.Enabled.Value)
|
||||||
|
return;
|
||||||
|
|
||||||
hideError();
|
hideError();
|
||||||
|
|
||||||
RoomName.Value = NameField.Text;
|
RoomName.Value = NameField.Text;
|
||||||
|
Reference in New Issue
Block a user