mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 17:44:48 -07:00
Improve sets handling
Move the “check unknown sets” method inside the cards database, so that it can be executed when the card database gets reloaded after a card database update. Additionally, show the user a welcome message the first time they run a new cockatrice version, so that they know why they get shown the “edit sets” window and how to hide/disable sets.
This commit is contained in:
parent
c356a6fc48
commit
66adeb6d75
4 changed files with 59 additions and 35 deletions
|
|
@ -232,12 +232,14 @@ protected:
|
|||
QThread *pictureLoaderThread;
|
||||
PictureLoader *pictureLoader;
|
||||
LoadStatus loadStatus;
|
||||
bool detectedFirstRun;
|
||||
private:
|
||||
static const int versionNeeded;
|
||||
void loadCardsFromXml(QXmlStreamReader &xml, bool tokens);
|
||||
void loadSetsFromXml(QXmlStreamReader &xml);
|
||||
|
||||
CardInfo *getCardFromMap(CardNameMap &cardMap, const QString &cardName, bool createIfNotFound);
|
||||
void checkUnknownSets();
|
||||
public:
|
||||
static const char* TOKENS_SETNAME;
|
||||
|
||||
|
|
@ -265,6 +267,7 @@ public:
|
|||
bool getLoadSuccess() const { return loadStatus == Ok; }
|
||||
void cacheCardPixmaps(const QStringList &cardNames);
|
||||
void loadImage(CardInfo *card);
|
||||
bool hasDetectedFirstRun();
|
||||
public slots:
|
||||
void clearPixmapCache();
|
||||
LoadStatus loadCardDatabase(const QString &path, bool tokens = false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue