mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
doubleclick on cards in hand
This commit is contained in:
parent
9749423d62
commit
44c64322d3
8 changed files with 91 additions and 15 deletions
|
|
@ -104,6 +104,18 @@ QString CardInfo::getMainCardType() const
|
|||
return result;
|
||||
}
|
||||
|
||||
int CardInfo::getTableRow() const
|
||||
{
|
||||
QString mainCardType = getMainCardType();
|
||||
if (mainCardType == "Land")
|
||||
return 0;
|
||||
if ((mainCardType == "Sorcery") || (mainCardType == "Instant"))
|
||||
return 2;
|
||||
if (mainCardType == "Creature")
|
||||
return 3;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void CardInfo::addToSet(CardSet *set)
|
||||
{
|
||||
set->append(this);
|
||||
|
|
@ -337,7 +349,6 @@ int CardDatabase::loadFromFile(const QString &fileName)
|
|||
|
||||
clear();
|
||||
setHash.reserve(setCount);
|
||||
qDebug(QString("setCount = %1").arg(setCount).toLatin1());
|
||||
for (unsigned int i = 0; i < setCount; i++) {
|
||||
CardSet *newSet = new CardSet;
|
||||
newSet->loadFromStream(in);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue