Commit 838d039e authored by DailyShana's avatar DailyShana

fix showing selectable cards when scroll bar changed

parent 3f1414f0
......@@ -733,15 +733,21 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
mainGame->btnCardSelect[i]->setImage(imageManager.tCover);
mainGame->btnCardSelect[i]->setRelativePosition(rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225));
if (sort_list.size()){
if (sort_list[pos + i]> 0)
if(sort_list.size()) {
if(sort_list[pos + i] > 0)
myswprintf(formatBuffer, L"%d", sort_list[pos + i]);
else
myswprintf(formatBuffer, L"");
}
else{
myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i + pos]->location,
selectable_cards[i + pos]->sequence), selectable_cards[i + pos]->sequence + 1);
} else {
if(selectable_cards[i + pos]->is_conti)
myswprintf(formatBuffer, L"%ls", DataManager::unknown_string);
else if(selectable_cards[i + pos]->location == LOCATION_OVERLAY)
myswprintf(formatBuffer, L"%ls[%d]",
dataManager.FormatLocation(selectable_cards[i + pos]->overlayTarget->location, selectable_cards[i + pos]->overlayTarget->sequence),
selectable_cards[i + pos]->overlayTarget->sequence + 1);
else
myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i + pos]->location, selectable_cards[i + pos]->sequence),
selectable_cards[i + pos]->sequence + 1);
}
mainGame->stCardPos[i]->setText(formatBuffer);
if(selectable_cards[i + pos]->is_selected)
......
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