Cockatrice/cockatrice/src/interface/widgets/dialogs/dlg_create_game.h
DawnFire42 75d59e2d82
[Game] Add Command Zone support with commander tax tracking
- Add CommandZone and CommandZoneLogic for commander
  - Add CommanderTaxCounter
  - Add counter active state protocol (show/hide tax counters)
  - Add "Enable Command Zone" option in game creation dialogs
  - Add context menu actions for command zone operations

Took 9 minutes

Took 11 minutes
2026-06-19 11:00:49 -04:00

59 lines
1.7 KiB
C++

/**
* @file dlg_create_game.h
* @ingroup RoomDialogs
*/
//! \todo Document this file.
#ifndef DLG_CREATEGAME_H
#define DLG_CREATEGAME_H
#include <QDialog>
#include <QMap>
#include <libcockatrice/utility/macros.h>
class QCheckBox;
class QDialogButtonBox;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QSpinBox;
class Response;
class ServerInfo_Game;
class TabRoom;
class DlgCreateGame : public QDialog
{
Q_OBJECT
public:
DlgCreateGame(TabRoom *_room, const QMap<int, QString> &_gameTypes, QWidget *parent = nullptr);
DlgCreateGame(const ServerInfo_Game &game, const QMap<int, QString> &_gameTypes, QWidget *parent = nullptr);
private slots:
void actOK();
void actReset();
void checkResponse(const Response &response);
void spectatorsAllowedChanged(QT_STATE_CHANGED_T state);
private:
TabRoom *room;
QMap<int, QString> gameTypes;
QMap<int, QRadioButton *> gameTypeCheckBoxes;
QGroupBox *generalGroupBox, *spectatorsGroupBox, *gameSetupOptionsGroupBox;
QLabel *descriptionLabel, *passwordLabel, *maxPlayersLabel, *startingLifeTotalLabel, *shareDecklistsOnLoadLabel;
QLineEdit *descriptionEdit, *passwordEdit;
QSpinBox *maxPlayersEdit, *startingLifeTotalEdit;
QCheckBox *onlyBuddiesCheckBox, *onlyRegisteredCheckBox;
QCheckBox *spectatorsAllowedCheckBox, *spectatorsNeedPasswordCheckBox, *spectatorsCanTalkCheckBox,
*spectatorsSeeEverythingCheckBox, *createGameAsJudgeCheckBox, *createGameAsSpectatorCheckBox;
QCheckBox *shareDecklistsOnLoadCheckBox;
QCheckBox *enableCommandZoneCheckBox;
QDialogButtonBox *buttonBox;
QPushButton *clearButton;
QCheckBox *rememberGameSettings;
void sharedCtor();
};
#endif