mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-11 20:43:25 -08:00
[DeckEditor] Show card counts in Visual Deck Editor banners (#7339)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
7a41dfe175
commit
71ef36374d
10 changed files with 108 additions and 13 deletions
|
|
@ -90,6 +90,11 @@ int CardsDisplaySettings::getVisualDeckEditorCardSize() const
|
|||
return getValue("visualDeckEditor", "cards", "cardSize", 100).toInt();
|
||||
}
|
||||
|
||||
bool CardsDisplaySettings::getVisualDeckEditorShowCardCounts() const
|
||||
{
|
||||
return getValue("visualDeckEditorShowCardCounts", QString(), QString(), true).toBool();
|
||||
}
|
||||
|
||||
int CardsDisplaySettings::getEDHRecCardSize() const
|
||||
{
|
||||
return getValue("edhrec", "cards", "cardSize", 100).toInt();
|
||||
|
|
@ -217,6 +222,15 @@ void CardsDisplaySettings::setVisualDeckEditorCardSize(int _cardSize)
|
|||
emit visualDeckEditorCardSizeChanged();
|
||||
}
|
||||
|
||||
void CardsDisplaySettings::setVisualDeckEditorShowCardCounts(bool _showCardCounts)
|
||||
{
|
||||
if (_showCardCounts == getVisualDeckEditorShowCardCounts()) {
|
||||
return;
|
||||
}
|
||||
setValue(_showCardCounts, "visualDeckEditorShowCardCounts");
|
||||
emit visualDeckEditorShowCardCountsChanged(_showCardCounts);
|
||||
}
|
||||
|
||||
void CardsDisplaySettings::setEDHRecCardSize(int _edhrecCardSize)
|
||||
{
|
||||
setValue(_edhrecCardSize, "edhrec", "cards", "cardSize");
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public:
|
|||
[[nodiscard]] int getVisualDeckStorageCardSize() const override;
|
||||
[[nodiscard]] int getVisualDatabaseDisplayCardSize() const override;
|
||||
[[nodiscard]] int getVisualDeckEditorCardSize() const override;
|
||||
[[nodiscard]] bool getVisualDeckEditorShowCardCounts() const override;
|
||||
[[nodiscard]] int getEDHRecCardSize() const override;
|
||||
[[nodiscard]] int getArchidektPreviewSize() const override;
|
||||
[[nodiscard]] int getSampleHandSize() const override;
|
||||
|
|
@ -52,6 +53,7 @@ public:
|
|||
void setVisualDeckStorageCardSize(int _cardSize);
|
||||
void setVisualDatabaseDisplayCardSize(int _cardSize);
|
||||
void setVisualDeckEditorCardSize(int _cardSize);
|
||||
void setVisualDeckEditorShowCardCounts(bool _showCardCounts);
|
||||
void setEDHRecCardSize(int _edhrecCardSize);
|
||||
void setArchidektPreviewCardSize(int _archidektPreviewCardSize);
|
||||
void setSampleHandSize(int _sampleHandSize);
|
||||
|
|
@ -70,6 +72,7 @@ signals:
|
|||
void visualDeckStorageCardSizeChanged();
|
||||
void visualDatabaseDisplayCardSizeChanged();
|
||||
void visualDeckEditorCardSizeChanged();
|
||||
void visualDeckEditorShowCardCountsChanged(bool showCardCounts);
|
||||
void edhRecCardSizeChanged();
|
||||
void archidektPreviewSizeChanged();
|
||||
void sampleHandSizeChanged(int amount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue