public void init(int tryingToJoinCounty, NewAutoSelectVillageWindow parent) { this.m_parent = parent; base.clearControls(); this.transparentBackground.Size = base.Size; this.transparentBackground.FillColor = Color.FromArgb(0xff, 0, 0xff); base.addControl(this.transparentBackground); this.background.Position = new Point(0, 0); this.background.Image = (Image)GFXLibrary.worldSelect_Background; this.background.Size = new Size(this.background.Image.Width, this.background.Image.Height); base.addControl(this.background); this.backgroundArea.Position = new Point(0, 0); this.backgroundArea.Size = new Size(0x271, 0x29c); this.background.addControl(this.backgroundArea); if (((Program.mySettings.LanguageIdent == "en") || (Program.mySettings.LanguageIdent == "fr")) || (Program.mySettings.LanguageIdent == "de")) { this.header1Label.Text = SK.Text("WorldSelect_Place_Your_Village1", "Place"); this.header1Label.Position = new Point(0x6c, 170); this.header1Label.Size = new Size(this.backgroundArea.Width - 200, 150); this.header1Label.Font = FontManager.GetFont("Arial", 24f, FontStyle.Regular); this.header1Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.header1Label.Color = ARGBColors.Black; this.header1Label.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.header1Label); } this.header2Label.Text = SK.Text("WorldSelect_Place_Your_Village2", "Your"); this.header2Label.Position = new Point(0x6c, 0xd7); this.header2Label.Size = new Size(this.backgroundArea.Width - 200, 150); this.header2Label.Font = FontManager.GetFont("Arial", 24f, FontStyle.Regular); this.header2Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.header2Label.Color = ARGBColors.Black; this.header2Label.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.header2Label); this.header3Label.Text = SK.Text("WorldSelect_Place_Your_Village3", "Village"); this.header3Label.Position = new Point(0x6c, 260); this.header3Label.Size = new Size(this.backgroundArea.Width - 200, 150); this.header3Label.Font = FontManager.GetFont("Arial", 24f, FontStyle.Regular); this.header3Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.header3Label.Color = ARGBColors.Black; this.header3Label.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.header3Label); this.btnEnterGame.ImageNorm = (Image)GFXLibrary.worldSelect_random_norm; this.btnEnterGame.ImageOver = (Image)GFXLibrary.worldSelect_random_over; this.btnEnterGame.ImageClick = (Image)GFXLibrary.worldSelect_random_pushed; this.btnEnterGame.Position = new Point(0xc1, 0x13c); this.btnEnterGame.Text.Text = SK.Text("WorldSelect_Random", "Random"); this.btnEnterGame.TextYOffset = -2; this.btnEnterGame.Text.Color = ARGBColors.White; this.btnEnterGame.Text.DropShadowColor = ARGBColors.Black; this.btnEnterGame.Text.Font = FontManager.GetFont("Arial", 20f, FontStyle.Regular); this.btnEnterGame.Text.Position = new Point(-3, 0); this.btnEnterGame.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.enterGameClicked)); this.btnEnterGame.Enabled = true; this.btnEnterGame.CustomTooltipID = 0x708; this.backgroundArea.addControl(this.btnEnterGame); this.btnAdvanced.ImageNorm = (Image)GFXLibrary.worldSelect_manual_norm; this.btnAdvanced.ImageOver = (Image)GFXLibrary.worldSelect_manual_over; this.btnAdvanced.ImageClick = (Image)GFXLibrary.worldSelect_manual_pushed; this.btnAdvanced.Position = new Point(0xc1, 0x1a0); this.btnAdvanced.Text.Text = SK.Text("WorldSelect_Manual", "Manual"); this.btnAdvanced.TextYOffset = -2; this.btnAdvanced.Text.Color = ARGBColors.White; this.btnAdvanced.Text.DropShadowColor = ARGBColors.Black; this.btnAdvanced.Text.Font = FontManager.GetFont("Arial", 20f, FontStyle.Regular); this.btnAdvanced.Text.Position = new Point(-3, 0); this.btnAdvanced.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.advancedClicked)); this.btnAdvanced.Enabled = true; this.btnAdvanced.CustomTooltipID = 0x709; this.backgroundArea.addControl(this.btnAdvanced); if (GameEngine.Instance.LocalWorldData.AIWorld) { this.btnAdvanced.Visible = false; } else { this.btnAdvanced.Visible = true; } this.btnLogout.ImageNorm = (Image)GFXLibrary.worldSelect_swap_norm; this.btnLogout.ImageOver = (Image)GFXLibrary.worldSelect_swap_over; this.btnLogout.ImageClick = (Image)GFXLibrary.worldSelect_swap_pushed; this.btnLogout.Position = new Point(0xf5, 0x204); this.btnLogout.Text.Text = SK.Text("LogoutPanel_Swap_Worlds", "Swap Worlds"); this.btnLogout.TextYOffset = -2; this.btnLogout.Text.Color = ARGBColors.White; this.btnLogout.Text.DropShadowColor = ARGBColors.Black; this.btnLogout.Text.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); this.btnLogout.Text.Position = new Point(-3, 0); this.btnLogout.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.logoutClick)); this.btnLogout.Enabled = true; this.btnLogout.CustomTooltipID = 0x70a; this.backgroundArea.addControl(this.btnLogout); this.delayedRetry = DateTime.MinValue; if (tryingToJoinCounty >= -1) { this.closePopup(); this.m_popup = new JoiningWorldPopup(); this.m_popup.init(-1, ""); this.m_popup.Show(this); this.btnEnterGame.Enabled = false; this.delayedRetry = DateTime.Now.AddSeconds(-25.0); GameEngine.Instance.tryingToJoinCounty = -2; } }
public void closeNoVillagePopup(bool pendingVillage) { if (this.noVillagePopup != null) { InterfaceMgr.Instance.ParentForm.Enabled = true; this.noVillagePopup.closePopup(); this.noVillagePopup.Close(); this.noVillagePopup = null; InterfaceMgr.Instance.closeGreyOut(); } if (this.lostVillagePopup != null) { if (this.lostVillagePopup.isCardsPopup()) { this.lostVillagePopup.closePopup(); this.lostVillagePopup.Close(); this.lostVillagePopup = null; } else { InterfaceMgr.Instance.ParentForm.Enabled = true; this.lostVillagePopup.closePopup(); this.lostVillagePopup.Close(); this.lostVillagePopup = null; InterfaceMgr.Instance.closeGreyOut(); } } if (this.noAutoVillagePopup != null) { InterfaceMgr.Instance.ParentForm.Enabled = true; this.noAutoVillagePopup.closePopup(); this.noAutoVillagePopup.Close(); this.noAutoVillagePopup = null; InterfaceMgr.Instance.closeGreyOut(); } if (pendingVillage) { this.pendingUserVillageZoom = true; } }
public void init(int tryingToJoinCounty, NewAutoSelectVillageWindow parent) { this.m_parent = parent; base.clearControls(); this.transparentBackground.Size = base.Size; this.transparentBackground.FillColor = Color.FromArgb(0xff, 0, 0xff); base.addControl(this.transparentBackground); this.background.Position = new Point(0, 0); this.background.Image = (Image) GFXLibrary.worldSelect_Background; this.background.Size = new Size(this.background.Image.Width, this.background.Image.Height); base.addControl(this.background); this.backgroundArea.Position = new Point(0, 0); this.backgroundArea.Size = new Size(0x271, 0x29c); this.background.addControl(this.backgroundArea); if (((Program.mySettings.LanguageIdent == "en") || (Program.mySettings.LanguageIdent == "fr")) || (Program.mySettings.LanguageIdent == "de")) { this.header1Label.Text = SK.Text("WorldSelect_Place_Your_Village1", "Place"); this.header1Label.Position = new Point(0x6c, 170); this.header1Label.Size = new Size(this.backgroundArea.Width - 200, 150); this.header1Label.Font = FontManager.GetFont("Arial", 24f, FontStyle.Regular); this.header1Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.header1Label.Color = ARGBColors.Black; this.header1Label.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.header1Label); } this.header2Label.Text = SK.Text("WorldSelect_Place_Your_Village2", "Your"); this.header2Label.Position = new Point(0x6c, 0xd7); this.header2Label.Size = new Size(this.backgroundArea.Width - 200, 150); this.header2Label.Font = FontManager.GetFont("Arial", 24f, FontStyle.Regular); this.header2Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.header2Label.Color = ARGBColors.Black; this.header2Label.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.header2Label); this.header3Label.Text = SK.Text("WorldSelect_Place_Your_Village3", "Village"); this.header3Label.Position = new Point(0x6c, 260); this.header3Label.Size = new Size(this.backgroundArea.Width - 200, 150); this.header3Label.Font = FontManager.GetFont("Arial", 24f, FontStyle.Regular); this.header3Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.header3Label.Color = ARGBColors.Black; this.header3Label.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.header3Label); this.btnEnterGame.ImageNorm = (Image) GFXLibrary.worldSelect_random_norm; this.btnEnterGame.ImageOver = (Image) GFXLibrary.worldSelect_random_over; this.btnEnterGame.ImageClick = (Image) GFXLibrary.worldSelect_random_pushed; this.btnEnterGame.Position = new Point(0xc1, 0x13c); this.btnEnterGame.Text.Text = SK.Text("WorldSelect_Random", "Random"); this.btnEnterGame.TextYOffset = -2; this.btnEnterGame.Text.Color = ARGBColors.White; this.btnEnterGame.Text.DropShadowColor = ARGBColors.Black; this.btnEnterGame.Text.Font = FontManager.GetFont("Arial", 20f, FontStyle.Regular); this.btnEnterGame.Text.Position = new Point(-3, 0); this.btnEnterGame.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.enterGameClicked)); this.btnEnterGame.Enabled = true; this.btnEnterGame.CustomTooltipID = 0x708; this.backgroundArea.addControl(this.btnEnterGame); this.btnAdvanced.ImageNorm = (Image) GFXLibrary.worldSelect_manual_norm; this.btnAdvanced.ImageOver = (Image) GFXLibrary.worldSelect_manual_over; this.btnAdvanced.ImageClick = (Image) GFXLibrary.worldSelect_manual_pushed; this.btnAdvanced.Position = new Point(0xc1, 0x1a0); this.btnAdvanced.Text.Text = SK.Text("WorldSelect_Manual", "Manual"); this.btnAdvanced.TextYOffset = -2; this.btnAdvanced.Text.Color = ARGBColors.White; this.btnAdvanced.Text.DropShadowColor = ARGBColors.Black; this.btnAdvanced.Text.Font = FontManager.GetFont("Arial", 20f, FontStyle.Regular); this.btnAdvanced.Text.Position = new Point(-3, 0); this.btnAdvanced.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.advancedClicked)); this.btnAdvanced.Enabled = true; this.btnAdvanced.CustomTooltipID = 0x709; this.backgroundArea.addControl(this.btnAdvanced); if (GameEngine.Instance.LocalWorldData.AIWorld) { this.btnAdvanced.Visible = false; } else { this.btnAdvanced.Visible = true; } this.btnLogout.ImageNorm = (Image) GFXLibrary.worldSelect_swap_norm; this.btnLogout.ImageOver = (Image) GFXLibrary.worldSelect_swap_over; this.btnLogout.ImageClick = (Image) GFXLibrary.worldSelect_swap_pushed; this.btnLogout.Position = new Point(0xf5, 0x204); this.btnLogout.Text.Text = SK.Text("LogoutPanel_Swap_Worlds", "Swap Worlds"); this.btnLogout.TextYOffset = -2; this.btnLogout.Text.Color = ARGBColors.White; this.btnLogout.Text.DropShadowColor = ARGBColors.Black; this.btnLogout.Text.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); this.btnLogout.Text.Position = new Point(-3, 0); this.btnLogout.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.logoutClick)); this.btnLogout.Enabled = true; this.btnLogout.CustomTooltipID = 0x70a; this.backgroundArea.addControl(this.btnLogout); this.delayedRetry = DateTime.MinValue; if (tryingToJoinCounty >= -1) { this.closePopup(); this.m_popup = new JoiningWorldPopup(); this.m_popup.init(-1, ""); this.m_popup.Show(this); this.btnEnterGame.Enabled = false; this.delayedRetry = DateTime.Now.AddSeconds(-25.0); GameEngine.Instance.tryingToJoinCounty = -2; } }
public void openSimpleSelectVillage() { InterfaceMgr.Instance.openGreyOutWindow(false); InterfaceMgr.Instance.ParentForm.Enabled = false; this.noAutoVillagePopup = new NewAutoSelectVillageWindow(); this.noAutoVillagePopup.init(this.tryingToJoinCounty); this.noAutoVillagePopup.Show(InterfaceMgr.Instance.getGreyOutWindow()); }