mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
[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
This commit is contained in:
parent
a5f43c08fa
commit
6ea68c3f58
71 changed files with 1519 additions and 52 deletions
|
|
@ -10,7 +10,13 @@ class CounterState : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CounterState(int id, const QString &name, const QColor &color, int radius, int value, QObject *parent = nullptr);
|
||||
CounterState(int id,
|
||||
const QString &name,
|
||||
const QColor &color,
|
||||
int radius,
|
||||
int value,
|
||||
bool active = true,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
static CounterState *fromProto(const ServerInfo_Counter &counter, QObject *parent = nullptr);
|
||||
|
||||
|
|
@ -34,11 +40,17 @@ public:
|
|||
{
|
||||
return value;
|
||||
}
|
||||
bool isActive() const
|
||||
{
|
||||
return active;
|
||||
}
|
||||
|
||||
void setValue(int newValue);
|
||||
void setActive(bool newActive);
|
||||
|
||||
signals:
|
||||
void valueChanged(int oldValue, int newValue);
|
||||
void activeChanged(bool newActive);
|
||||
|
||||
private:
|
||||
int id;
|
||||
|
|
@ -46,6 +58,7 @@ private:
|
|||
QColor color;
|
||||
int radius;
|
||||
int value;
|
||||
bool active;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_COUNTER_STATE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue