diff --git a/cockatrice/src/client/settings/cache_settings.cpp b/cockatrice/src/client/settings/cache_settings.cpp index 30093fd52..e2fb753b9 100644 --- a/cockatrice/src/client/settings/cache_settings.cpp +++ b/cockatrice/src/client/settings/cache_settings.cpp @@ -384,6 +384,9 @@ SettingsCache::SettingsCache() createGameAsSpectator = settings->value("game/creategameasspectator", false).toBool(); defaultStartingLifeTotal = settings->value("game/defaultstartinglifetotal", 20).toInt(); shareDecklistsOnLoad = settings->value("game/sharedecklistsonload", false).toBool(); + enableCommandZone = settings->value("game/enablecommandzone", false).toBool(); + enableCompanionZone = settings->value("game/enablecompanionzone", true).toBool(); + enableBackgroundZone = settings->value("game/enablebackgroundzone", true).toBool(); rememberGameSettings = settings->value("game/remembergamesettings", true).toBool(); clientID = settings->value("personal/clientid", CLIENT_INFO_NOT_SET).toString(); clientVersion = settings->value("personal/clientversion", CLIENT_INFO_NOT_SET).toString(); @@ -1115,257 +1118,28 @@ void SettingsCache::setClientVersion(const QString &_clientVersion) QStringList SettingsCache::getCountries() const { - static QStringList countries = QStringList() << "ad" - << "ae" - << "af" - << "ag" - << "ai" - << "al" - << "am" - << "ao" - << "aq" - << "ar" - << "as" - << "at" - << "au" - << "aw" - << "ax" - << "az" - << "ba" - << "bb" - << "bd" - << "be" - << "bf" - << "bg" - << "bh" - << "bi" - << "bj" - << "bl" - << "bm" - << "bn" - << "bo" - << "bq" - << "br" - << "bs" - << "bt" - << "bv" - << "bw" - << "by" - << "bz" - << "ca" - << "cc" - << "cd" - << "cf" - << "cg" - << "ch" - << "ci" - << "ck" - << "cl" - << "cm" - << "cn" - << "co" - << "cr" - << "cu" - << "cv" - << "cw" - << "cx" - << "cy" - << "cz" - << "de" - << "dj" - << "dk" - << "dm" - << "do" - << "dz" - << "ec" - << "ee" - << "eg" - << "eh" - << "er" - << "es" - << "et" - << "eu" - << "fi" - << "fj" - << "fk" - << "fm" - << "fo" - << "fr" - << "ga" - << "gb" - << "gd" - << "ge" - << "gf" - << "gg" - << "gh" - << "gi" - << "gl" - << "gm" - << "gn" - << "gp" - << "gq" - << "gr" - << "gs" - << "gt" - << "gu" - << "gw" - << "gy" - << "hk" - << "hm" - << "hn" - << "hr" - << "ht" - << "hu" - << "id" - << "ie" - << "il" - << "im" - << "in" - << "io" - << "iq" - << "ir" - << "is" - << "it" - << "je" - << "jm" - << "jo" - << "jp" - << "ke" - << "kg" - << "kh" - << "ki" - << "km" - << "kn" - << "kp" - << "kr" - << "kw" - << "ky" - << "kz" - << "la" - << "lb" - << "lc" - << "li" - << "lk" - << "lr" - << "ls" - << "lt" - << "lu" - << "lv" - << "ly" - << "ma" - << "mc" - << "md" - << "me" - << "mf" - << "mg" - << "mh" - << "mk" - << "ml" - << "mm" - << "mn" - << "mo" - << "mp" - << "mq" - << "mr" - << "ms" - << "mt" - << "mu" - << "mv" - << "mw" - << "mx" - << "my" - << "mz" - << "na" - << "nc" - << "ne" - << "nf" - << "ng" - << "ni" - << "nl" - << "no" - << "np" - << "nr" - << "nu" - << "nz" - << "om" - << "pa" - << "pe" - << "pf" - << "pg" - << "ph" - << "pk" - << "pl" - << "pm" - << "pn" - << "pr" - << "ps" - << "pt" - << "pw" - << "py" - << "qa" - << "re" - << "ro" - << "rs" - << "ru" - << "rw" - << "sa" - << "sb" - << "sc" - << "sd" - << "se" - << "sg" - << "sh" - << "si" - << "sj" - << "sk" - << "sl" - << "sm" - << "sn" - << "so" - << "sr" - << "ss" - << "st" - << "sv" - << "sx" - << "sy" - << "sz" - << "tc" - << "td" - << "tf" - << "tg" - << "th" - << "tj" - << "tk" - << "tl" - << "tm" - << "tn" - << "to" - << "tr" - << "tt" - << "tv" - << "tw" - << "tz" - << "ua" - << "ug" - << "um" - << "us" - << "uy" - << "uz" - << "va" - << "vc" - << "ve" - << "vg" - << "vi" - << "vn" - << "vu" - << "wf" - << "ws" - << "xk" - << "ye" - << "yt" - << "za" - << "zm" - << "zw"; + static QStringList countries = + QStringList() << "ad" << "ae" << "af" << "ag" << "ai" << "al" << "am" << "ao" << "aq" << "ar" << "as" << "at" + << "au" << "aw" << "ax" << "az" << "ba" << "bb" << "bd" << "be" << "bf" << "bg" << "bh" << "bi" + << "bj" << "bl" << "bm" << "bn" << "bo" << "bq" << "br" << "bs" << "bt" << "bv" << "bw" << "by" + << "bz" << "ca" << "cc" << "cd" << "cf" << "cg" << "ch" << "ci" << "ck" << "cl" << "cm" << "cn" + << "co" << "cr" << "cu" << "cv" << "cw" << "cx" << "cy" << "cz" << "de" << "dj" << "dk" << "dm" + << "do" << "dz" << "ec" << "ee" << "eg" << "eh" << "er" << "es" << "et" << "eu" << "fi" << "fj" + << "fk" << "fm" << "fo" << "fr" << "ga" << "gb" << "gd" << "ge" << "gf" << "gg" << "gh" << "gi" + << "gl" << "gm" << "gn" << "gp" << "gq" << "gr" << "gs" << "gt" << "gu" << "gw" << "gy" << "hk" + << "hm" << "hn" << "hr" << "ht" << "hu" << "id" << "ie" << "il" << "im" << "in" << "io" << "iq" + << "ir" << "is" << "it" << "je" << "jm" << "jo" << "jp" << "ke" << "kg" << "kh" << "ki" << "km" + << "kn" << "kp" << "kr" << "kw" << "ky" << "kz" << "la" << "lb" << "lc" << "li" << "lk" << "lr" + << "ls" << "lt" << "lu" << "lv" << "ly" << "ma" << "mc" << "md" << "me" << "mf" << "mg" << "mh" + << "mk" << "ml" << "mm" << "mn" << "mo" << "mp" << "mq" << "mr" << "ms" << "mt" << "mu" << "mv" + << "mw" << "mx" << "my" << "mz" << "na" << "nc" << "ne" << "nf" << "ng" << "ni" << "nl" << "no" + << "np" << "nr" << "nu" << "nz" << "om" << "pa" << "pe" << "pf" << "pg" << "ph" << "pk" << "pl" + << "pm" << "pn" << "pr" << "ps" << "pt" << "pw" << "py" << "qa" << "re" << "ro" << "rs" << "ru" + << "rw" << "sa" << "sb" << "sc" << "sd" << "se" << "sg" << "sh" << "si" << "sj" << "sk" << "sl" + << "sm" << "sn" << "so" << "sr" << "ss" << "st" << "sv" << "sx" << "sy" << "sz" << "tc" << "td" + << "tf" << "tg" << "th" << "tj" << "tk" << "tl" << "tm" << "tn" << "to" << "tr" << "tt" << "tv" + << "tw" << "tz" << "ua" << "ug" << "um" << "us" << "uy" << "uz" << "va" << "vc" << "ve" << "vg" + << "vi" << "vn" << "vu" << "wf" << "ws" << "xk" << "ye" << "yt" << "za" << "zm" << "zw"; return countries; } @@ -1442,6 +1216,24 @@ void SettingsCache::setShareDecklistsOnLoad(const bool _shareDecklistsOnLoad) settings->setValue("game/sharedecklistsonload", shareDecklistsOnLoad); } +void SettingsCache::setEnableCommandZone(const bool _enableCommandZone) +{ + enableCommandZone = _enableCommandZone; + settings->setValue("game/enablecommandzone", enableCommandZone); +} + +void SettingsCache::setEnableCompanionZone(const bool _enableCompanionZone) +{ + enableCompanionZone = _enableCompanionZone; + settings->setValue("game/enablecompanionzone", enableCompanionZone); +} + +void SettingsCache::setEnableBackgroundZone(const bool _enableBackgroundZone) +{ + enableBackgroundZone = _enableBackgroundZone; + settings->setValue("game/enablebackgroundzone", enableBackgroundZone); +} + void SettingsCache::setCheckUpdatesOnStartup(QT_STATE_CHANGED_T value) { checkUpdatesOnStartup = static_cast(value); diff --git a/cockatrice/src/client/settings/cache_settings.h b/cockatrice/src/client/settings/cache_settings.h index 5c5054105..428d309a4 100644 --- a/cockatrice/src/client/settings/cache_settings.h +++ b/cockatrice/src/client/settings/cache_settings.h @@ -323,6 +323,9 @@ private: bool createGameAsSpectator; int defaultStartingLifeTotal; bool shareDecklistsOnLoad; + bool enableCommandZone; + bool enableCompanionZone; + bool enableBackgroundZone; int keepalive; int timeout; void translateLegacySettings(); @@ -854,6 +857,18 @@ public: { return shareDecklistsOnLoad; } + [[nodiscard]] bool getEnableCommandZone() const + { + return enableCommandZone; + } + [[nodiscard]] bool getEnableCompanionZone() const + { + return enableCompanionZone; + } + [[nodiscard]] bool getEnableBackgroundZone() const + { + return enableBackgroundZone; + } [[nodiscard]] bool getCreateGameAsSpectator() const { return createGameAsSpectator; @@ -1088,6 +1103,9 @@ public slots: void setCreateGameAsSpectator(const bool _createGameAsSpectator); void setDefaultStartingLifeTotal(const int _defaultStartingLifeTotal); void setShareDecklistsOnLoad(const bool _shareDecklistsOnLoad); + void setEnableCommandZone(const bool _enableCommandZone); + void setEnableCompanionZone(const bool _enableCompanionZone); + void setEnableBackgroundZone(const bool _enableBackgroundZone); void setRememberGameSettings(const bool _rememberGameSettings); void setCheckUpdatesOnStartup(QT_STATE_CHANGED_T value); void setStartupCardUpdateCheckPromptForUpdate(bool value); diff --git a/cockatrice/src/client/settings/shortcuts_settings.h b/cockatrice/src/client/settings/shortcuts_settings.h index 156ee82ea..e684aa3fd 100644 --- a/cockatrice/src/client/settings/shortcuts_settings.h +++ b/cockatrice/src/client/settings/shortcuts_settings.h @@ -422,6 +422,18 @@ private: {"Player/aSetCounter_storm", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Set Other Counters..."), parseSequenceString("Ctrl+\\"), ShortcutGroup::Player_Counters)}, + {"Player/aAddCommanderTax", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Commander Tax"), + parseSequenceString(""), + ShortcutGroup::Player_Counters)}, + {"Player/aRemoveCommanderTax", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Commander Tax"), + parseSequenceString(""), + ShortcutGroup::Player_Counters)}, + {"Player/aAddPartnerTax", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Add Partner Tax"), + parseSequenceString(""), + ShortcutGroup::Player_Counters)}, + {"Player/aRemovePartnerTax", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Remove Partner Tax"), + parseSequenceString(""), + ShortcutGroup::Player_Counters)}, {"Player/aIncrementAllCardCounters", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Increment all card counters"), parseSequenceString("Ctrl+Shift+A"), @@ -560,6 +572,21 @@ private: {"Player/aMoveToTopLibrary", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Top of Library"), parseSequenceString(""), ShortcutGroup::Move_selected)}, + {"Player/aMoveToCommandZone", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Command Zone"), + parseSequenceString(""), + ShortcutGroup::Move_selected)}, + {"Player/aMoveToPartnerZone", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Partner Zone"), + parseSequenceString(""), + ShortcutGroup::Move_selected)}, + {"Player/aMoveToCompanionZone", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Companion Zone"), + parseSequenceString(""), + ShortcutGroup::Move_selected)}, + {"Player/aMoveToBackgroundZone", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Background Zone"), + parseSequenceString(""), + ShortcutGroup::Move_selected)}, + {"Player/aMoveToTable", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Battlefield"), + parseSequenceString(""), + ShortcutGroup::Move_selected)}, {"Player/aPlayFacedown", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Battlefield, Face Down"), parseSequenceString(""), ShortcutGroup::Move_selected)}, @@ -586,6 +613,16 @@ private: {"Player/aCloseMostRecentZoneView", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Close Recent View"), parseSequenceString("Esc"), ShortcutGroup::View)}, + {"Player/aViewCommandZone", + ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Command Zone"), parseSequenceString(""), ShortcutGroup::View)}, + {"Player/aViewPartnerZone", + ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Partner Zone"), parseSequenceString(""), ShortcutGroup::View)}, + {"Player/aViewCompanionZone", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Companion Zone"), + parseSequenceString(""), + ShortcutGroup::View)}, + {"Player/aViewBackgroundZone", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Background Zone"), + parseSequenceString(""), + ShortcutGroup::View)}, {"Player/aMoveTopToPlay", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Stack"), parseSequenceString("Ctrl+Y"), ShortcutGroup::Move_top)}, @@ -715,6 +752,18 @@ private: {"Player/aResetLayout", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Reset Layout"), parseSequenceString(""), ShortcutGroup::Game_window)}, + {"Player/aTogglePartnerZoneVisibility", + ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Partner Zone Visibility"), + parseSequenceString(""), + ShortcutGroup::Game_window)}, + {"Player/aToggleCompanionZoneVisibility", + ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Companion Zone Visibility"), + parseSequenceString(""), + ShortcutGroup::Game_window)}, + {"Player/aToggleBackgroundZoneVisibility", + ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Background Zone Visibility"), + parseSequenceString(""), + ShortcutGroup::Game_window)}, {"DlgLoadDeckFromClipboard/refreshButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Refresh"), parseSequenceString("F5"), ShortcutGroup::Load_deck)}, diff --git a/cockatrice/src/game/log/message_log_widget.cpp b/cockatrice/src/game/log/message_log_widget.cpp index 1ff3e32ff..f4ca281df 100644 --- a/cockatrice/src/game/log/message_log_widget.cpp +++ b/cockatrice/src/game/log/message_log_widget.cpp @@ -6,20 +6,14 @@ #include "../board/translate_counter_name.h" #include "../phase.h" #include "../player/player.h" +#include "../zones/zone_names.h" #include <../../client/settings/card_counter_settings.h> +#include #include #include #include -static const QString TABLE_ZONE_NAME = "table"; -static const QString GRAVE_ZONE_NAME = "grave"; -static const QString EXILE_ZONE_NAME = "rfg"; -static const QString HAND_ZONE_NAME = "hand"; -static const QString DECK_ZONE_NAME = "deck"; -static const QString SIDEBOARD_ZONE_NAME = "sb"; -static const QString STACK_ZONE_NAME = "stack"; - static QString sanitizeHtml(QString dirty) { return dirty.replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """); @@ -37,15 +31,15 @@ MessageLogWidget::getFromStr(CardZoneLogic *zone, QString cardName, int position QString fromStr; QString zoneName = zone->getName(); - if (zoneName == TABLE_ZONE_NAME) { + if (zoneName == ZoneNames::TABLE) { fromStr = tr(" from play"); - } else if (zoneName == GRAVE_ZONE_NAME) { + } else if (zoneName == ZoneNames::GRAVE) { fromStr = tr(" from their graveyard"); - } else if (zoneName == EXILE_ZONE_NAME) { + } else if (zoneName == ZoneNames::EXILE) { fromStr = tr(" from exile"); - } else if (zoneName == HAND_ZONE_NAME) { + } else if (zoneName == ZoneNames::HAND) { fromStr = tr(" from their hand"); - } else if (zoneName == DECK_ZONE_NAME) { + } else if (zoneName == ZoneNames::DECK) { if (position == 0) { if (cardName.isEmpty()) { if (ownerChange) { @@ -83,10 +77,18 @@ MessageLogWidget::getFromStr(CardZoneLogic *zone, QString cardName, int position fromStr = tr(" from their library"); } } - } else if (zoneName == SIDEBOARD_ZONE_NAME) { + } else if (zoneName == ZoneNames::SIDEBOARD) { fromStr = tr(" from sideboard"); - } else if (zoneName == STACK_ZONE_NAME) { + } else if (zoneName == ZoneNames::STACK) { fromStr = tr(" from the stack"); + } else if (zoneName == ZoneNames::COMMAND) { + fromStr = tr(" from the command zone"); + } else if (zoneName == ZoneNames::PARTNER) { + fromStr = tr(" from the partner zone"); + } else if (zoneName == ZoneNames::COMPANION) { + fromStr = tr(" from the companion zone"); + } else if (zoneName == ZoneNames::BACKGROUND) { + fromStr = tr(" from the background zone"); } else { fromStr = tr(" from custom zone '%1'").arg(zoneName); } @@ -275,9 +277,9 @@ void MessageLogWidget::logMoveCard(Player *player, bool ownerChanged = startZone->getPlayer() != targetZone->getPlayer(); // do not log if moved within the same zone - if ((startZoneName == TABLE_ZONE_NAME && targetZoneName == TABLE_ZONE_NAME && !ownerChanged) || - (startZoneName == HAND_ZONE_NAME && targetZoneName == HAND_ZONE_NAME) || - (startZoneName == EXILE_ZONE_NAME && targetZoneName == EXILE_ZONE_NAME)) { + if ((startZoneName == ZoneNames::TABLE && targetZoneName == ZoneNames::TABLE && !ownerChanged) || + (startZoneName == ZoneNames::HAND && targetZoneName == ZoneNames::HAND) || + (startZoneName == ZoneNames::EXILE && targetZoneName == ZoneNames::EXILE)) { return; } @@ -306,20 +308,20 @@ void MessageLogWidget::logMoveCard(Player *player, QString finalStr; std::optional fourthArg; - if (targetZoneName == TABLE_ZONE_NAME) { + if (targetZoneName == ZoneNames::TABLE) { soundEngine->playSound("play_card"); if (card->getFaceDown()) { finalStr = tr("%1 puts %2 into play%3 face down."); } else { finalStr = tr("%1 puts %2 into play%3."); } - } else if (targetZoneName == GRAVE_ZONE_NAME) { + } else if (targetZoneName == ZoneNames::GRAVE) { finalStr = tr("%1 puts %2%3 into their graveyard."); - } else if (targetZoneName == EXILE_ZONE_NAME) { + } else if (targetZoneName == ZoneNames::EXILE) { finalStr = tr("%1 exiles %2%3."); - } else if (targetZoneName == HAND_ZONE_NAME) { + } else if (targetZoneName == ZoneNames::HAND) { finalStr = tr("%1 moves %2%3 to their hand."); - } else if (targetZoneName == DECK_ZONE_NAME) { + } else if (targetZoneName == ZoneNames::DECK) { if (newX == -1) { finalStr = tr("%1 puts %2%3 into their library."); } else if (newX >= targetZone->getCards().size()) { @@ -331,11 +333,19 @@ void MessageLogWidget::logMoveCard(Player *player, fourthArg = QString::number(newX); finalStr = tr("%1 puts %2%3 into their library %4 cards from the top."); } - } else if (targetZoneName == SIDEBOARD_ZONE_NAME) { + } else if (targetZoneName == ZoneNames::SIDEBOARD) { finalStr = tr("%1 moves %2%3 to sideboard."); - } else if (targetZoneName == STACK_ZONE_NAME) { + } else if (targetZoneName == ZoneNames::STACK) { soundEngine->playSound("play_card"); finalStr = tr("%1 plays %2%3."); + } else if (targetZoneName == ZoneNames::COMMAND) { + finalStr = tr("%1 moves %2%3 to the command zone."); + } else if (targetZoneName == ZoneNames::PARTNER) { + finalStr = tr("%1 moves %2%3 to the partner zone."); + } else if (targetZoneName == ZoneNames::COMPANION) { + finalStr = tr("%1 moves %2%3 to the companion zone."); + } else if (targetZoneName == ZoneNames::BACKGROUND) { + finalStr = tr("%1 moves %2%3 to the background zone."); } else { fourthArg = targetZoneName; finalStr = tr("%1 moves %2%3 to custom zone '%4'."); @@ -658,6 +668,20 @@ void MessageLogWidget::logSetCounter(Player *player, QString counterName, int va } QString counterDisplayName = TranslateCounterName::getDisplayName(counterName); + + // Special format for commander/partner tax (manual player action) + if (counterName == CounterNames::CommanderTax || counterName == CounterNames::PartnerTax) { + appendHtmlServerMessage( + tr("%1 sets %2 counter to %3 (%4%5).") + .arg(sanitizeHtml(player->getPlayerInfo()->getName())) + .arg(QString("%1").arg(sanitizeHtml(counterDisplayName))) + .arg(QString("%1").arg(value)) + .arg(value > oldValue ? "+" : "") + .arg(value - oldValue)); + return; + } + + // Generic counter format appendHtmlServerMessage(tr("%1 sets counter %2 to %3 (%4%5).") .arg(sanitizeHtml(player->getPlayerInfo()->getName())) .arg(QString("%1").arg(sanitizeHtml(counterDisplayName))) diff --git a/cockatrice/src/interface/theme_manager.cpp b/cockatrice/src/interface/theme_manager.cpp index 30c3a0974..0f17a2be2 100644 --- a/cockatrice/src/interface/theme_manager.cpp +++ b/cockatrice/src/interface/theme_manager.cpp @@ -25,10 +25,12 @@ #define PLAYERZONE_BG_NAME "playerzone" #define STACKZONE_BG_NAME "stackzone" #define TABLEZONE_BG_NAME "tablezone" +#define COMMANDZONE_BG_NAME "commandzone" static const QColor HANDZONE_BG_DEFAULT = QColor(80, 100, 50); static const QColor TABLEZONE_BG_DEFAULT = QColor(70, 50, 100); static const QColor PLAYERZONE_BG_DEFAULT = QColor(200, 200, 200); static const QColor STACKZONE_BG_DEFAULT = QColor(113, 43, 43); +static const QColor COMMANDZONE_BG_DEFAULT = QColor(75, 75, 120); static const QStringList DEFAULT_RESOURCE_PATHS = {":/resources"}; struct PaletteColorInfo @@ -356,6 +358,7 @@ void ThemeManager::themeChangedSlot() brushes[Role::Table] = TABLEZONE_BG_DEFAULT; brushes[Role::Player] = PLAYERZONE_BG_DEFAULT; brushes[Role::Stack] = STACKZONE_BG_DEFAULT; + brushes[Role::Command] = COMMANDZONE_BG_DEFAULT; } else { // resources QStringList resources; @@ -368,6 +371,7 @@ void ThemeManager::themeChangedSlot() brushes[Role::Table] = loadBrush(TABLEZONE_BG_NAME, TABLEZONE_BG_DEFAULT); brushes[Role::Player] = loadBrush(PLAYERZONE_BG_NAME, PLAYERZONE_BG_DEFAULT); brushes[Role::Stack] = loadBrush(STACKZONE_BG_NAME, STACKZONE_BG_DEFAULT); + brushes[Role::Command] = loadBrush(COMMANDZONE_BG_NAME, COMMANDZONE_BG_DEFAULT); } for (auto &brushCache : brushesCache) { brushCache.clear(); @@ -393,8 +397,12 @@ static QString roleBgName(ThemeManager::Role role) case ThemeManager::Table: return TABLEZONE_BG_NAME; + case ThemeManager::Command: + return COMMANDZONE_BG_NAME; + default: Q_ASSERT(false); + return {}; } } diff --git a/cockatrice/src/interface/theme_manager.h b/cockatrice/src/interface/theme_manager.h index 594ede2bf..0eb8d4786 100644 --- a/cockatrice/src/interface/theme_manager.h +++ b/cockatrice/src/interface/theme_manager.h @@ -36,7 +36,8 @@ public: Stack, Table, Player, - MaxRole = Player, + Command, + MaxRole = Command, }; private: diff --git a/cockatrice/themes/Fabric/zones/commandzone.png b/cockatrice/themes/Fabric/zones/commandzone.png new file mode 100644 index 000000000..e71f466e8 Binary files /dev/null and b/cockatrice/themes/Fabric/zones/commandzone.png differ diff --git a/cockatrice/themes/Leather/zones/commandzone.png b/cockatrice/themes/Leather/zones/commandzone.png new file mode 100644 index 000000000..8159dfaa0 Binary files /dev/null and b/cockatrice/themes/Leather/zones/commandzone.png differ diff --git a/cockatrice/themes/Plasma/zones/commandzone.png b/cockatrice/themes/Plasma/zones/commandzone.png new file mode 100644 index 000000000..115a0d613 Binary files /dev/null and b/cockatrice/themes/Plasma/zones/commandzone.png differ diff --git a/cockatrice/themes/VelvetMarble/zones/commandzone.jpg b/cockatrice/themes/VelvetMarble/zones/commandzone.jpg new file mode 100644 index 000000000..c76d35726 Binary files /dev/null and b/cockatrice/themes/VelvetMarble/zones/commandzone.jpg differ