Commit 43370617 authored by 独孤朲's avatar 独孤朲 Committed by GitHub

Merge pull request #1906 from mercury233/patch-2

update announce card dialog
parents f1a7cfe6 038930e5
......@@ -1500,8 +1500,13 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings
//datas.alias can be double card names or alias
if(is_declarable(cp->second, declarable_type)) {
mainGame->lstANCard->addItem(cit->second.name);
ancard.push_back(cit->first);
if(wcscmp(pname, cit->second.name) == 0) { //exact match
mainGame->lstANCard->insertItem(0, cit->second.name, -1);
ancard.insert(ancard.begin(), cit->first);
} else {
mainGame->lstANCard->addItem(cit->second.name);
ancard.push_back(cit->first);
}
}
}
}
......@@ -1527,8 +1532,13 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings
//datas.alias can be double card names or alias
if(is_declarable(cp->second, opcode)) {
mainGame->lstANCard->addItem(cit->second.name);
ancard.push_back(cit->first);
if(wcscmp(pname, cit->second.name) == 0) { //exact match
mainGame->lstANCard->insertItem(0, cit->second.name, -1);
ancard.insert(ancard.begin(), cit->first);
} else {
mainGame->lstANCard->addItem(cit->second.name);
ancard.push_back(cit->first);
}
}
}
}
......
......@@ -891,6 +891,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
break;
}
case LISTBOX_ANCARD: {
int sel = mainGame->lstANCard->getSelected();
if(sel != -1) {
mainGame->ShowCardInfo(ancard[sel]);
}
break;
}
}
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