Commit e911fa41 authored by fallenstardust's avatar fallenstardust

control return to deck top or bottom

parent 3f9d41e5
...@@ -1121,14 +1121,16 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) { ...@@ -1121,14 +1121,16 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
} }
//SINGLE MODE //SINGLE MODE
irr::gui::IGUITab* tabSingle = wSingle->addTab(dataManager.GetSysString(1381)); irr::gui::IGUITab* tabSingle = wSingle->addTab(dataManager.GetSysString(1381));
env->addStaticText(dataManager.GetSysString(1352), rect<s32>(310 * xScale, 10 * yScale, 500 * xScale, 30 * yScale), false, true, tabSingle);
stSinglePlayInfo = env->addStaticText(L"", rect<s32>(310 * xScale, 40 * yScale, 560 * xScale, 80 * yScale), false, true, tabSingle);
lstSinglePlayList = env->addListBox(rect<s32>(0, 0, 300 * xScale, 330 * yScale), tabSingle, LISTBOX_SINGLEPLAY_LIST, true); lstSinglePlayList = env->addListBox(rect<s32>(0, 0, 300 * xScale, 330 * yScale), tabSingle, LISTBOX_SINGLEPLAY_LIST, true);
lstSinglePlayList->setItemHeight(30 * yScale); lstSinglePlayList->setItemHeight(30 * yScale);
btnLoadSinglePlay = env->addButton(rect<s32>(420 * xScale, 240 * yScale, 530 * xScale, 280 * yScale), tabSingle, BUTTON_LOAD_SINGLEPLAY, dataManager.GetSysString(1211)); btnLoadSinglePlay = env->addButton(rect<s32>(420 * xScale, 240 * yScale, 530 * xScale, 280 * yScale), tabSingle, BUTTON_LOAD_SINGLEPLAY, dataManager.GetSysString(1211));
ChangeToIGUIImageButton(btnLoadSinglePlay, imageManager.tButton_S, imageManager.tButton_S_pressed); ChangeToIGUIImageButton(btnLoadSinglePlay, imageManager.tButton_S, imageManager.tButton_S_pressed);
btnSinglePlayCancel = env->addButton(rect<s32>(420 * xScale, 290 * yScale, 530 * xScale, 330 * yScale),tabSingle, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210)); btnSinglePlayCancel = env->addButton(rect<s32>(420 * xScale, 290 * yScale, 530 * xScale, 330 * yScale),tabSingle, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210));
ChangeToIGUIImageButton(btnSinglePlayCancel, imageManager.tButton_S, imageManager.tButton_S_pressed); ChangeToIGUIImageButton(btnSinglePlayCancel, imageManager.tButton_S, imageManager.tButton_S_pressed);
env->addStaticText(dataManager.GetSysString(1352), rect<s32>(310 * xScale, 10 * yScale, 500 * xScale, 30 * yScale), false, true, tabSingle);
stSinglePlayInfo = env->addStaticText(L"", rect<s32>(310 * xScale, 40 * yScale, 560 * xScale, 80 * yScale), false, true, tabSingle);
chkSinglePlayReturnDeckTop = env->addCheckBox(false, rect<s32>(310 * xScale, 260 * yScale, 560 * xScale, 280 * yScale), tabSingle, -1, dataManager.GetSysString(1238));
//replay save //replay save
wReplaySave = env->addWindow(rect<s32>(470 * xScale, 180 * yScale, 860 * xScale, 360 * yScale), false, dataManager.GetSysString(1340)); wReplaySave = env->addWindow(rect<s32>(470 * xScale, 180 * yScale, 860 * xScale, 360 * yScale), false, dataManager.GetSysString(1340));
wReplaySave->getCloseButton()->setVisible(false); wReplaySave->getCloseButton()->setVisible(false);
......
...@@ -415,6 +415,7 @@ public: ...@@ -415,6 +415,7 @@ public:
irr::gui::IGUIListBox* lstSinglePlayList; irr::gui::IGUIListBox* lstSinglePlayList;
irr::gui::IGUIStaticText* stSinglePlayInfo; irr::gui::IGUIStaticText* stSinglePlayInfo;
irr::gui::IGUICheckBox* chkSinglePlayReturnDeckTop;
irr::gui::IGUIButton* btnLoadSinglePlay;// irr::gui::IGUIButton* btnLoadSinglePlay;//
irr::gui::IGUIButton* btnSinglePlayCancel;// irr::gui::IGUIButton* btnSinglePlayCancel;//
//hand //hand
......
...@@ -32,7 +32,7 @@ int SingleMode::SinglePlayThread() { ...@@ -32,7 +32,7 @@ int SingleMode::SinglePlayThread() {
const int start_lp = 8000; const int start_lp = 8000;
const int start_hand = 5; const int start_hand = 5;
const int draw_count = 1; const int draw_count = 1;
const int opt = 0; int opt = 0;
std::random_device rd; std::random_device rd;
unsigned int seed = rd(); unsigned int seed = rd();
mt19937 rnd(seed); mt19937 rnd(seed);
...@@ -50,6 +50,8 @@ int SingleMode::SinglePlayThread() { ...@@ -50,6 +50,8 @@ int SingleMode::SinglePlayThread() {
mainGame->dInfo.clientname[0] = 0; mainGame->dInfo.clientname[0] = 0;
mainGame->dInfo.player_type = 0; mainGame->dInfo.player_type = 0;
mainGame->dInfo.turn = 0; mainGame->dInfo.turn = 0;
if(mainGame->chkSinglePlayReturnDeckTop->isChecked())
opt |= DUEL_RETURN_DECK_TOP;
char filename[256]; char filename[256];
size_t slen = 0; size_t slen = 0;
const wchar_t* name = mainGame->lstSinglePlayList->getListItem(mainGame->lstSinglePlayList->getSelected()); const wchar_t* name = mainGame->lstSinglePlayList->getListItem(mainGame->lstSinglePlayList->getSelected());
......
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