mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
[DeckEditor] Add a prompt for commanderSpellbook integration
Took 2 hours 20 minutes Took 5 seconds
This commit is contained in:
parent
9759cdd07f
commit
a3de2dfd46
6 changed files with 286 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "cache_settings.h"
|
||||
|
||||
#include "../../interface/widgets/dialogs/dlg_settings.h"
|
||||
#include "../network/update/client/release_channel.h"
|
||||
#include "card_counter_settings.h"
|
||||
#include "version_string.h"
|
||||
|
|
@ -303,6 +304,14 @@ SettingsCache::SettingsCache()
|
|||
deckEditorBannerCardComboBoxVisible =
|
||||
settings->value("interface/deckeditorbannercardcomboboxvisible", true).toBool();
|
||||
deckEditorTagsWidgetVisible = settings->value("interface/deckeditortagswidgetvisible", true).toBool();
|
||||
deckEditorCommanderSpellbookIntegrationEnabled =
|
||||
settings
|
||||
->value("interface/deck_editor/commander_spellbook_integration/enabled",
|
||||
deckEditorCommanderSpellbookIntegrationEnabledIndexUnprompted)
|
||||
.toInt();
|
||||
deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames =
|
||||
settings->value("interface/deck_editor/commander_spellbook_integration/use_official_bracket_names", false)
|
||||
.toBool();
|
||||
visualDeckStorageCardSize = settings->value("interface/visualdeckstoragecardsize", 100).toInt();
|
||||
visualDeckStorageSortingOrder = settings->value("interface/visualdeckstoragesortingorder", 0).toInt();
|
||||
visualDeckStorageShowFolders = settings->value("interface/visualdeckstorageshowfolders", true).toBool();
|
||||
|
|
@ -798,6 +807,26 @@ void SettingsCache::setDeckEditorTagsWidgetVisible(QT_STATE_CHANGED_T _deckEdito
|
|||
emit deckEditorTagsWidgetVisibleChanged(deckEditorTagsWidgetVisible);
|
||||
}
|
||||
|
||||
void SettingsCache::setDeckEditorCommanderSpellbookIntegrationEnabled(
|
||||
int _deckEditorCommanderSpellbookIntegrationEnabled)
|
||||
{
|
||||
deckEditorCommanderSpellbookIntegrationEnabled = _deckEditorCommanderSpellbookIntegrationEnabled;
|
||||
settings->setValue("interface/deck_editor/commander_spellbook_integration/enabled",
|
||||
deckEditorCommanderSpellbookIntegrationEnabled);
|
||||
emit deckEditorCommanderSpellbookIntegrationEnabledChanged(deckEditorCommanderSpellbookIntegrationEnabled);
|
||||
}
|
||||
|
||||
void SettingsCache::setDeckEditorCommanderSpellbookIntegrationUseOfficialBracketNames(
|
||||
bool _deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames)
|
||||
{
|
||||
deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames =
|
||||
_deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames;
|
||||
settings->setValue("interface/deck_editor/commander_spellbook_integration/use_official_bracket_names",
|
||||
deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames);
|
||||
emit deckEditorCommanderSpellbookIntegrationUseOfficialBracketNamesChanged(
|
||||
deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames);
|
||||
}
|
||||
|
||||
void SettingsCache::setVisualDeckStorageSortingOrder(int _visualDeckStorageSortingOrder)
|
||||
{
|
||||
visualDeckStorageSortingOrder = _visualDeckStorageSortingOrder;
|
||||
|
|
|
|||
|
|
@ -156,6 +156,8 @@ signals:
|
|||
void printingSelectorNavigationButtonsVisibleChanged();
|
||||
void deckEditorBannerCardComboBoxVisibleChanged(bool _visible);
|
||||
void deckEditorTagsWidgetVisibleChanged(bool _visible);
|
||||
void deckEditorCommanderSpellbookIntegrationEnabledChanged(int _enabled);
|
||||
void deckEditorCommanderSpellbookIntegrationUseOfficialBracketNamesChanged(bool _useOfficialBracketNames);
|
||||
void visualDeckStorageShowTagFilterChanged(bool _visible);
|
||||
void visualDeckStorageDefaultTagsListChanged();
|
||||
void visualDeckStorageShowColorIdentityChanged(bool _visible);
|
||||
|
|
@ -250,6 +252,8 @@ private:
|
|||
bool printingSelectorNavigationButtonsVisible;
|
||||
bool deckEditorBannerCardComboBoxVisible;
|
||||
bool deckEditorTagsWidgetVisible;
|
||||
int deckEditorCommanderSpellbookIntegrationEnabled;
|
||||
bool deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames;
|
||||
int visualDeckStorageSortingOrder;
|
||||
bool visualDeckStorageShowFolders;
|
||||
bool visualDeckStorageShowColorIdentity;
|
||||
|
|
@ -723,6 +727,14 @@ public:
|
|||
{
|
||||
return openDeckInNewTab;
|
||||
}
|
||||
[[nodiscard]] int getDeckEditorCommanderSpellbookIntegrationEnabled() const
|
||||
{
|
||||
return deckEditorCommanderSpellbookIntegrationEnabled;
|
||||
}
|
||||
[[nodiscard]] bool getDeckEditorCommanderSpellbookIntegrationUseOfficialBracketNames() const
|
||||
{
|
||||
return deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames;
|
||||
}
|
||||
[[nodiscard]] int getRewindBufferingMs() const
|
||||
{
|
||||
return rewindBufferingMs;
|
||||
|
|
@ -1046,6 +1058,9 @@ public slots:
|
|||
void setPrintingSelectorNavigationButtonsVisible(QT_STATE_CHANGED_T _navigationButtonsVisible);
|
||||
void setDeckEditorBannerCardComboBoxVisible(QT_STATE_CHANGED_T _deckEditorBannerCardComboBoxVisible);
|
||||
void setDeckEditorTagsWidgetVisible(QT_STATE_CHANGED_T _deckEditorTagsWidgetVisible);
|
||||
void setDeckEditorCommanderSpellbookIntegrationEnabled(int _deckEditorCommanderSpellbookIntegrationEnabled);
|
||||
void setDeckEditorCommanderSpellbookIntegrationUseOfficialBracketNames(
|
||||
bool _deckEditorCommanderSpellbookIntegrationUseOfficialBracketNames);
|
||||
void setVisualDeckStorageSortingOrder(int _visualDeckStorageSortingOrder);
|
||||
void setVisualDeckStorageShowFolders(QT_STATE_CHANGED_T value);
|
||||
void setVisualDeckStorageShowTagFilter(QT_STATE_CHANGED_T _showTags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue