Commit 038930e5 authored by mercury233's avatar mercury233

update announce card dialog

parent 6063e83d
......@@ -1500,11 +1500,16 @@ 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)) {
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);
}
}
}
}
}
void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
const wchar_t* pname = mainGame->ebANCard->getText();
......@@ -1527,11 +1532,16 @@ 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)) {
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);
}
}
}
}
}
void ClientField::UpdateDeclarableCode(bool enter) {
if(opcode.size() == 0)
......
......@@ -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