Commit 038930e5 authored by mercury233's avatar mercury233

update announce card dialog

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