mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Reimplemented PictureLoader as a singleton
* Removed remaining picture handling from card database and cardinfo * removed the “noCard object” hack
This commit is contained in:
parent
8125358052
commit
f6c7f3355f
20 changed files with 654 additions and 704 deletions
|
|
@ -53,13 +53,23 @@ CardInfoText::CardInfoText(QWidget *parent)
|
|||
|
||||
void CardInfoText::setCard(CardInfo *card)
|
||||
{
|
||||
nameLabel2->setText(card->getName());
|
||||
manacostLabel2->setText(card->getManaCost());
|
||||
colorLabel2->setText(card->getColors().join(""));
|
||||
cardtypeLabel2->setText(card->getCardType());
|
||||
powtoughLabel2->setText(card->getPowTough());
|
||||
loyaltyLabel2->setText(card->getLoyalty() > 0 ? QString::number(card->getLoyalty()) : QString());
|
||||
textLabel->setText(card->getText());
|
||||
if(card) {
|
||||
nameLabel2->setText(card->getName());
|
||||
manacostLabel2->setText(card->getManaCost());
|
||||
colorLabel2->setText(card->getColors().join(""));
|
||||
cardtypeLabel2->setText(card->getCardType());
|
||||
powtoughLabel2->setText(card->getPowTough());
|
||||
loyaltyLabel2->setText(card->getLoyalty() > 0 ? QString::number(card->getLoyalty()) : QString());
|
||||
textLabel->setText(card->getText());
|
||||
} else {
|
||||
nameLabel2->setText("");
|
||||
manacostLabel2->setText("");
|
||||
colorLabel2->setText("");
|
||||
cardtypeLabel2->setText("");
|
||||
powtoughLabel2->setText("");
|
||||
loyaltyLabel2->setText("");
|
||||
textLabel->setText("");
|
||||
}
|
||||
}
|
||||
|
||||
void CardInfoText::retranslateUi()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue