mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-24 10:23:02 -07: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
c5fd10087a
commit
55099ab82c
6 changed files with 21 additions and 55 deletions
|
|
@ -32,14 +32,12 @@ public:
|
|||
|
||||
private slots:
|
||||
void onTournamentStateChanged(const Event_TournamentState &state);
|
||||
void showTournamentSettingsDialog();
|
||||
void showOverviewPage();
|
||||
void showDeckViewPage();
|
||||
void openMatchGame(int gameId);
|
||||
|
||||
private:
|
||||
void connectSignals();
|
||||
[[nodiscard]] bool isLocalPlayerHost() const;
|
||||
void updateDeckViewStrip(const Event_TournamentState &state);
|
||||
void updateNavigationButtons(const Event_TournamentState &state);
|
||||
|
||||
|
|
@ -48,7 +46,6 @@ private:
|
|||
QWidget *tournamentOverviewWidget = nullptr;
|
||||
QPushButton *backToGameButton = nullptr;
|
||||
QPushButton *standingsButton = nullptr;
|
||||
QPushButton *settingsButton = nullptr;
|
||||
QLabel *deckViewStatusLabel = nullptr;
|
||||
Event_TournamentState::TournamentPhase lastKnownPhase = Event_TournamentState::PHASE_DECK_BUILDING;
|
||||
bool hasLastKnownPhase = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue