Commit 40ea24c9 authored by feihuaduo's avatar feihuaduo
parents 65364feb afbb458f
...@@ -212,9 +212,15 @@ void DeckManager::GetCategoryPath(wchar_t* ret, int index, const wchar_t* text) ...@@ -212,9 +212,15 @@ void DeckManager::GetCategoryPath(wchar_t* ret, int index, const wchar_t* text)
void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) { void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) {
wchar_t filepath[256]; wchar_t filepath[256];
wchar_t catepath[256]; wchar_t catepath[256];
GetCategoryPath(catepath, cbCategory->getSelected(), cbCategory->getText()); wchar_t* deckname = (wchar_t*)cbDeck->getItem(cbDeck->getSelected());
myswprintf(filepath, L"%ls/%ls.ydk", catepath, cbDeck->getItem(cbDeck->getSelected())); if(deckname != NULL) {
BufferIO::CopyWStr(filepath, ret, 256); GetCategoryPath(catepath, cbCategory->getSelected(), cbCategory->getText());
myswprintf(filepath, L"%ls/%ls.ydk", catepath, deckname);
BufferIO::CopyWStr(filepath, ret, 256);
}
else {
BufferIO::CopyWStr(L"", ret, 256);
}
} }
bool DeckManager::LoadDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) { bool DeckManager::LoadDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGUIComboBox* cbDeck) {
wchar_t filepath[256]; wchar_t filepath[256];
......
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