Commit aef0b12a authored by sidschingis's avatar sidschingis

retain selection when scrolling

Fixed overwriting the text when scrolling while in the middle of a
selection
parent 16a98132
......@@ -720,8 +720,16 @@ 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));
myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(selectable_cards[i + pos]->location),
selectable_cards[i + pos]->sequence + 1);
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 + 1);
}
mainGame->stCardPos[i]->setText(formatBuffer);
if(selectable_cards[i + pos]->is_selected)
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
......
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