Commit 11c4309c authored by mercury233's avatar mercury233 Committed by GitHub

use ClearCardInfo in ClearTextures (#2435)

parent 7b2072c9
...@@ -1514,7 +1514,6 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1514,7 +1514,6 @@ void Game::ShowCardInfo(int code, bool resize) {
if(!dataManager.GetData(code, &cd)) if(!dataManager.GetData(code, &cd))
memset(&cd, 0, sizeof(CardData)); memset(&cd, 0, sizeof(CardData));
imgCard->setImage(imageManager.GetTexture(code, true)); imgCard->setImage(imageManager.GetTexture(code, true));
imgCard->setScaleImage(true);
if(cd.alias != 0 && (cd.alias - code < CARD_ARTWORK_VERSIONS_OFFSET || code - cd.alias < CARD_ARTWORK_VERSIONS_OFFSET)) if(cd.alias != 0 && (cd.alias - code < CARD_ARTWORK_VERSIONS_OFFSET || code - cd.alias < CARD_ARTWORK_VERSIONS_OFFSET))
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias); myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias);
else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
...@@ -1688,9 +1687,7 @@ void Game::ErrorLog(const char* msg) { ...@@ -1688,9 +1687,7 @@ void Game::ErrorLog(const char* msg) {
} }
void Game::ClearTextures() { void Game::ClearTextures() {
matManager.mCard.setTexture(0, 0); matManager.mCard.setTexture(0, 0);
imgCard->setImage(imageManager.tCover[0]); ClearCardInfo(0);
scrCardText->setVisible(false);
imgCard->setScaleImage(true);
btnPSAU->setImage(); btnPSAU->setImage();
btnPSDU->setImage(); btnPSDU->setImage();
for(int i=0; i<=4; ++i) { for(int i=0; i<=4; ++i) {
......
Markdown is supported
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