Commit da3ade32 authored by Zach's avatar Zach
Browse files

Merge pull request #1264 from ZeldaZach/color_popup

Add colors to popup
parents 97acbbfd d956a1d3
...@@ -39,6 +39,9 @@ CardInfoWidget::CardInfoWidget(ResizeMode _mode, const QString &cardName, QWidge ...@@ -39,6 +39,9 @@ CardInfoWidget::CardInfoWidget(ResizeMode _mode, const QString &cardName, QWidge
manacostLabel1 = new QLabel; manacostLabel1 = new QLabel;
manacostLabel2 = new QLabel; manacostLabel2 = new QLabel;
manacostLabel2->setWordWrap(true); manacostLabel2->setWordWrap(true);
colorLabel1 = new QLabel;
colorLabel2 = new QLabel;
colorLabel2->setWordWrap(true);
cardtypeLabel1 = new QLabel; cardtypeLabel1 = new QLabel;
cardtypeLabel2 = new QLabel; cardtypeLabel2 = new QLabel;
cardtypeLabel2->setWordWrap(true); cardtypeLabel2->setWordWrap(true);
...@@ -59,6 +62,8 @@ CardInfoWidget::CardInfoWidget(ResizeMode _mode, const QString &cardName, QWidge ...@@ -59,6 +62,8 @@ CardInfoWidget::CardInfoWidget(ResizeMode _mode, const QString &cardName, QWidge
grid->addWidget(nameLabel2, row++, 1); grid->addWidget(nameLabel2, row++, 1);
grid->addWidget(manacostLabel1, row, 0); grid->addWidget(manacostLabel1, row, 0);
grid->addWidget(manacostLabel2, row++, 1); grid->addWidget(manacostLabel2, row++, 1);
grid->addWidget(colorLabel1, row, 0);
grid->addWidget(colorLabel2, row++, 1);
grid->addWidget(cardtypeLabel1, row, 0); grid->addWidget(cardtypeLabel1, row, 0);
grid->addWidget(cardtypeLabel2, row++, 1); grid->addWidget(cardtypeLabel2, row++, 1);
grid->addWidget(powtoughLabel1, row, 0); grid->addWidget(powtoughLabel1, row, 0);
...@@ -117,6 +122,8 @@ void CardInfoWidget::setMinimized(int _minimized) ...@@ -117,6 +122,8 @@ void CardInfoWidget::setMinimized(int _minimized)
nameLabel2->setVisible(showAll); nameLabel2->setVisible(showAll);
manacostLabel1->setVisible(showAll); manacostLabel1->setVisible(showAll);
manacostLabel2->setVisible(showAll); manacostLabel2->setVisible(showAll);
colorLabel1->setVisible(showAll);
colorLabel2->setVisible(showAll);
cardtypeLabel1->setVisible(showAll); cardtypeLabel1->setVisible(showAll);
cardtypeLabel2->setVisible(showAll); cardtypeLabel2->setVisible(showAll);
powtoughLabel1->setVisible(showPowTough); powtoughLabel1->setVisible(showPowTough);
...@@ -153,6 +160,7 @@ void CardInfoWidget::setCard(CardInfo *card) ...@@ -153,6 +160,7 @@ void CardInfoWidget::setCard(CardInfo *card)
updatePixmap(); updatePixmap();
nameLabel2->setText(card->getName()); nameLabel2->setText(card->getName());
manacostLabel2->setText(card->getManaCost()); manacostLabel2->setText(card->getManaCost());
colorLabel2->setText(card->getColors().join(""));
cardtypeLabel2->setText(card->getCardType()); cardtypeLabel2->setText(card->getCardType());
powtoughLabel2->setText(card->getPowTough()); powtoughLabel2->setText(card->getPowTough());
loyaltyLabel2->setText(card->getLoyalty() > 0 ? QString::number(card->getLoyalty()) : QString()); loyaltyLabel2->setText(card->getLoyalty() > 0 ? QString::number(card->getLoyalty()) : QString());
...@@ -200,6 +208,7 @@ void CardInfoWidget::retranslateUi() ...@@ -200,6 +208,7 @@ void CardInfoWidget::retranslateUi()
{ {
nameLabel1->setText(tr("Name:")); nameLabel1->setText(tr("Name:"));
manacostLabel1->setText(tr("Mana cost:")); manacostLabel1->setText(tr("Mana cost:"));
colorLabel1->setText(tr("Color(s):"));
cardtypeLabel1->setText(tr("Card type:")); cardtypeLabel1->setText(tr("Card type:"));
powtoughLabel1->setText(tr("P / T:")); powtoughLabel1->setText(tr("P / T:"));
loyaltyLabel1->setText(tr("Loyalty:")); loyaltyLabel1->setText(tr("Loyalty:"));
......
...@@ -31,6 +31,7 @@ private: ...@@ -31,6 +31,7 @@ private:
QLabel *cardPicture; QLabel *cardPicture;
QLabel *nameLabel1, *nameLabel2; QLabel *nameLabel1, *nameLabel2;
QLabel *manacostLabel1, *manacostLabel2; QLabel *manacostLabel1, *manacostLabel2;
QLabel *colorLabel1, *colorLabel2;
QLabel *cardtypeLabel1, *cardtypeLabel2; QLabel *cardtypeLabel1, *cardtypeLabel2;
QLabel *powtoughLabel1, *powtoughLabel2; QLabel *powtoughLabel1, *powtoughLabel2;
QLabel *loyaltyLabel1, *loyaltyLabel2; QLabel *loyaltyLabel1, *loyaltyLabel2;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment