Commit bf1ea010 authored by mercury233's avatar mercury233 Committed by GitHub

add an option in single play (#2388)

control return to deck top or bottom
parent b76e3bff
......@@ -819,7 +819,8 @@ bool Game::Initialize() {
btnLoadSinglePlay = env->addButton(rect<s32>(459, 301, 569, 326), tabSingle, BUTTON_LOAD_SINGLEPLAY, dataManager.GetSysString(1211));
btnSinglePlayCancel = env->addButton(rect<s32>(459, 331, 569, 356), tabSingle, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210));
env->addStaticText(dataManager.GetSysString(1352), rect<s32>(360, 10, 550, 30), false, true, tabSingle);
stSinglePlayInfo = env->addStaticText(L"", rect<s32>(360, 40, 560, 280), false, true, tabSingle);
stSinglePlayInfo = env->addStaticText(L"", rect<s32>(360, 40, 560, 160), false, true, tabSingle);
chkSinglePlayReturnDeckTop = env->addCheckBox(false, rect<s32>(360, 260, 560, 280), tabSingle, -1, dataManager.GetSysString(1238));
//replay save
wReplaySave = env->addWindow(rect<s32>(510, 200, 820, 320), false, dataManager.GetSysString(1340));
wReplaySave->getCloseButton()->setVisible(false);
......
......@@ -385,6 +385,7 @@ public:
irr::gui::IGUICheckBox* chkBotNoShuffleDeck;
irr::gui::IGUIListBox* lstSinglePlayList;
irr::gui::IGUIStaticText* stSinglePlayInfo;
irr::gui::IGUICheckBox* chkSinglePlayReturnDeckTop;
irr::gui::IGUIButton* btnLoadSinglePlay;
irr::gui::IGUIButton* btnSinglePlayCancel;
//hand
......
......@@ -32,7 +32,7 @@ int SingleMode::SinglePlayThread() {
const int start_lp = 8000;
const int start_hand = 5;
const int draw_count = 1;
const int opt = 0;
int opt = 0;
std::random_device rd;
unsigned int seed = rd();
mt19937 rnd(seed);
......@@ -50,6 +50,8 @@ int SingleMode::SinglePlayThread() {
mainGame->dInfo.clientname[0] = 0;
mainGame->dInfo.player_type = 0;
mainGame->dInfo.turn = 0;
if(mainGame->chkSinglePlayReturnDeckTop->isChecked())
opt |= DUEL_RETURN_DECK_TOP;
char filename[256];
size_t slen = 0;
if(open_file) {
......
Subproject commit b784b9999f8eed9d348c1f40bffa0609a15acb75
Subproject commit 16be11adb9cc82390d57d98f669e096c04f145f1
Subproject commit ffaa1d435ea6175f3ec055db3dbc14c3de9cf38b
Subproject commit 95dd7c80a00549265f7f6891705484cb37fc0871
......@@ -301,6 +301,7 @@
!system 1235 主机密码:
!system 1236 规则:
!system 1237 每回合时间:
!system 1238 不洗切时回卡组改为回顶端
!system 1244 单局模式
!system 1245 比赛模式
!system 1246 TAG
......
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