Commit 26d7f2fe authored by mercury233's avatar mercury233 Committed by GitHub

add chkDefaultShowChain (#2456)

parent 71712066
......@@ -601,6 +601,11 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->btnShuffle->setVisible(false);
if(!mainGame->chkIgnore1->isChecked())
mainGame->wChat->setVisible(true);
if(mainGame->chkDefaultShowChain->isChecked()) {
mainGame->always_chain = true;
mainGame->ignore_chain = false;
mainGame->chain_when_avail = false;
}
mainGame->device->setEventReceiver(&mainGame->dField);
if(!mainGame->dInfo.isTag) {
if(selftype > 1) {
......
......@@ -368,6 +368,9 @@ bool Game::Initialize() {
chkWaitChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1277));
chkWaitChain->setChecked(gameConf.chkWaitChain != 0);
posY += 30;
chkDefaultShowChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1354));
chkDefaultShowChain->setChecked(gameConf.chkDefaultShowChain != 0);
posY += 30;
chkQuickAnimation = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299));
chkQuickAnimation->setChecked(gameConf.quick_animation != 0);
posY += 30;
......@@ -1281,6 +1284,7 @@ void Game::LoadConfig() {
gameConf.chkRandomPos = 0;
gameConf.chkAutoChain = 0;
gameConf.chkWaitChain = 0;
gameConf.chkDefaultShowChain = 0;
gameConf.chkIgnore1 = 0;
gameConf.chkIgnore2 = 0;
gameConf.use_lflist = 1;
......@@ -1349,6 +1353,8 @@ void Game::LoadConfig() {
gameConf.chkAutoChain = atoi(valbuf);
} else if(!strcmp(strbuf, "waitchain")) {
gameConf.chkWaitChain = atoi(valbuf);
} else if(!strcmp(strbuf, "showchain")) {
gameConf.chkDefaultShowChain = atoi(valbuf);
} else if(!strcmp(strbuf, "mute_opponent")) {
gameConf.chkIgnore1 = atoi(valbuf);
} else if(!strcmp(strbuf, "mute_spectators")) {
......@@ -1464,6 +1470,7 @@ void Game::SaveConfig() {
fprintf(fp, "randompos = %d\n", (chkRandomPos->isChecked() ? 1 : 0));
fprintf(fp, "autochain = %d\n", (chkAutoChain->isChecked() ? 1 : 0));
fprintf(fp, "waitchain = %d\n", (chkWaitChain->isChecked() ? 1 : 0));
fprintf(fp, "showchain = %d\n", (chkDefaultShowChain->isChecked() ? 1 : 0));
fprintf(fp, "mute_opponent = %d\n", (chkIgnore1->isChecked() ? 1 : 0));
fprintf(fp, "mute_spectators = %d\n", (chkIgnore2->isChecked() ? 1 : 0));
fprintf(fp, "use_lflist = %d\n", gameConf.use_lflist);
......
......@@ -33,6 +33,7 @@ struct Config {
int chkRandomPos;
int chkAutoChain;
int chkWaitChain;
int chkDefaultShowChain;
int chkIgnore1;
int chkIgnore2;
int use_lflist;
......@@ -290,6 +291,7 @@ public:
irr::gui::IGUICheckBox* chkRandomPos;
irr::gui::IGUICheckBox* chkAutoChain;
irr::gui::IGUICheckBox* chkWaitChain;
irr::gui::IGUICheckBox* chkDefaultShowChain;
irr::gui::IGUICheckBox* chkQuickAnimation;
irr::gui::IGUICheckBox* chkAutoSaveReplay;
irr::gui::IGUICheckBox* chkDrawSingleChain;
......
......@@ -401,6 +401,7 @@
!system 1351 投降
!system 1352 主要信息:
!system 1353 播放起始于回合:
!system 1354 开局默认显示所有时点
!system 1356 此操作将放弃对当前卡组的修改,是否继续?
!system 1357 不提示保留对卡组的修改
!system 1358 键入关键字后自动进行搜索
......
......@@ -18,6 +18,7 @@ autospellpos = 0
randompos = 0
autochain = 0
waitchain = 0
showchain = 0
mute_opponent = 0
mute_spectators = 0
use_lflist = 1
......
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