1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:52:55 +08:00
This commit is contained in:
Dan Balasescu 2023-12-01 19:02:27 +09:00
parent 15c9416244
commit 1b0fc8ca9d
No known key found for this signature in database
2 changed files with 8 additions and 18 deletions

View File

@ -11,7 +11,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
{ {
public ConfirmAbortDialog(Action onConfirm, Action onCancel) public ConfirmAbortDialog(Action onConfirm, Action onCancel)
{ {
HeaderText = "Are you sure you want to go abort the match?"; HeaderText = "Are you sure you want to abort the match?";
Icon = FontAwesome.Solid.ExclamationTriangle; Icon = FontAwesome.Solid.ExclamationTriangle;

View File

@ -155,19 +155,14 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
case MultiplayerUserState.Spectating: case MultiplayerUserState.Spectating:
case MultiplayerUserState.Ready: case MultiplayerUserState.Ready:
Text = room.Host?.Equals(localUser) == true Text = multiplayerClient.IsHost
? $"Start match {countText}" ? $"Start match {countText}"
: $"Waiting for host... {countText}"; : $"Waiting for host... {countText}";
break; break;
case MultiplayerUserState.Idle: // Show the abort button for the host as long as gameplay is in progress.
if (room.State == MultiplayerRoomState.Open || room.Host?.Equals(localUser) != true) case MultiplayerUserState when multiplayerClient.IsHost && room.State != MultiplayerRoomState.Open:
{ Text = "Abort the match";
Text = "Ready";
break;
}
Text = "Abort!";
break; break;
} }
} }
@ -207,20 +202,15 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
case MultiplayerUserState.Spectating: case MultiplayerUserState.Spectating:
case MultiplayerUserState.Ready: case MultiplayerUserState.Ready:
if (room?.Host?.Equals(localUser) == true && !room.ActiveCountdowns.Any(c => c is MatchStartCountdown)) if (multiplayerClient.IsHost && !room.ActiveCountdowns.Any(c => c is MatchStartCountdown))
setGreen(); setGreen();
else else
setYellow(); setYellow();
break; break;
case MultiplayerUserState.Idle: // Show the abort button for the host as long as gameplay is in progress.
if (room.State == MultiplayerRoomState.Open || room.Host?.Equals(localUser) != true) case MultiplayerUserState when multiplayerClient.IsHost && room.State != MultiplayerRoomState.Open:
{
setGreen();
break;
}
setRed(); setRed();
break; break;
} }