Commit 3ef790bf authored by salix5's avatar salix5

fix MSG_SORT_CARD

parent d1513dc7
......@@ -445,7 +445,8 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame->stCardPos[i]->setOverrideColor(0xff0000ff);
if(selectable_cards[i]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else if(selectable_cards[i]->location == LOCATION_DECK || selectable_cards[i]->location == LOCATION_EXTRA || selectable_cards[i]->location == LOCATION_REMOVED) {
if(selectable_cards[i]->position & POS_FACEDOWN)
mainGame->stCardPos[i]->setOverrideColor(0xff0000ff);
......@@ -465,7 +466,8 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
wchar_t formatBuffer[2048];
myswprintf(formatBuffer, L"%d", sort_list[i]);
mainGame->stCardPos[i]->setText(formatBuffer);
} else mainGame->stCardPos[i]->setText(L"");
} else
mainGame->stCardPos[i]->setText(L"");
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
}
mainGame->stCardPos[i]->setVisible(true);
......
......@@ -881,8 +881,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->btnCardSelect[i]->setRelativePosition(rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225));
// text
wchar_t formatBuffer[2048];
if(sort_list.size()) {
if(sort_list[pos + i] > 0)
if(mainGame->dInfo.curMsg == MSG_SORT_CARD) {
if(sort_list[pos + i])
myswprintf(formatBuffer, L"%d", sort_list[pos + i]);
else
myswprintf(formatBuffer, L"");
......@@ -2541,6 +2541,7 @@ void ClientField::CancelOrFinish() {
if(mainGame->wCardSelect->isVisible()) {
DuelClient::SetResponseI(-1);
mainGame->HideElement(mainGame->wCardSelect, true);
sort_list.clear();
}
break;
}
......
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