mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-24 10:23:02 -07:00
[Client] Add tournament UI for creating and following lobby tournaments
Wires the tournament protocol into the client: - DlgCreateGame gains a tournament checkbox with a games-per-match settings sub-dialog; both values are sent with Command_CreateGame and mirrored in the join-info variant of the dialog - TournamentWidget renders live standings (with deck-submission state) and pairings for the local player's perspective, and asks to open the current match game via openMatchGameRequested() - TournamentTabGameExtension attaches an overview page to TabGame's stacked views, mirrors phase and submission progress onto a deck-view status strip, and provides round-trip navigation between game view and standings; hosts get an in-game settings dialog during deck building - Open-match falls back to joining as spectator through TabSupervisor; sub-games now return to their parent tab on close, falling back to the normal leave-game flow when the parent is gone
This commit is contained in:
parent
4b106419f5
commit
5c30c52714
13 changed files with 719 additions and 3 deletions
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef DLG_TOURNAMENT_SETTINGS_H
|
||||
#define DLG_TOURNAMENT_SETTINGS_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class QDialogButtonBox;
|
||||
class QSpinBox;
|
||||
|
||||
struct DlgTournamentSettingsResult
|
||||
{
|
||||
int gamesPerMatch = 1;
|
||||
};
|
||||
|
||||
class DlgTournamentSettings : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgTournamentSettings(QWidget *parent = nullptr);
|
||||
DlgTournamentSettingsResult getResult() const;
|
||||
void setCurrentGamesPerMatch(int n);
|
||||
|
||||
private slots:
|
||||
void actOK();
|
||||
|
||||
private:
|
||||
QSpinBox *gamesPerMatchSpin;
|
||||
QDialogButtonBox *buttonBox;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue