Commit 2355394b authored by fallenstardust's avatar fallenstardust

判断非cbDBCategory时bool is_packlist直接为false

修改提示文本
parent c105a2f0
...@@ -255,20 +255,16 @@ void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory, ...@@ -255,20 +255,16 @@ void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory,
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];
GetDeckFile(filepath, cbCategory, cbDeck); GetDeckFile(filepath, cbCategory, cbDeck);
bool is_packlist = cbCategory->getSelected() == 0; bool is_packlist = cbCategory == mainGame->cbDBCategory ? (cbCategory->getSelected() == 0) : false;
bool res = LoadDeck(filepath, is_packlist); bool res = LoadDeck(filepath, is_packlist);
if(res && mainGame->is_building) if(res && mainGame->is_building)
mainGame->deckBuilder.RefreshPackListScroll(); mainGame->deckBuilder.RefreshPackListScroll();
return res; return res;
} }
FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) { FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) {
#ifdef WIN32
FILE* fp = _wfopen(file, (wchar_t*)mode);
#else
char file2[256]; char file2[256];
BufferIO::EncodeUTF8(file, file2); BufferIO::EncodeUTF8(file, file2);
FILE* fp = fopen(file2, mode); FILE* fp = fopen(file2, mode);
#endif
return fp; return fp;
} }
IReadFile* DeckManager::OpenDeckReader(const wchar_t* file) { IReadFile* DeckManager::OpenDeckReader(const wchar_t* file) {
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<string name="deck_share_head">卡组分享来源YGOMobile</string> <string name="deck_share_head">卡组分享来源YGOMobile</string>
<string name="deck_share_fail">卡组分享失败</string> <string name="deck_share_fail">卡组分享失败</string>
<string name="choose_game_path">选择游戏目录</string> <string name="choose_game_path">选择游戏目录</string>
<string name="download_home">网盘下载</string> <string name="download_home">官网下载</string>
<string name="reset_game_res">重置资源</string> <string name="reset_game_res">重置资源</string>
<string name="downloading_images">上次任务正在停止,请稍后再试</string> <string name="downloading_images">上次任务正在停止,请稍后再试</string>
<string name="download_image_progress" formatted="false">正在下载卡图 %d/%d</string> <string name="download_image_progress" formatted="false">正在下载卡图 %d/%d</string>
......
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