public void updatePopups() { if (this.isTutorialArrowWindowOpen()) { TutorialArrowWindow.updateArrow(); } bool flag = true; if (this.isPopupWindowCreated(this.m_playCardsWindow)) { this.m_playCardsWindow.update(); Form activeForm = Form.ActiveForm; if ((Form.ActiveForm == this.ParentForm) || ((this.m_launchAttackPopup != null) && (Form.ActiveForm == this.m_launchAttackPopup))) { this.m_playCardsWindow.Focus(); } flag = false; } if (this.isPopupWindowCreated(this.m_launchAttackPopup)) { this.m_launchAttackPopup.update(); if (flag) { Form form2 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_launchAttackPopup.Focus(); } flag = false; } } if (this.isPopupWindowCreated(this.m_scoutPopupWindow)) { this.m_scoutPopupWindow.update(); if (flag) { Form form3 = Form.ActiveForm; if ((Form.ActiveForm == this.ParentForm) || ((this.m_launchAttackPopup != null) && (Form.ActiveForm == this.m_scoutPopupWindow))) { this.m_scoutPopupWindow.Focus(); } flag = false; } } if (this.isPopupWindowCreated(this.m_sendMonkWindow)) { this.m_sendMonkWindow.update(); if (flag) { Form form4 = Form.ActiveForm; if ((Form.ActiveForm == this.ParentForm) || ((this.m_launchAttackPopup != null) && (Form.ActiveForm == this.m_sendMonkWindow))) { this.m_sendMonkWindow.Focus(); } flag = false; } } if (this.isPopupWindowCreated(this.m_buyVillageWindow)) { this.m_buyVillageWindow.update(); if (flag) { Form form5 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_buyVillageWindow.Focus(); } flag = false; } } if (this.isPopupWindowCreated(this.m_connectionErrorWindow)) { this.m_connectionErrorWindow.update(); if (flag) { Form form6 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_connectionErrorWindow.Focus(); } flag = false; } } if (this.isPopupWindowCreated(this.m_currentDonatePopup)) { Form form7 = Form.ActiveForm; if (Form.ActiveForm != this.m_currentDonatePopup) { this.closeDonatePopup(); } } if (this.isPopupWindowCreated(this.m_logoutOptionsWindow)) { this.m_logoutOptionsWindow.update(); Form form8 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_logoutOptionsWindow.Focus(); } } if (this.isPopupWindowCreated(this.m_reportCapturePopup)) { this.m_reportCapturePopup.update(); Form form9 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_reportCapturePopup.Focus(); } } if (this.isPopupWindowCreated(this.m_newQuestRewardPopup)) { this.m_newQuestRewardPopup.update(); Form form10 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_newQuestRewardPopup.Focus(); } } if (this.isPopupWindowCreated(this.m_advancedCastleOptionsPopup)) { this.m_advancedCastleOptionsPopup.update(); Form form11 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_advancedCastleOptionsPopup.Focus(); } } if (this.isPopupWindowCreated(this.m_freeCardsPopup)) { this.m_freeCardsPopup.update(); Form form12 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_freeCardsPopup.Focus(); } } if (this.isPopupWindowCreated(this.m_WheelPopup)) { this.m_WheelPopup.update(); Form form13 = Form.ActiveForm; if (Form.ActiveForm == this.ParentForm) { this.m_WheelPopup.Focus(); } } if (this.isPopupWindowCreated(this.m_createPopupWindow)) { this.m_createPopupWindow.update(); } if (this.isPopupWindowCreated(this.m_VacationCancelPopupWindow)) { this.m_VacationCancelPopupWindow.update(); } if (this.isPopupWindowCreated(this.m_worldSelectPopupWindow)) { this.m_worldSelectPopupWindow.update(); } if (this.isPopupWindowCreated(this.m_BPPopupWindow)) { this.m_BPPopupWindow.update(); } if (this.isPopupWindowCreated(this.m_currentMenuPopup)) { this.m_currentMenuPopup.update(); } if (this.isPopupWindowCreated(this.m_achievementPopup)) { this.m_achievementPopup.update(); if (!this.m_achievementPopup.isActive()) { this.m_achievementPopup.Hide(); this.m_achievementPopup = null; if (this.nextAchievementIDs.Count > 0) { this.m_achievementPopup = new AchievementPopup(); this.m_achievementPopup.activate(this.nextAchievementIDs[0]); this.nextAchievementIDs.RemoveAt(0); } } } }
public void closeAchievementPopup() { if (this.m_achievementPopup != null) { this.closePopupWindow(this.m_achievementPopup); this.m_achievementPopup = null; } }
public void activateAchievementPopup(int id) { if (this.m_achievementPopup != null) { if (this.m_achievementPopup.isActive()) { this.nextAchievementIDs.Add(id); return; } this.m_achievementPopup = null; } this.m_achievementPopup = new AchievementPopup(); this.m_achievementPopup.activate(id); }