Commit 4fbc5cd8 authored by fallenstardust's avatar fallenstardust

设置打开wSettings按钮

parent 915e4153
...@@ -134,6 +134,7 @@ void DeckBuilder::Initialize() { ...@@ -134,6 +134,7 @@ void DeckBuilder::Initialize() {
mainGame->wSort->setVisible(true); mainGame->wSort->setVisible(true);
mainGame->btnLeaveGame->setVisible(true); mainGame->btnLeaveGame->setVisible(true);
mainGame->btnLeaveGame->setText(dataManager.GetSysString(1306)); mainGame->btnLeaveGame->setText(dataManager.GetSysString(1306));
mainGame->imgSettings->setVisible(true);
mainGame->btnSideOK->setVisible(false); mainGame->btnSideOK->setVisible(false);
mainGame->btnSideShuffle->setVisible(false); mainGame->btnSideShuffle->setVisible(false);
mainGame->btnSideSort->setVisible(false); mainGame->btnSideSort->setVisible(false);
...@@ -168,6 +169,7 @@ void DeckBuilder::Terminate() { ...@@ -168,6 +169,7 @@ void DeckBuilder::Terminate() {
mainGame->wCardImg->setVisible(false); mainGame->wCardImg->setVisible(false);
mainGame->wInfos->setVisible(false); mainGame->wInfos->setVisible(false);
mainGame->btnLeaveGame->setVisible(false); mainGame->btnLeaveGame->setVisible(false);
mainGame->wSettings->setVisible(false);
mainGame->PopupElement(mainGame->wMainMenu); mainGame->PopupElement(mainGame->wMainMenu);
mainGame->device->setEventReceiver(&mainGame->menuHandler); mainGame->device->setEventReceiver(&mainGame->menuHandler);
mainGame->wACMessage->setVisible(false); mainGame->wACMessage->setVisible(false);
......
...@@ -592,6 +592,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -592,6 +592,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->is_building = false; mainGame->is_building = false;
mainGame->wCardImg->setVisible(true); mainGame->wCardImg->setVisible(true);
mainGame->wInfos->setVisible(true); mainGame->wInfos->setVisible(true);
mainGame->imgSettings->setVisible(true);
mainGame->wPhase->setVisible(true); mainGame->wPhase->setVisible(true);
mainGame->btnSideOK->setVisible(false); mainGame->btnSideOK->setVisible(false);
mainGame->btnSideShuffle->setVisible(false); mainGame->btnSideShuffle->setVisible(false);
......
...@@ -162,6 +162,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -162,6 +162,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->HideElement(mainGame->wSurrender); mainGame->HideElement(mainGame->wSurrender);
break; break;
} }
case BUTTON_SETTINGS: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->ShowElement(mainGame->wSettings);
break;
}
case BUTTON_CHAIN_IGNORE: { case BUTTON_CHAIN_IGNORE: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON); mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->ignore_chain = mainGame->btnChainIgnore->isPressed(); mainGame->ignore_chain = mainGame->btnChainIgnore->isPressed();
......
...@@ -389,13 +389,17 @@ bool Game::Initialize() { ...@@ -389,13 +389,17 @@ bool Game::Initialize() {
scrCardText->setSmallStep(1); scrCardText->setSmallStep(1);
scrCardText->setVisible(false); scrCardText->setVisible(false);
//setting //setting
imgSettings = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(265 * yScale, 275 * yScale, 290 * yScale, 300 * yScale), 0, BUTTON_SETTINGS);
wSettings= env->addWindow(rect<s32>(220 * xScale, 100 * yScale, 800 * xScale, 520 * yScale), false, dataManager.GetSysString(1273)); imgSettings->setImage(imageManager.tAct);
//imgSettings->setImageScale(core::vector2df(xScale, yScale));
imgSettings->setVisible(false);
wSettings = env->addWindow(rect<s32>(220 * xScale, 100 * yScale, 800 * xScale, 520 * yScale), false, dataManager.GetSysString(1273));
wSettings->getCloseButton()->setVisible(false); wSettings->getCloseButton()->setVisible(false);
wSettings->setVisible(false); wSettings->setVisible(false);
irr::gui::IGUITabControl* tabSetting = env->addTabControl(rect<s32>(0 * xScale, 20 * yScale, 579 * xScale, 419 * yScale), wSettings, true); irr::gui::IGUITabControl* tabSetting = env->addTabControl(rect<s32>(0 * xScale, 20 * yScale, 579 * xScale, 419 * yScale), wSettings, true);
tabSetting->setTabHeight(40 * yScale); tabSetting->setTabHeight(40 * yScale);
//log //log
//imgLog = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(265 * yScale, 305 * yScale, 290 * yScale, 330 * yScale), 0, BUTTON_SHOW_LOG);
irr::gui::IGUITab* tabLog = tabSetting->addTab(dataManager.GetSysString(1271)); irr::gui::IGUITab* tabLog = tabSetting->addTab(dataManager.GetSysString(1271));
lstLog = env->addListBox(rect<s32>(10 * xScale, 10 * yScale, 790 * xScale, 510 * yScale), wSettings, LISTBOX_LOG, false); lstLog = env->addListBox(rect<s32>(10 * xScale, 10 * yScale, 790 * xScale, 510 * yScale), wSettings, LISTBOX_LOG, false);
lstLog->setItemHeight(25 * yScale); lstLog->setItemHeight(25 * yScale);
...@@ -1763,6 +1767,7 @@ void Game::CloseDuelWindow() { ...@@ -1763,6 +1767,7 @@ void Game::CloseDuelWindow() {
wCardImg->setVisible(false); wCardImg->setVisible(false);
wInfos->setVisible(false); wInfos->setVisible(false);
wChat->setVisible(false); wChat->setVisible(false);
imgSettings->setVisible(false);
btnSideOK->setVisible(false); btnSideOK->setVisible(false);
btnSideShuffle->setVisible(false); btnSideShuffle->setVisible(false);
btnSideSort->setVisible(false); btnSideSort->setVisible(false);
......
...@@ -808,6 +808,9 @@ private: ...@@ -808,6 +808,9 @@ private:
#define CHECKBOX_ENABLE_MUSIC 362 #define CHECKBOX_ENABLE_MUSIC 362
#define SCROLL_VOLUME 363 #define SCROLL_VOLUME 363
#define CHECKBOX_DISABLE_CHAT 364 #define CHECKBOX_DISABLE_CHAT 364
#define BUTTON_SETTINGS 365
#define BUTTON_BGM 366
#define BUTTON_SHOW_LOG 367
#define CHECKBOX_DRAW_FIELD_SPELL 368 #define CHECKBOX_DRAW_FIELD_SPELL 368
#define CHECKBOX_QUICK_ANIMATION 369 #define CHECKBOX_QUICK_ANIMATION 369
#define SCROLL_TAB_HELPER 370 #define SCROLL_TAB_HELPER 370
......
...@@ -240,6 +240,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -240,6 +240,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame->imgCard->setScaleImage(true); mainGame->imgCard->setScaleImage(true);
mainGame->wCardImg->setVisible(true); mainGame->wCardImg->setVisible(true);
mainGame->wInfos->setVisible(true); mainGame->wInfos->setVisible(true);
mainGame->imgSettings->setVisible(true);
mainGame->wReplay->setVisible(true); mainGame->wReplay->setVisible(true);
mainGame->wReplayControl->setVisible(true); mainGame->wReplayControl->setVisible(true);
mainGame->btnReplayStart->setVisible(false); mainGame->btnReplayStart->setVisible(false);
......
...@@ -72,6 +72,7 @@ int SingleMode::SinglePlayThread() { ...@@ -72,6 +72,7 @@ int SingleMode::SinglePlayThread() {
mainGame->ClearCardInfo(); mainGame->ClearCardInfo();
mainGame->wCardImg->setVisible(true); mainGame->wCardImg->setVisible(true);
mainGame->wInfos->setVisible(true); mainGame->wInfos->setVisible(true);
mainGame->imgSettings->setVisible(true);
mainGame->btnLeaveGame->setVisible(true); mainGame->btnLeaveGame->setVisible(true);
mainGame->btnLeaveGame->setText(dataManager.GetSysString(1210)); mainGame->btnLeaveGame->setText(dataManager.GetSysString(1210));
mainGame->wPhase->setVisible(true); mainGame->wPhase->setVisible(true);
......
...@@ -8,8 +8,8 @@ android { ...@@ -8,8 +8,8 @@ android {
applicationId "cn.garymb.ygomobile" applicationId "cn.garymb.ygomobile"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 370200612 versionCode 370300621
versionName "3.7.2" versionName "3.7.3"
flavorDimensions "versionCode" flavorDimensions "versionCode"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
ndk { ndk {
......
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