Commit d1bb196a authored by fallenstardust's avatar fallenstardust

调整设置布局

添加关闭图标
parent 1508ad3d
...@@ -422,16 +422,20 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) { ...@@ -422,16 +422,20 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
for(int i = 0; i < 2; ++i) { for(int i = 0; i < 2; ++i) {
stHostPrepDuelist[i] = env->addStaticText(L"", rect<s32>(60 * xScale, (80 + i * 45) * yScale, 260 * xScale, (120 + i * 45) * yScale), true, false, wHostPrepare); stHostPrepDuelist[i] = env->addStaticText(L"", rect<s32>(60 * xScale, (80 + i * 45) * yScale, 260 * xScale, (120 + i * 45) * yScale), true, false, wHostPrepare);
stHostPrepDuelist[i]->setTextAlignment(EGUIA_CENTER, EGUIA_CENTER); stHostPrepDuelist[i]->setTextAlignment(EGUIA_CENTER, EGUIA_CENTER);
btnHostPrepKick[i] = env->addButton(rect<s32>(10 * xScale, (80 + i * 45) * yScale, 50 * xScale, (120 + i * 45) * yScale), wHostPrepare, BUTTON_HP_KICK, L"X"); btnHostPrepKick[i] = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(10 * xScale, (80 + i * 45) * yScale, 50 * xScale, (120 + i * 45) * yScale), wHostPrepare, BUTTON_HP_KICK);
ChangeToIGUIImageButton(btnHostPrepKick[i], imageManager.tButton_C, imageManager.tButton_C_pressed); btnHostPrepKick[i]->setImageSize(core::dimension2di(40 * yScale, 40 * yScale));
btnHostPrepKick[i]->setDrawBorder(false);
btnHostPrepKick[i]->setImage(imageManager.tClose);
chkHostPrepReady[i] = env->addCheckBox(false, rect<s32>(270 * xScale, (80 + i * 45) * yScale, 310 * xScale, (120 + i * 45) * yScale), wHostPrepare, CHECKBOX_HP_READY, L""); chkHostPrepReady[i] = env->addCheckBox(false, rect<s32>(270 * xScale, (80 + i * 45) * yScale, 310 * xScale, (120 + i * 45) * yScale), wHostPrepare, CHECKBOX_HP_READY, L"");
chkHostPrepReady[i]->setEnabled(false); chkHostPrepReady[i]->setEnabled(false);
} }
for(int i = 2; i < 4; ++i) { for(int i = 2; i < 4; ++i) {
stHostPrepDuelist[i] = env->addStaticText(L"", rect<s32>(60 * xScale, (135 + i * 45) * yScale, 260 * xScale, (175 + i * 45) * yScale), true, false, wHostPrepare); stHostPrepDuelist[i] = env->addStaticText(L"", rect<s32>(60 * xScale, (135 + i * 45) * yScale, 260 * xScale, (175 + i * 45) * yScale), true, false, wHostPrepare);
stHostPrepDuelist[i]->setTextAlignment(EGUIA_CENTER, EGUIA_CENTER); stHostPrepDuelist[i]->setTextAlignment(EGUIA_CENTER, EGUIA_CENTER);
btnHostPrepKick[i] = env->addButton(rect<s32>(10 * xScale, (135 + i * 45) * yScale, 50 * xScale, (175 + i * 45) * yScale), wHostPrepare, BUTTON_HP_KICK, L"X"); btnHostPrepKick[i] = irr::gui::CGUIImageButton::addImageButton(env,rect<s32>(10 * xScale, (135 + i * 45) * yScale, 50 * xScale, (175 + i * 45) * yScale), wHostPrepare, BUTTON_HP_KICK);
ChangeToIGUIImageButton(btnHostPrepKick[i], imageManager.tButton_C, imageManager.tButton_C_pressed); btnHostPrepKick[i]->setImageSize(core::dimension2di(40 * yScale, 40 * yScale));
btnHostPrepKick[i]->setDrawBorder(false);
btnHostPrepKick[i]->setImage(imageManager.tClose);
chkHostPrepReady[i] = env->addCheckBox(false, rect<s32>(270 * xScale, (135 + i * 45) * yScale, 310 * xScale, (175 + i * 45) * yScale), wHostPrepare, CHECKBOX_HP_READY, L""); chkHostPrepReady[i] = env->addCheckBox(false, rect<s32>(270 * xScale, (135 + i * 45) * yScale, 310 * xScale, (175 + i * 45) * yScale), wHostPrepare, CHECKBOX_HP_READY, L"");
chkHostPrepReady[i]->setEnabled(false); chkHostPrepReady[i]->setEnabled(false);
} }
...@@ -563,27 +567,21 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) { ...@@ -563,27 +567,21 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
chkQuickAnimation = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299)); chkQuickAnimation = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299));
chkQuickAnimation->setChecked(gameConf.quick_animation != 0); chkQuickAnimation->setChecked(gameConf.quick_animation != 0);
posY += 40 * yScale; posY += 40 * yScale;
chkMusicMode = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, -1, dataManager.GetSysString(1281)); chkDrawFieldSpell = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_DRAW_FIELD_SPELL, dataManager.GetSysString(1283));
chkMusicMode->setChecked(gameConf.music_mode != 0); chkDrawFieldSpell->setChecked(gameConf.draw_field_spell != 0);
posY += 40 * yScale; posY += 40 * yScale;
chkEnableSound = env->addCheckBox(gameConf.enable_sound, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_ENABLE_SOUND, dataManager.GetSysString(1279)); chkDrawSingleChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287));
chkEnableSound->setChecked(gameConf.enable_sound); chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0);
scrSoundVolume = env->addScrollBar(true, rect<s32>(posX + 110 * xScale, posY, posX + 250 * xScale, posY + 30 * yScale), wSettings, SCROLL_VOLUME); posY += 40 * yScale;
scrSoundVolume->setMax(100); chkLFlist = env->addCheckBox(false, rect<s32>(posX, posY, posX + 100 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_LFLIST, dataManager.GetSysString(1288));
scrSoundVolume->setMin(0); chkLFlist->setChecked(gameConf.use_lflist);
scrSoundVolume->setPos(gameConf.sound_volume); cbLFlist = CAndroidGUIComboBox::addAndroidComboBox(env, rect<s32>(posX + 110 * xScale, posY, posX + 230 * xScale, posY + 30 * yScale), wSettings, COMBOBOX_LFLIST);
scrSoundVolume->setLargeStep(1); cbLFlist->setMaxSelectionRows(6);
scrSoundVolume->setSmallStep(1); for(unsigned int i = 0; i < deckManager._lfList.size(); ++i)
posY += 40 * yScale; cbLFlist->addItem(deckManager._lfList[i].listName.c_str());
chkEnableMusic = env->addCheckBox(gameConf.enable_music, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_ENABLE_MUSIC, dataManager.GetSysString(1280)); cbLFlist->setEnabled(gameConf.use_lflist);
chkEnableMusic->setChecked(gameConf.enable_music); cbLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbLFlist->getItemCount() - 1);
scrMusicVolume = env->addScrollBar(true, rect<s32>(posX + 110 * xScale, posY, posX + 250 * xScale, posY + 30 * yScale), wSettings, SCROLL_VOLUME); posX = 250 * xScale;//another Column
scrMusicVolume->setMax(100);
scrMusicVolume->setMin(0);
scrMusicVolume->setPos(gameConf.music_volume);
scrMusicVolume->setLargeStep(1);
scrMusicVolume->setSmallStep(1);
posX = 240 * xScale;//another Column
posY = 40 * yScale; posY = 40 * yScale;
chkIgnore1 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 30 * yScale), wSettings, CHECKBOX_DISABLE_CHAT, dataManager.GetSysString(1290)); chkIgnore1 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 30 * yScale), wSettings, CHECKBOX_DISABLE_CHAT, dataManager.GetSysString(1290));
chkIgnore1->setChecked(gameConf.chkIgnore1 != 0); chkIgnore1->setChecked(gameConf.chkIgnore1 != 0);
...@@ -597,26 +595,34 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) { ...@@ -597,26 +595,34 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
chkAutoSaveReplay = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, -1, dataManager.GetSysString(1366)); chkAutoSaveReplay = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, -1, dataManager.GetSysString(1366));
chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0); chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0);
posY += 40 * yScale; posY += 40 * yScale;
chkDrawFieldSpell = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_DRAW_FIELD_SPELL, dataManager.GetSysString(1283)); chkPreferExpansionScript = env->addCheckBox(false, rect<s32>(posX, posY, posX + 280 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_PREFER_EXPANSION, dataManager.GetSysString(1379));
chkDrawFieldSpell->setChecked(gameConf.draw_field_spell != 0); chkPreferExpansionScript->setChecked(gameConf.prefer_expansion_script != 0);
posY += 40 * yScale;
chkDrawSingleChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287));
chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0);
posY += 40 * yScale;
chkPreferExpansionScript = env->addCheckBox(false, rect<s32>(posX, posY, posX + 280 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_PREFER_EXPANSION, dataManager.GetSysString(1379));
chkPreferExpansionScript->setChecked(gameConf.prefer_expansion_script != 0);
posY += 40 * yScale; posY += 40 * yScale;
chkLFlist = env->addCheckBox(false, rect<s32>(posX + 40 * xScale, posY, posX + 140 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_LFLIST, dataManager.GetSysString(1288)); chkMusicMode = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260 * xScale, posY + 30 * yScale), wSettings, -1, dataManager.GetSysString(1281));
chkLFlist->setChecked(gameConf.use_lflist); chkMusicMode->setChecked(gameConf.music_mode != 0);
cbLFlist = CAndroidGUIComboBox::addAndroidComboBox(env, rect<s32>(posX + 150 * xScale, posY, posX + 290 * xScale, posY + 30 * yScale), wSettings, COMBOBOX_LFLIST); posY += 40 * yScale;
cbLFlist->setMaxSelectionRows(6); chkEnableSound = env->addCheckBox(gameConf.enable_sound, rect<s32>(posX, posY, posX + 100 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_ENABLE_SOUND, dataManager.GetSysString(1279));
for(unsigned int i = 0; i < deckManager._lfList.size(); ++i) chkEnableSound->setChecked(gameConf.enable_sound);
cbLFlist->addItem(deckManager._lfList[i].listName.c_str()); scrSoundVolume = env->addScrollBar(true, rect<s32>(posX + 110 * xScale, posY, posX + 280 * xScale, posY + 30 * yScale), wSettings, SCROLL_VOLUME);
cbLFlist->setEnabled(gameConf.use_lflist); scrSoundVolume->setMax(100);
cbLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbLFlist->getItemCount() - 1); scrSoundVolume->setMin(0);
elmTabSystemLast = chkLFlist; scrSoundVolume->setPos(gameConf.sound_volume);
btnCloseSettings =env->addButton(rect<s32>(450 * xScale, 350 * yScale, 560 * xScale, 400 * yScale), wSettings, BUTTON_CLOSE_SETTINGS, dataManager.GetSysString(1211)); scrSoundVolume->setLargeStep(1);
ChangeToIGUIImageButton(btnCloseSettings, imageManager.tButton_S, imageManager.tButton_S_pressed); scrSoundVolume->setSmallStep(1);
posY += 40 * yScale;
chkEnableMusic = env->addCheckBox(gameConf.enable_music, rect<s32>(posX, posY, posX + 100 * xScale, posY + 30 * yScale), wSettings, CHECKBOX_ENABLE_MUSIC, dataManager.GetSysString(1280));
chkEnableMusic->setChecked(gameConf.enable_music);
scrMusicVolume = env->addScrollBar(true, rect<s32>(posX + 110 * xScale, posY, posX + 280 * xScale, posY + 30 * yScale), wSettings, SCROLL_VOLUME);
scrMusicVolume->setMax(100);
scrMusicVolume->setMin(0);
scrMusicVolume->setPos(gameConf.music_volume);
scrMusicVolume->setLargeStep(1);
scrMusicVolume->setSmallStep(1);
elmTabSystemLast = chkEnableMusic;
btnCloseSettings =irr::gui::CGUIImageButton::addImageButton(env,rect<s32>(500 * xScale, 30 * yScale, 550 * xScale, 80 * yScale), wSettings, BUTTON_CLOSE_SETTINGS);
btnCloseSettings->setImageSize(core::dimension2di(50 * yScale, 50 * yScale));
btnCloseSettings->setDrawBorder(false);
btnCloseSettings->setImage(imageManager.tClose);
// //
wHand = env->addWindow(rect<s32>(500 * xScale, 450 * yScale, 825 * xScale, 605 * yScale), false, L""); wHand = env->addWindow(rect<s32>(500 * xScale, 450 * yScale, 825 * xScale, 605 * yScale), false, L"");
wHand->getCloseButton()->setVisible(false); wHand->getCloseButton()->setVisible(false);
...@@ -1811,7 +1817,7 @@ void Game::SaveConfig() { ...@@ -1811,7 +1817,7 @@ void Game::SaveConfig() {
gameConf.music_volume = (double)scrMusicVolume->getPos(); gameConf.music_volume = (double)scrMusicVolume->getPos();
android::saveIntSetting(appMain, "music_volume", gameConf.music_volume); android::saveIntSetting(appMain, "music_volume", gameConf.music_volume);
gameConf.use_lflist = chkLFlist->isChecked() ? 1 : 0; gameConf.use_lflist = chkLFlist->isChecked() ? 1 : 0;
android::saveIntSetting(appMain, "use_lflist", gameConf.music_mode); android::saveIntSetting(appMain, "use_lflist", gameConf.use_lflist);
//gameConf.control_mode = control_mode->isChecked()?1:0; //gameConf.control_mode = control_mode->isChecked()?1:0;
// android::saveIntSetting(appMain, "control_mode", gameConf.control_mode); // android::saveIntSetting(appMain, "control_mode", gameConf.control_mode);
} }
......
...@@ -289,7 +289,7 @@ public: ...@@ -289,7 +289,7 @@ public:
irr::gui::CGUIImageButton* imgSettings; irr::gui::CGUIImageButton* imgSettings;
irr::gui::IGUIWindow* wSettings; irr::gui::IGUIWindow* wSettings;
irr::gui::IGUIImage* bgSettings; irr::gui::IGUIImage* bgSettings;
irr::gui::IGUIButton* btnCloseSettings;// irr::gui::CGUIImageButton* btnCloseSettings;//
//hint text //hint text
irr::gui::IGUIStaticText* stHintMsg; irr::gui::IGUIStaticText* stHintMsg;
irr::gui::IGUIStaticText* stTip; irr::gui::IGUIStaticText* stTip;
...@@ -377,7 +377,7 @@ public: ...@@ -377,7 +377,7 @@ public:
irr::gui::IGUIButton* btnHostPrepOB;// irr::gui::IGUIButton* btnHostPrepOB;//
irr::gui::IGUIStaticText* stHostPrepDuelist[4]; irr::gui::IGUIStaticText* stHostPrepDuelist[4];
irr::gui::IGUICheckBox* chkHostPrepReady[4]; irr::gui::IGUICheckBox* chkHostPrepReady[4];
irr::gui::IGUIButton* btnHostPrepKick[4];// irr::gui::CGUIImageButton* btnHostPrepKick[4];//
irr::gui::IGUIComboBox* cbCategorySelect; irr::gui::IGUIComboBox* cbCategorySelect;
irr::gui::IGUIComboBox* cbDeckSelect; irr::gui::IGUIComboBox* cbDeckSelect;
irr::gui::IGUIStaticText* stHostPrepRule; irr::gui::IGUIStaticText* stHostPrepRule;
......
...@@ -50,6 +50,7 @@ bool ImageManager::Initial(const path dir) { ...@@ -50,6 +50,7 @@ bool ImageManager::Initial(const path dir) {
tPlay = driver->getTexture((dir + path("/textures/extra/tplay.png")).c_str()); tPlay = driver->getTexture((dir + path("/textures/extra/tplay.png")).c_str());
tTalk = driver->getTexture((dir + path("/textures/extra/ttalk.png")).c_str()); tTalk = driver->getTexture((dir + path("/textures/extra/ttalk.png")).c_str());
tShut = driver->getTexture((dir + path("/textures/extra/tshut.png")).c_str()); tShut = driver->getTexture((dir + path("/textures/extra/tshut.png")).c_str());
tClose = driver->getTexture((dir + path("/textures/extra/tclose.png")).c_str());
tTitleBar = driver->getTexture((dir + path("/textures/extra/stitlebar.png")).c_str()); tTitleBar = driver->getTexture((dir + path("/textures/extra/stitlebar.png")).c_str());
tWindow = driver->getTexture((dir + path("/textures/extra/sWindow.png")).c_str()); tWindow = driver->getTexture((dir + path("/textures/extra/sWindow.png")).c_str());
tWindow_V = driver->getTexture((dir + path("/textures/extra/sWindow_V.png")).c_str()); tWindow_V = driver->getTexture((dir + path("/textures/extra/sWindow_V.png")).c_str());
......
...@@ -65,6 +65,7 @@ public: ...@@ -65,6 +65,7 @@ public:
irr::video::ITexture* tPlay; irr::video::ITexture* tPlay;
irr::video::ITexture* tTalk; irr::video::ITexture* tTalk;
irr::video::ITexture* tShut; irr::video::ITexture* tShut;
irr::video::ITexture* tClose;
irr::video::ITexture* tTitleBar; irr::video::ITexture* tTitleBar;
irr::video::ITexture* tWindow; irr::video::ITexture* tWindow;
irr::video::ITexture* tWindow_V; irr::video::ITexture* tWindow_V;
......
...@@ -8,7 +8,7 @@ android { ...@@ -8,7 +8,7 @@ android {
applicationId "cn.garymb.ygomobile" applicationId "cn.garymb.ygomobile"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 380800906 versionCode 380800907
versionName "3.8.8" versionName "3.8.8"
flavorDimensions "versionCode" flavorDimensions "versionCode"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
......
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