Support creating face-down tokens (#5800)

* add new fields to proto

* update token dlg

* send facedown in command

* update server to get it to work

* disable certain edits when face down

* update client event processing

* log face-down token creation

* Don't support colors on face-down tokens

The other client doesn't know about the color, so it causes a desync

* Update wording

Co-authored-by: Basile Clement <Elarnon@users.noreply.github.com>

* Allow annotations on face-down tokens

---------

Co-authored-by: Basile Clement <Elarnon@users.noreply.github.com>
This commit is contained in:
RickyRister 2025-04-27 21:30:23 -07:00 committed by GitHub
parent e3465be8c1
commit bb8213deb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 97 additions and 19 deletions

View file

@ -24,6 +24,7 @@ struct TokenInfo
QString pt;
QString annotation;
bool destroy = true;
bool faceDown = false;
};
class DlgCreateToken : public QDialog
@ -36,6 +37,7 @@ public:
protected:
void closeEvent(QCloseEvent *event) override;
private slots:
void faceDownCheckBoxToggled(bool checked);
void tokenSelectionChanged(const QModelIndex &current, const QModelIndex &previous);
void updateSearch(const QString &search);
void actChooseTokenFromAll(bool checked);
@ -51,6 +53,7 @@ private:
QComboBox *colorEdit;
QLineEdit *nameEdit, *ptEdit, *annotationEdit;
QCheckBox *destroyCheckBox;
QCheckBox *faceDownCheckBox;
QRadioButton *chooseTokenFromAllRadioButton, *chooseTokenFromDeckRadioButton;
CardInfoPictureWidget *pic;
QTreeView *chooseTokenView;