mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 02:23:25 -08:00
[Client] Address tournament UI review feedback
- Drop the in-game tournament-settings button: Command_TournamentSettingsSelect has no server handler (RespContextError), the host-ness decision was evaluated once at tab construction, and the button never received a label on first show. The dialog can be re-added together with a working Server_Player override. - Pass PlayerManager::isSpectator() to TournamentWidget instead of relying on localPlayerId == -1, which never holds for spectators. - Report games per match as the total series length (Best of %1) to match the DlgTournamentSettings hint and the server's use of the value; the previous gamesPerMatch * 2 - 1 mislabeled Bo3 as Best of 5. - Block signals around read-only tournamentCheckBox setChecked so the disabled settings button is not re-enabled, and seed Command_CreateGame through mutable_tournament_settings() (field 15 became the settings message). - return after closing a sub-game that routed to its parent tab.
This commit is contained in:
parent
de983ed01b
commit
a700f8d00d
6 changed files with 21 additions and 55 deletions
|
|
@ -989,12 +989,9 @@ bool TabGame::switchToGameTab(int gameId)
|
|||
void TabGame::closeGame()
|
||||
{
|
||||
int parentId = game->getGameMetaInfo()->parentGameId();
|
||||
if (parentId >= 0) {
|
||||
if (switchToGameTab(parentId)) {
|
||||
close();
|
||||
}
|
||||
// If the parent tab is gone, fall through to the normal leave-game
|
||||
// flow instead of stranding the user on a dead sub-game tab.
|
||||
if (parentId >= 0 && switchToGameTab(parentId)) {
|
||||
close();
|
||||
return;
|
||||
}
|
||||
|
||||
gameMenu->clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue