Commit 12e6099d authored by fallenstardust's avatar fallenstardust

ygopro添加保存和获取最后genesys卡表的功能

读取genesys禁卡表存入_genesys_lflist
parent e2f3bbec
This diff is collapsed.
......@@ -735,7 +735,7 @@ bool Game::Initialize(ANDROID_APP app, irr::android::InitOptions *options) {
cbGenesysLFlist = irr::gui::CAndroidGUIComboBox::addAndroidComboBox(env, Resize(posX + 110, posY, posX + 230, posY + 30), wSettings, COMBOBOX_LFLIST);
cbGenesysLFlist->setMaxSelectionRows(6);
for(unsigned int i = 0; i < deckManager._genesys_lfList.size(); ++i) {
cbLFlist->addItem(deckManager._genesys_lfList[i].listName.c_str());
cbGenesysLFlist->addItem(deckManager._genesys_lfList[i].listName.c_str());
if(!wcscmp(deckManager._genesys_lfList[i].listName.c_str(), gameConf.last_genesys_limit_list_name)) {//找到名称相同时找到对应的index值作为默认值
gameConf.default_genesys_lflist = i;
}
......@@ -2031,6 +2031,9 @@ void Game::LoadConfig() {
// 获取 lastLimit 值并存储到 gameConf.last_limit_list_name
BufferIO::DecodeUTF8(irr::android::getLastLimit(appMain).c_str(), wstr);
BufferIO::CopyWStr(wstr, gameConf.last_limit_list_name, 64);
// 获取 lastGenesysLimit 值并存储到 gameConf.last_genesys_limit_list_name
BufferIO::DecodeUTF8(irr::android::getLastGenesysLimit(appMain).c_str(), wstr);
BufferIO::CopyWStr(wstr, gameConf.last_genesys_limit_list_name, 64);
ALOGW("cc game: lastLimit: %ls", wstr);
// 获取 lastCategory 值并存储到 gameConf.lastcategory
BufferIO::DecodeUTF8(irr::android::getLastCategory(appMain).c_str(), wstr);;
......
......@@ -414,6 +414,9 @@ float getYScale(ANDROID_APP app){
irr::io::path getLastLimit(ANDROID_APP app) {
return getSetting(app, "lastlimit");
}
irr::io::path getLastGenesysLimit(ANDROID_APP app) {
return getSetting(app, "lastGenesysLimit");
}
//Retrive last deck name.
irr::io::path getLastDeck(ANDROID_APP app) {
......@@ -506,6 +509,9 @@ irr::io::path getSetting(ANDROID_APP app, const char* key) {
void setLastLimit(ANDROID_APP app, const char* limitname) {
saveSetting(app, "lastlimit", limitname);
}
void setLastGenesysLimit(ANDROID_APP app, const char* limitname) {
saveSetting(app, "lastGenesysLimit", limitname);
}
//save last deck name.
void setLastDeck(ANDROID_APP app, const char* deckname) {
......
......@@ -161,6 +161,7 @@ extern irr::io::path getFontPath(ANDROID_APP app);
//Retrive last limit name.
extern irr::io::path getLastLimit(ANDROID_APP app);
extern irr::io::path getLastGenesysLimit(ANDROID_APP app);
//Retrive last deck name.
extern irr::io::path getLastDeck(ANDROID_APP app);
......@@ -174,6 +175,7 @@ extern irr::io::path getSetting(ANDROID_APP app, const char* key);
//save last limit name.
extern void setLastLimit(ANDROID_APP app, const char* limitname);
extern void setLastGenesysLimit(ANDROID_APP app, const char* limitname);
//save last deck name.
extern void setLastDeck(ANDROID_APP app, const char* deckname);
......
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