public void init(bool resized) { int height = base.Height; instance = this; base.clearControls(); this.backgroundImage.Image = (Image)GFXLibrary.body_background_002; this.backgroundImage.Size = new Size(base.Width, height - 40); this.backgroundImage.Tile = true; this.backgroundImage.Position = new Point(0, 40); base.addControl(this.backgroundImage); this.backgroundLeftEdge.Image = (Image)GFXLibrary.body_background_canvas_left_edge; this.backgroundLeftEdge.Position = new Point(0, 0); this.backgroundLeftEdge.Size = new Size(this.backgroundLeftEdge.Image.Width, height - 40); this.backgroundLeftEdge.Tile = true; this.backgroundImage.addControl(this.backgroundLeftEdge); this.headerImage.Size = new Size(base.Width, 40); this.headerImage.Position = new Point(0, 0); base.addControl(this.headerImage); this.headerImage.CreateX((Image)GFXLibrary.mail_top_drag_bar_left, (Image)GFXLibrary.mail_top_drag_bar_middle, (Image)GFXLibrary.mail_top_drag_bar_right, -2, 2); this.parishNameLabel.Text = SK.Text("Vassal_Manage_Vassal_Troops", "Manage Vassal Troops") + " : " + GameEngine.Instance.World.getVillageNameOrType(this.m_vassalVillageID); this.parishNameLabel.Color = ARGBColors.White; this.parishNameLabel.DropShadowColor = ARGBColors.Black; this.parishNameLabel.Position = new Point(20, 0); this.parishNameLabel.Size = new Size(base.Width - 40, 40); this.parishNameLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.parishNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerImage.addControl(this.parishNameLabel); this.cardbar.Position = new Point(0, 4); this.backgroundImage.addControl(this.cardbar); this.cardbar.init(6); this.atVassalLabel.Text = SK.Text("Vassal_StationedTroops", "Stationed Troops"); this.atVassalLabel.Position = new Point(0x73, 0x3a); this.atVassalLabel.Size = new Size(220, 40); this.atVassalLabel.Color = ARGBColors.Black; this.atVassalLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.atVassalLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.BOTTOM_LEFT; this.backgroundImage.addControl(this.atVassalLabel); this.troopsAvailableToSendLabel.Text = SK.Text("Vassal_AvailableToSend", "Troops Available to Send"); this.troopsAvailableToSendLabel.Position = new Point(0x163, 0x3a); this.troopsAvailableToSendLabel.Size = new Size(520, 40); this.troopsAvailableToSendLabel.Color = ARGBColors.Black; this.troopsAvailableToSendLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.troopsAvailableToSendLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.BOTTOM_LEFT; this.backgroundImage.addControl(this.troopsAvailableToSendLabel); this.trackBackImage.Image = (Image)GFXLibrary.reinforce_Vassal_screen_back; this.trackBackImage.Position = new Point(100, 100); this.backgroundImage.addControl(this.trackBackImage); int y = 14; this.peasantName2.Text = SK.Text("GENERIC_Peasants", "Peasants"); this.peasantName2.Position = new Point(-50, y); this.peasantName2.Size = new Size(0x8e, 40); this.peasantName2.Color = ARGBColors.Black; this.peasantName2.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.peasantName2.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.peasantName2); this.archerName2.Text = SK.Text("GENERIC_Archers", "Archers"); this.archerName2.Position = new Point(-50, y + 40); this.archerName2.Size = new Size(0x8e, 40); this.archerName2.Color = ARGBColors.Black; this.archerName2.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.archerName2.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.archerName2); this.pikemanName2.Text = SK.Text("GENERIC_Pikemen", "Pikemen"); this.pikemanName2.Position = new Point(-50, y + 80); this.pikemanName2.Size = new Size(0x8e, 40); this.pikemanName2.Color = ARGBColors.Black; this.pikemanName2.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.pikemanName2.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.pikemanName2); this.swordsmanName2.Text = SK.Text("GENERIC_Swordsmen", "Swordsmen"); this.swordsmanName2.Position = new Point(-50, y + 120); this.swordsmanName2.Size = new Size(0x8e, 40); this.swordsmanName2.Color = ARGBColors.Black; this.swordsmanName2.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.swordsmanName2.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.swordsmanName2); this.catapultName2.Text = SK.Text("GENERIC_Catapults", "Catapults"); this.catapultName2.Position = new Point(-50, y + 160); this.catapultName2.Size = new Size(0x8e, 40); this.catapultName2.Color = ARGBColors.Black; this.catapultName2.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.catapultName2.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.catapultName2); this.stationedTotalLabel.Text = SK.Text("GENERIC_Total_Troops", "Total Troops"); this.stationedTotalLabel.Position = new Point(-50, y + 200); this.stationedTotalLabel.Size = new Size(0x8e, 40); this.stationedTotalLabel.Color = ARGBColors.Black; this.stationedTotalLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.stationedTotalLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.stationedTotalLabel); this.maxValueLabel.Text = SK.Text("GENERIC_Max_Troops", "Max Troops"); this.maxValueLabel.Position = new Point(-50, y + 240); this.maxValueLabel.Size = new Size(0x8e, 40); this.maxValueLabel.Color = ARGBColors.Black; this.maxValueLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.maxValueLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.maxValueLabel); this.peasantStationedValue.Text = "0"; this.peasantStationedValue.Position = new Point(0x38, y); this.peasantStationedValue.Size = new Size(0x8e, 40); this.peasantStationedValue.Color = ARGBColors.Black; this.peasantStationedValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.peasantStationedValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.peasantStationedValue); this.archerStationedValue.Text = "0"; this.archerStationedValue.Position = new Point(0x38, y + 40); this.archerStationedValue.Size = new Size(0x8e, 40); this.archerStationedValue.Color = ARGBColors.Black; this.archerStationedValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.archerStationedValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.archerStationedValue); this.pikemanStationedValue.Text = "0"; this.pikemanStationedValue.Position = new Point(0x38, y + 80); this.pikemanStationedValue.Size = new Size(0x8e, 40); this.pikemanStationedValue.Color = ARGBColors.Black; this.pikemanStationedValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.pikemanStationedValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.pikemanStationedValue); this.swordsmanStationedValue.Text = "0"; this.swordsmanStationedValue.Position = new Point(0x38, y + 120); this.swordsmanStationedValue.Size = new Size(0x8e, 40); this.swordsmanStationedValue.Color = ARGBColors.Black; this.swordsmanStationedValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.swordsmanStationedValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.swordsmanStationedValue); this.catapultStationedValue.Text = "0"; this.catapultStationedValue.Position = new Point(0x38, y + 160); this.catapultStationedValue.Size = new Size(0x8e, 40); this.catapultStationedValue.Color = ARGBColors.Black; this.catapultStationedValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.catapultStationedValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.catapultStationedValue); this.stationedTotalValue.Text = "0"; this.stationedTotalValue.Position = new Point(0x38, y + 200); this.stationedTotalValue.Size = new Size(0x8e, 40); this.stationedTotalValue.Color = ARGBColors.Black; this.stationedTotalValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.stationedTotalValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.stationedTotalValue); this.maxValue.Text = "0"; this.maxValue.Position = new Point(0x38, y + 240); this.maxValue.Size = new Size(0x8e, 40); this.maxValue.Color = ARGBColors.Black; this.maxValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.maxValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.maxValue); this.peasantName.Text = SK.Text("GENERIC_Peasants", "Peasants"); this.peasantName.Position = new Point(190, y); this.peasantName.Size = new Size(0x8e, 40); this.peasantName.Color = ARGBColors.Black; this.peasantName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.peasantName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.peasantName); this.archerName.Text = SK.Text("GENERIC_Archers", "Archers"); this.archerName.Position = new Point(190, y + 40); this.archerName.Size = new Size(0x8e, 40); this.archerName.Color = ARGBColors.Black; this.archerName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.archerName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.archerName); this.pikemanName.Text = SK.Text("GENERIC_Pikemen", "Pikemen"); this.pikemanName.Position = new Point(190, y + 80); this.pikemanName.Size = new Size(0x8e, 40); this.pikemanName.Color = ARGBColors.Black; this.pikemanName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.pikemanName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.pikemanName); this.swordsmanName.Text = SK.Text("GENERIC_Swordsmen", "Swordsmen"); this.swordsmanName.Position = new Point(190, y + 120); this.swordsmanName.Size = new Size(0x8e, 40); this.swordsmanName.Color = ARGBColors.Black; this.swordsmanName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.swordsmanName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.swordsmanName); this.catapultName.Text = SK.Text("GENERIC_Catapults", "Catapults"); this.catapultName.Position = new Point(190, y + 160); this.catapultName.Size = new Size(0x8e, 40); this.catapultName.Color = ARGBColors.Black; this.catapultName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.catapultName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.catapultName); this.peasantStoredValue.Text = "0"; this.peasantStoredValue.Position = new Point(0x128, y); this.peasantStoredValue.Size = new Size(0x8e, 40); this.peasantStoredValue.Color = ARGBColors.Black; this.peasantStoredValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.peasantStoredValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.peasantStoredValue); this.archerStoredValue.Text = "0"; this.archerStoredValue.Position = new Point(0x128, y + 40); this.archerStoredValue.Size = new Size(0x8e, 40); this.archerStoredValue.Color = ARGBColors.Black; this.archerStoredValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.archerStoredValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.archerStoredValue); this.pikemanStoredValue.Text = "0"; this.pikemanStoredValue.Position = new Point(0x128, y + 80); this.pikemanStoredValue.Size = new Size(0x8e, 40); this.pikemanStoredValue.Color = ARGBColors.Black; this.pikemanStoredValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.pikemanStoredValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.pikemanStoredValue); this.swordsmanStoredValue.Text = "0"; this.swordsmanStoredValue.Position = new Point(0x128, y + 120); this.swordsmanStoredValue.Size = new Size(0x8e, 40); this.swordsmanStoredValue.Color = ARGBColors.Black; this.swordsmanStoredValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.swordsmanStoredValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.swordsmanStoredValue); this.catapultStoredValue.Text = "0"; this.catapultStoredValue.Position = new Point(0x128, y + 160); this.catapultStoredValue.Size = new Size(0x8e, 40); this.catapultStoredValue.Color = ARGBColors.Black; this.catapultStoredValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.catapultStoredValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.catapultStoredValue); this.peasantSendValue.Text = "0"; this.peasantSendValue.Position = new Point(0x128, y); this.peasantSendValue.Size = new Size(0x192, 40); this.peasantSendValue.Color = ARGBColors.Black; this.peasantSendValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.peasantSendValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.peasantSendValue); this.archerSendValue.Text = "0"; this.archerSendValue.Position = new Point(0x128, y + 40); this.archerSendValue.Size = new Size(0x192, 40); this.archerSendValue.Color = ARGBColors.Black; this.archerSendValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.archerSendValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.archerSendValue); this.pikemanSendValue.Text = "0"; this.pikemanSendValue.Position = new Point(0x128, y + 80); this.pikemanSendValue.Size = new Size(0x192, 40); this.pikemanSendValue.Color = ARGBColors.Black; this.pikemanSendValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.pikemanSendValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.pikemanSendValue); this.swordsmanSendValue.Text = "0"; this.swordsmanSendValue.Position = new Point(0x128, y + 120); this.swordsmanSendValue.Size = new Size(0x192, 40); this.swordsmanSendValue.Color = ARGBColors.Black; this.swordsmanSendValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.swordsmanSendValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.swordsmanSendValue); this.catapultSendValue.Text = "0"; this.catapultSendValue.Position = new Point(0x128, y + 160); this.catapultSendValue.Size = new Size(0x192, 40); this.catapultSendValue.Color = ARGBColors.Black; this.catapultSendValue.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.catapultSendValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.trackBackImage.addControl(this.catapultSendValue); this.peasantsTrack.Position = new Point(0x1bf, 15); this.peasantsTrack.Size = new Size(0xcb, 0x17); this.peasantsTrack.Max = 100; if (!resized) { this.peasantsTrack.Value = 0; } this.peasantsTrack.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.tracksMoved0)); this.trackBackImage.addControl(this.peasantsTrack); this.peasantsTrack.Create(null, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider); this.peasantsEditButton.ImageNorm = (Image)GFXLibrary.faction_pen; this.peasantsEditButton.ImageOver = (Image)GFXLibrary.faction_pen; this.peasantsEditButton.ImageClick = (Image)GFXLibrary.faction_pen; this.peasantsEditButton.MoveOnClick = true; this.peasantsEditButton.OverBrighten = true; this.peasantsEditButton.Position = new Point(0x293, 12); this.peasantsEditButton.Data = 1; this.peasantsEditButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.editSendValue), "SendArmyPanel_editValue"); this.trackBackImage.addControl(this.peasantsEditButton); this.archerTrack.Position = new Point(0x1bf, 0x37); this.archerTrack.Size = new Size(0xcb, 0x17); this.archerTrack.Max = 100; if (!resized) { this.archerTrack.Value = 0; } this.archerTrack.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.tracksMoved1)); this.trackBackImage.addControl(this.archerTrack); this.archerTrack.Create(null, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider); this.archerEditButton.ImageNorm = (Image)GFXLibrary.faction_pen; this.archerEditButton.ImageOver = (Image)GFXLibrary.faction_pen; this.archerEditButton.ImageClick = (Image)GFXLibrary.faction_pen; this.archerEditButton.MoveOnClick = true; this.archerEditButton.OverBrighten = true; this.archerEditButton.Position = new Point(0x293, 0x34); this.archerEditButton.Data = 2; this.archerEditButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.editSendValue), "SendArmyPanel_editValue"); this.trackBackImage.addControl(this.archerEditButton); this.pikemanTrack.Position = new Point(0x1bf, 0x5f); this.pikemanTrack.Size = new Size(0xcb, 0x17); this.pikemanTrack.Max = 100; if (!resized) { this.pikemanTrack.Value = 0; } this.pikemanTrack.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.tracksMoved2)); this.trackBackImage.addControl(this.pikemanTrack); this.pikemanTrack.Create(null, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider); this.pikemanEditButton.ImageNorm = (Image)GFXLibrary.faction_pen; this.pikemanEditButton.ImageOver = (Image)GFXLibrary.faction_pen; this.pikemanEditButton.ImageClick = (Image)GFXLibrary.faction_pen; this.pikemanEditButton.MoveOnClick = true; this.pikemanEditButton.OverBrighten = true; this.pikemanEditButton.Position = new Point(0x293, 0x5c); this.pikemanEditButton.Data = 3; this.pikemanEditButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.editSendValue), "SendArmyPanel_editValue"); this.trackBackImage.addControl(this.pikemanEditButton); this.swordsmanTrack.Position = new Point(0x1bf, 0x87); this.swordsmanTrack.Size = new Size(0xcb, 0x17); this.swordsmanTrack.Max = 100; if (!resized) { this.swordsmanTrack.Value = 0; } this.swordsmanTrack.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.tracksMoved3)); this.trackBackImage.addControl(this.swordsmanTrack); this.swordsmanTrack.Create(null, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider); this.swordsmanEditButton.ImageNorm = (Image)GFXLibrary.faction_pen; this.swordsmanEditButton.ImageOver = (Image)GFXLibrary.faction_pen; this.swordsmanEditButton.ImageClick = (Image)GFXLibrary.faction_pen; this.swordsmanEditButton.MoveOnClick = true; this.swordsmanEditButton.OverBrighten = true; this.swordsmanEditButton.Position = new Point(0x293, 0x84); this.swordsmanEditButton.Data = 4; this.swordsmanEditButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.editSendValue), "SendArmyPanel_editValue"); this.trackBackImage.addControl(this.swordsmanEditButton); this.catapultTrack.Position = new Point(0x1bf, 0xaf); this.catapultTrack.Size = new Size(0xcb, 0x17); this.catapultTrack.Max = 100; if (!resized) { this.catapultTrack.Value = 0; } this.catapultTrack.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.tracksMoved4)); this.trackBackImage.addControl(this.catapultTrack); this.catapultTrack.Create(null, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider); this.catapultEditButton.ImageNorm = (Image)GFXLibrary.faction_pen; this.catapultEditButton.ImageOver = (Image)GFXLibrary.faction_pen; this.catapultEditButton.ImageClick = (Image)GFXLibrary.faction_pen; this.catapultEditButton.MoveOnClick = true; this.catapultEditButton.OverBrighten = true; this.catapultEditButton.Position = new Point(0x293, 0xac); this.catapultEditButton.Data = 5; this.catapultEditButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.editSendValue), "SendArmyPanel_editValue"); this.trackBackImage.addControl(this.catapultEditButton); this.btnSend.ImageNorm = (Image)GFXLibrary.brown_mail2_button_blue_141wide_normal; this.btnSend.ImageOver = (Image)GFXLibrary.brown_mail2_button_blue_141wide_over; this.btnSend.ImageClick = (Image)GFXLibrary.brown_mail2_button_blue_141wide_pushed; this.btnSend.Position = new Point(600, 0xcd); this.btnSend.Text.Text = SK.Text("VassalArmiesPanel_", "Send"); this.btnSend.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.btnSend.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.btnSend.TextYOffset = -3; this.btnSend.Text.Color = ARGBColors.Black; this.btnSend.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendClick), "VassalArmiesPanel2_send"); this.btnSend.Enabled = false; this.trackBackImage.addControl(this.btnSend); if (GameEngine.Instance.World.isVassal(this.m_playerVillageID, this.m_vassalVillageID)) { this.btnSend.Visible = true; } else { this.btnSend.Visible = false; } this.updateValues(); if (!resized) { RemoteServices.Instance.set_GetVassalArmyInfo_UserCallBack(new RemoteServices.GetVassalArmyInfo_UserCallBack(this.getVassalArmyInfoCallback)); RemoteServices.Instance.GetVassalArmyInfo(this.m_vassalVillageID, 0, -1); } this.btnClose.ImageNorm = (Image)GFXLibrary.brown_misc_button_blue_210wide_normal; this.btnClose.ImageOver = (Image)GFXLibrary.brown_misc_button_blue_210wide_over; this.btnClose.ImageClick = (Image)GFXLibrary.brown_misc_button_blue_210wide_pushed; this.btnClose.Position = new Point(base.Width - 230, ((height - 40) - 40) - 4); this.btnClose.Text.Text = SK.Text("GENERIC_Close", "Close"); this.btnClose.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.btnClose.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.btnClose.TextYOffset = -3; this.btnClose.Text.Color = ARGBColors.Black; this.btnClose.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "VassalArmiesPanel2_close"); this.backgroundImage.addControl(this.btnClose); }
public AdvancedCastleOptionsPopup() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public DebugPopup() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void init() { base.clearControls(); this.backImage = this.backGround.init(true, 0x5e2); this.backGround.updateHeading(SK.Text("MapFilterSelectPanel_Map_Filtering", "Map Filtering")); base.addControl(this.backGround); this.backGround.stretchBackground(); this.selectedImage.Image = (Image)GFXLibrary.mrhp_world_icons_filter_selected; this.selectedImage.Position = new Point(6, 0x2d); this.selectedImage.Visible = false; this.backImage.addControl(this.selectedImage); this.tradeButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0]; this.tradeButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[7]; this.tradeButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[14]; this.tradeButton.Position = new Point(0x73, 0x2a); this.tradeButton.CustomTooltipID = 0x996; this.tradeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tradeClick), "MapFilterPanel2_trade"); this.backImage.addControl(this.tradeButton); this.attackButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[1]; this.attackButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[8]; this.attackButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[15]; this.attackButton.Position = new Point(80, 0x4c); this.attackButton.CustomTooltipID = 0x997; this.attackButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.attackClick), "MapFilterPanel2_attack"); this.backImage.addControl(this.attackButton); this.scoutButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[3]; this.scoutButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[10]; this.scoutButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0x11]; this.scoutButton.Position = new Point(0x2d, 0x4c); this.scoutButton.CustomTooltipID = 0x998; this.scoutButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.scoutsClick), "MapFilterPanel2_scout"); this.backImage.addControl(this.scoutButton); this.houseButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[6]; this.houseButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[13]; this.houseButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[20]; this.houseButton.Position = new Point(0x2d, 0x2a); this.houseButton.CustomTooltipID = 0x999; this.houseButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.houseClick), "MapFilterPanel2_house"); this.backImage.addControl(this.houseButton); this.factionButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0x24]; this.factionButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0x25]; this.factionButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0x26]; this.factionButton.Position = new Point(80, 0x2a); if (RemoteServices.Instance.UserFactionID >= 0) { this.factionButton.CustomTooltipID = 0x99a; } else { this.factionButton.CustomTooltipID = 0x99d; } this.factionButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.factionClick), "MapFilterPanel2_faction"); this.backImage.addControl(this.factionButton); this.aiButton.ImageNorm = (Image)GFXLibrary.mrhp_button_filter_ai[0]; this.aiButton.ImageOver = (Image)GFXLibrary.mrhp_button_filter_ai[1]; this.aiButton.ImageClick = (Image)GFXLibrary.mrhp_button_filter_ai[2]; this.aiButton.Position = new Point(0x73, 0x4c); this.aiButton.CustomTooltipID = 0x99e; this.aiButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.aiClick), "MapFilterPanel2_ai"); this.backImage.addControl(this.aiButton); this.yourVillages.CheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[0]; this.yourVillages.UncheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[1]; this.yourVillages.Position = new Point(15, 0x75); this.yourVillages.Checked = GameEngine.Instance.World.worldMapFilter.FilterAlwaysShowYourVillages; this.yourVillages.CBLabel.Text = SK.Text("MapFilterPanel_Always_Show_Your_Villages", "Always Show Your Villages"); this.yourVillages.CBLabel.Color = ARGBColors.Black; this.yourVillages.CBLabel.Position = new Point(20, -1); this.yourVillages.CBLabel.Size = new Size(180, 0x19); this.yourVillages.CBLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); this.yourVillages.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.yourToggled)); this.backImage.addControl(this.yourVillages); this.diplomacyLabel.Text = SK.Text("MapFilterPanel_Diplomacy", "Diplomacy Symbols"); this.diplomacyLabel.Position = new Point(5, 0x89); this.diplomacyLabel.Color = ARGBColors.Black; this.diplomacyLabel.Size = new Size(180, 0x19); this.diplomacyLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Bold); this.diplomacyLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.backImage.addControl(this.diplomacyLabel); this.houseSymbols.CheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[0]; this.houseSymbols.UncheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[1]; this.houseSymbols.Position = new Point(15, 0x9d); this.houseSymbols.Checked = GameEngine.Instance.World.worldMapFilter.FilterShowHouseSymbols; this.houseSymbols.CBLabel.Text = SK.Text("MapFilterPanel_Show_House_Symbols", "Show House Symbols"); this.houseSymbols.CBLabel.Color = ARGBColors.Black; this.houseSymbols.CBLabel.Position = new Point(20, -1); this.houseSymbols.CBLabel.Size = new Size(180, 0x19); this.houseSymbols.CBLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); this.houseSymbols.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.houseToggled)); this.backImage.addControl(this.houseSymbols); this.factionSymbols.CheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[0]; this.factionSymbols.UncheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[1]; this.factionSymbols.Position = new Point(15, 0xb1); this.factionSymbols.Checked = GameEngine.Instance.World.worldMapFilter.FilterShowFactionSymbols; this.factionSymbols.CBLabel.Text = SK.Text("MapFilterPanel_Show_Faction_Symbols", "Show Faction Symbols"); this.factionSymbols.CBLabel.Color = ARGBColors.Black; this.factionSymbols.CBLabel.Position = new Point(20, -1); this.factionSymbols.CBLabel.Size = new Size(180, 0x19); this.factionSymbols.CBLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); this.factionSymbols.Data = 0; this.factionSymbols.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.factionToggled)); this.backImage.addControl(this.factionSymbols); this.userSymbols.CheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[0]; this.userSymbols.UncheckedImage = (Image)GFXLibrary.mrhp_world_filter_check[1]; this.userSymbols.Position = new Point(15, 0xc5); this.userSymbols.Checked = GameEngine.Instance.World.worldMapFilter.FilterShowUserSymbols; this.userSymbols.CBLabel.Text = SK.Text("MapFilterPanel_Show_User_Symbols", "Show Player Symbols"); this.userSymbols.CBLabel.Color = ARGBColors.Black; this.userSymbols.CBLabel.Position = new Point(20, -1); this.userSymbols.CBLabel.Size = new Size(180, 0x19); this.userSymbols.CBLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); this.userSymbols.Data = 0; this.userSymbols.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.userToggled)); this.backImage.addControl(this.userSymbols); this.searchButton.ImageNorm = (Image)GFXLibrary.mrhp_button_filter_search[0]; this.searchButton.ImageOver = (Image)GFXLibrary.mrhp_button_filter_search[1]; this.searchButton.ImageClick = (Image)GFXLibrary.mrhp_button_filter_search[2]; this.searchButton.Position = new Point(0x67, 0xd7); this.searchButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.searchFilter), "StatsPanel_search"); this.searchButton.CustomTooltipID = 0x99c; this.backImage.addControl(this.searchButton); this.clearButton.ImageNorm = (Image)GFXLibrary.mrhp_button_filter_off[0]; this.clearButton.ImageOver = (Image)GFXLibrary.mrhp_button_filter_off[1]; this.clearButton.ImageClick = (Image)GFXLibrary.mrhp_button_filter_off[2]; this.clearButton.Position = new Point(0x13, 0xd7); this.clearButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clearFilter), "MapFilterPanel2_clear"); this.clearButton.CustomTooltipID = 0x99b; this.backImage.addControl(this.clearButton); this.cancelButton.ImageNorm = (Image)GFXLibrary.mrhp_button_80_normal; this.cancelButton.ImageOver = (Image)GFXLibrary.mrhp_button_80_over; this.cancelButton.ImageClick = (Image)GFXLibrary.mrhp_button_80_pushed; this.cancelButton.Position = new Point(0x67, 0xd7); this.cancelButton.Text.Text = SK.Text("GENERIC_Close", "Close"); this.cancelButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.cancelButton.Text.Size = new Size(this.cancelButton.ImageNorm.Size.Width - 6, this.cancelButton.ImageNorm.Size.Height); this.cancelButton.TextYOffset = -3; this.cancelButton.Text.Color = ARGBColors.Black; this.cancelButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "MapFilterPanel2_close"); this.backImage.invalidate(); InterfaceMgr.Instance.closeArmySelectedPanel(); InterfaceMgr.Instance.closeTraderInfoPanel(); InterfaceMgr.Instance.closeReinforcementSelectedPanel(); InterfaceMgr.Instance.closePersonInfoPanel(); InterfaceMgr.Instance.closeSelectedVillagePanel(); int filterMode = GameEngine.Instance.World.worldMapFilter.FilterMode; if (GameEngine.Instance.World.worldMapFilter.FilterActive) { switch (filterMode) { case 0: return; case 1: case 7: this.selectedImage.Position = this.factionButton.Position; this.selectedImage.Position = new Point(this.selectedImage.Position.X - 5, this.selectedImage.Position.Y - 5); this.selectedImage.Visible = true; return; case 2: this.selectedImage.Position = this.houseButton.Position; this.selectedImage.Position = new Point(this.selectedImage.Position.X - 5, this.selectedImage.Position.Y - 5); this.selectedImage.Visible = true; return; case 3: this.selectedImage.Position = this.scoutButton.Position; this.selectedImage.Position = new Point(this.selectedImage.Position.X - 5, this.selectedImage.Position.Y - 5); this.selectedImage.Visible = true; return; case 4: this.selectedImage.Position = this.tradeButton.Position; this.selectedImage.Position = new Point(this.selectedImage.Position.X - 5, this.selectedImage.Position.Y - 5); this.selectedImage.Visible = true; return; case 5: this.selectedImage.Position = this.tradeButton.Position; this.selectedImage.Position = new Point(this.selectedImage.Position.X - 5, this.selectedImage.Position.Y - 5); this.selectedImage.Visible = true; return; case 6: this.selectedImage.Position = this.attackButton.Position; this.selectedImage.Position = new Point(this.selectedImage.Position.X - 5, this.selectedImage.Position.Y - 5); this.selectedImage.Visible = true; return; case 8: this.selectedImage.Position = this.aiButton.Position; this.selectedImage.Position = new Point(this.selectedImage.Position.X - 5, this.selectedImage.Position.Y - 5); this.selectedImage.Visible = true; return; } } }
public BuyVillagePopupWindow() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void addPlayers() { this.wallScrollArea.clearControls(); int y = 0; this.lineList.Clear(); int yourVotes = 0; if (this.parishMembers != null) { foreach (ParishMember member in this.parishMembers) { if (member.userID == RemoteServices.Instance.UserID) { yourVotes = member.numSpareVotes; break; } } if ((GameEngine.Instance.World.getRank() + 1) < GameEngine.Instance.LocalWorldData.MinParishVoteRank) { int minParishVoteRank = GameEngine.Instance.LocalWorldData.MinParishVoteRank; yourVotes = 0; this.votesAvailableLabel.Text = SK.Text("ParishPanel_Rank_Required", "Rank Required") + " : " + Rankings.getRankingName(minParishVoteRank - 1) + " ( " + minParishVoteRank.ToString() + " )"; this.votesAvailableLabel.Size = new Size(400, 40); this.votesAvailableLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.voteCapLabelValue.Visible = false; this.voteCapLabel.Visible = false; this.votesAvailableLabelValue.Visible = false; } else { this.votesAvailableLabelValue.Text = yourVotes.ToString(); } this.parishMembers.Sort(this.parishMemberComparer); int position = 0; foreach (ParishMember member2 in this.parishMembers) { VoteLine control = new VoteLine(); if (y != 0) { y += 5; } control.Position = new Point(0, y); if (member2.numVotesReceived > this.voteCap) { int voteCap = this.voteCap; } control.init(member2.userName, member2.userID, member2.rank, member2.points, this.votingAllowed, member2.numSpareVotes, member2.numVotesReceived, member2.factionID, yourVotes, position, this); this.wallScrollArea.addControl(control); y += control.Height; this.lineList.Add(control); position++; } } this.wallScrollArea.Size = new Size(this.wallScrollArea.Width, y); if (y < this.wallScrollBar.Height) { this.wallScrollBar.Visible = false; } else { this.wallScrollBar.Visible = true; this.wallScrollBar.NumVisibleLines = this.wallScrollBar.Height; this.wallScrollBar.Max = y - this.wallScrollBar.Height; } this.wallScrollArea.invalidate(); this.wallScrollBar.invalidate(); this.stewardLabel.Text = SK.Text("ParishWallPanel_Steward", "Steward") + " : " + this.currentLeaderName; this.m_userIDOnCurrent = this.currentLeaderID; TimeSpan span = (TimeSpan)(VillageMap.getCurrentServerTime() - this.lastProclamationTime); if (this.currentLeaderID == RemoteServices.Instance.UserID) { this.proclamationButton.Visible = true; if (span.TotalDays >= 7.0) { this.proclamationButton.Enabled = true; this.proclamationLabel.Visible = false; } else { this.proclamationButton.Enabled = false; this.proclamationLabel.Visible = true; } } else { this.proclamationButton.Visible = false; this.proclamationLabel.Visible = false; } this.update(); }
public void init(bool fromTutorial, PostTutorialWindow parent) { this.m_parent = parent; base.clearControls(); int total = 10; if ((GameEngine.Instance.World.isBigpointAccount || Program.bigpointInstall) || (Program.aeriaInstall || Program.bigpointPartnerInstall)) { total = 9; } 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 (fromTutorial) { this.header3Label.Text = SK.Text("PT_TUT_header1", "Congratulations!"); this.header3Label.Position = new Point(8, 0xd8); this.header3Label.Size = new Size(this.backgroundArea.Width, 150); this.header3Label.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); 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.header1Label.Text = SK.Text("PT_TUT_header2", "You have completed the Stronghold Kingdoms Tutorial."); this.header1Label.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); } else { this.header1Label.Text = SK.Text("PT_header1", "Welcome to the Stronghold Kingdoms Player Guide"); this.header1Label.Font = FontManager.GetFont("Arial", 11f, FontStyle.Bold); } this.header1Label.Position = new Point(8, 0x100); this.header1Label.Size = new Size(this.backgroundArea.Width, 150); 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("PT_header2", "Here are a few suggestions for what to do next") + ":"; this.header2Label.Position = new Point(0x6c, 0x115); this.header2Label.Size = new Size(this.backgroundArea.Width - 200, 0x22); this.header2Label.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.header2Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.header2Label.Color = ARGBColors.Black; this.header2Label.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.header2Label); int num2 = 0; this.feature1Button.ImageNorm = (Image)GFXLibrary.pt_Research; this.feature1Button.ImageOver = (Image)GFXLibrary.pt_Research_over; this.feature1Button.ImageClick = (Image)GFXLibrary.pt_Research_down; this.feature1Button.Position = this.getIconPosition(num2++, total); this.feature1Button.Data = 0; this.feature1Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature1Button.CustomTooltipID = 0x10cc; this.background.addControl(this.feature1Button); this.feature2Button.ImageNorm = (Image)GFXLibrary.pt_rank; this.feature2Button.ImageOver = (Image)GFXLibrary.pt_rank_over; this.feature2Button.ImageClick = (Image)GFXLibrary.pt_rank_down; this.feature2Button.Position = this.getIconPosition(num2++, total); this.feature2Button.Data = 1; this.feature2Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature2Button.CustomTooltipID = 0x10cd; this.background.addControl(this.feature2Button); this.feature3Button.ImageNorm = (Image)GFXLibrary.pt_Achievements; this.feature3Button.ImageOver = (Image)GFXLibrary.pt_Achievements_over; this.feature3Button.ImageClick = (Image)GFXLibrary.pt_Achievements_down; this.feature3Button.Position = this.getIconPosition(num2++, total); this.feature3Button.Data = 2; this.feature3Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature3Button.CustomTooltipID = 0x10ce; this.background.addControl(this.feature3Button); this.feature4Button.ImageNorm = (Image)GFXLibrary.pt_Quests; this.feature4Button.ImageOver = (Image)GFXLibrary.pt_Quests_over; this.feature4Button.ImageClick = (Image)GFXLibrary.pt_Quests_down; this.feature4Button.Position = this.getIconPosition(num2++, total); this.feature4Button.Data = 3; this.feature4Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature4Button.CustomTooltipID = 0x10cf; this.background.addControl(this.feature4Button); this.feature5Button.ImageNorm = (Image)GFXLibrary.pt_Reports; this.feature5Button.ImageOver = (Image)GFXLibrary.pt_Reports_over; this.feature5Button.ImageClick = (Image)GFXLibrary.pt_Reports_down; this.feature5Button.Position = this.getIconPosition(num2++, total); this.feature5Button.Data = 4; this.feature5Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature5Button.CustomTooltipID = 0x10d0; this.background.addControl(this.feature5Button); this.feature6Button.ImageNorm = (Image)GFXLibrary.pt_Coat_of_Arms; this.feature6Button.ImageOver = (Image)GFXLibrary.pt_Coat_of_Arms_over; this.feature6Button.ImageClick = (Image)GFXLibrary.pt_Coat_of_Arms_down; this.feature6Button.Position = this.getIconPosition(num2++, total); this.feature6Button.Data = 5; this.feature6Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature6Button.CustomTooltipID = 0x10d1; this.background.addControl(this.feature6Button); this.feature7Button.ImageNorm = (Image)GFXLibrary.pt_Avatar; this.feature7Button.ImageOver = (Image)GFXLibrary.pt_Avatar_over; this.feature7Button.ImageClick = (Image)GFXLibrary.pt_Avatar_down; this.feature7Button.Position = this.getIconPosition(num2++, total); this.feature7Button.Data = 6; this.feature7Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature7Button.CustomTooltipID = 0x10d2; this.background.addControl(this.feature7Button); if (total == 10) { this.feature8Button.ImageNorm = (Image)GFXLibrary.pt_Invite_a_Friend; this.feature8Button.ImageOver = (Image)GFXLibrary.pt_Invite_a_Friend_over; this.feature8Button.ImageClick = (Image)GFXLibrary.pt_Invite_a_Friend_down; this.feature8Button.Position = this.getIconPosition(num2++, total); this.feature8Button.Data = 7; this.feature8Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature8Button.CustomTooltipID = 0x10d3; this.background.addControl(this.feature8Button); } this.feature9Button.ImageNorm = (Image)GFXLibrary.pt_Parish_Wall; this.feature9Button.ImageOver = (Image)GFXLibrary.pt_Parish_Wall_over; this.feature9Button.ImageClick = (Image)GFXLibrary.pt_Parish_Wall_down; this.feature9Button.Position = this.getIconPosition(num2++, total); this.feature9Button.Data = 8; this.feature9Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature9Button.CustomTooltipID = 0x10d4; this.background.addControl(this.feature9Button); this.feature10Button.ImageNorm = (Image)GFXLibrary.pt_Mail; this.feature10Button.ImageOver = (Image)GFXLibrary.pt_Mail_over; this.feature10Button.ImageClick = (Image)GFXLibrary.pt_Mail_down; this.feature10Button.Position = this.getIconPosition(num2++, total); this.feature10Button.Data = 9; this.feature10Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.iconClicked)); this.feature10Button.CustomTooltipID = 0x10d5; this.background.addControl(this.feature10Button); 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("GENERIC_Close", "Close"); 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.backgroundArea.addControl(this.btnLogout); this.showCheck.CheckedImage = (Image)GFXLibrary.reports_checkbox_checked; this.showCheck.UncheckedImage = (Image)GFXLibrary.reports_checkbox_empty; this.showCheck.Position = new Point(0xe1, 0x1ee); this.showCheck.Checked = Program.mySettings.showGameFeaturesScreenIcon; this.showCheck.CBLabel.Text = SK.Text("PT_show_icon", "Show Player Guide icon"); this.showCheck.CBLabel.Color = ARGBColors.Black; this.showCheck.CBLabel.Position = new Point(20, -1); this.showCheck.CBLabel.Size = new Size(360, 0x23); this.showCheck.CBLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.showCheck.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.checkToggled)); this.backgroundArea.addControl(this.showCheck); }
public void init(FactionData factionData, int position, FactionAllFactionsPanel parent) { this.m_parent = parent; this.m_position = position; this.m_factionData = factionData; this.ClipVisible = true; this.clearControls(); if ((position & 1) == 0) { this.backgroundImage.Image = (Image)GFXLibrary.lineitem_strip_02_light; } else { this.backgroundImage.Image = (Image)GFXLibrary.lineitem_strip_02_dark; } this.backgroundImage.Position = new Point(60, 0); base.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); base.addControl(this.backgroundImage); this.Size = this.backgroundImage.Size; this.flagImage.createFromFlagData(factionData.flagData); this.flagImage.Position = new Point(0, 0); this.flagImage.Scale = 0.25; this.flagImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); base.addControl(this.flagImage); NumberFormatInfo nFI = GameEngine.NFI; this.factionName.Text = factionData.factionName; this.factionName.Color = ARGBColors.Black; this.factionName.Position = new Point(9, 0); this.factionName.Size = new Size(220, this.backgroundImage.Height); this.factionName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.factionName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.factionName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); this.backgroundImage.addControl(this.factionName); this.numPlayersLabel.Text = factionData.numMembers.ToString("N", nFI); this.numPlayersLabel.Color = ARGBColors.Black; this.numPlayersLabel.Position = new Point(0xd7, 0); this.numPlayersLabel.Size = new Size(100, this.backgroundImage.Height); this.numPlayersLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.numPlayersLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT; this.numPlayersLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); this.backgroundImage.addControl(this.numPlayersLabel); this.pointsLabel.Text = factionData.points.ToString("N", nFI); this.pointsLabel.Color = ARGBColors.Black; this.pointsLabel.Position = new Point(390, 0); this.pointsLabel.Size = new Size(100, this.backgroundImage.Height); this.pointsLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.pointsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT; this.pointsLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); this.backgroundImage.addControl(this.pointsLabel); if (factionData.numMembers < GameEngine.Instance.LocalWorldData.Faction_MaxMembers) { if (factionData.openForApplications) { this.membershipLabel.Text = SK.Text("FactionInvites_Membership_open", "Open"); } else { this.membershipLabel.Text = SK.Text("FactionInvites_Membership_closed", "Closed"); } } else { this.membershipLabel.Text = SK.Text("FactionInvites_Membership_Full", "Full"); } this.membershipLabel.Color = ARGBColors.Black; this.membershipLabel.Position = new Point(530, 0); this.membershipLabel.Size = new Size(160, this.backgroundImage.Height); this.membershipLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.membershipLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.membershipLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); this.backgroundImage.addControl(this.membershipLabel); int num = GameEngine.Instance.World.getYourFactionRelation(factionData.factionID); if (num != 0) { if (num > 0) { this.allianceImage.Image = (Image)GFXLibrary.faction_relationships[0]; this.allianceImage.CustomTooltipID = 0x8ff; } else { this.allianceImage.Image = (Image)GFXLibrary.faction_relationships[2]; this.allianceImage.CustomTooltipID = 0x900; } this.allianceImage.Position = new Point(0xda, 2); this.allianceImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); this.backgroundImage.addControl(this.allianceImage); } base.invalidate(); }
public void init(bool resized) { int height = base.Height; this.blockYSize = height / 2; instance = this; base.clearControls(); this.sidebar.addSideBar(4, this); this.mainBackgroundImage.FillColor = Color.FromArgb(0x86, 0x99, 0xa5); this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = new Size(base.Width - 200, height); base.addControl(this.mainBackgroundImage); this.backgroundFade.Image = (Image)GFXLibrary.background_top; this.backgroundFade.Position = new Point(0, 0); this.backgroundFade.Size = new Size(base.Width - 200, this.backgroundFade.Image.Height); this.mainBackgroundImage.addControl(this.backgroundFade); this.headerLabelsImage.Size = new Size(((base.Width - 0x19) - 0x17) - 200, 0x1c); this.headerLabelsImage.Position = new Point(0x19, 5); this.mainBackgroundImage.addControl(this.headerLabelsImage); this.headerLabelsImage.Create((Image)GFXLibrary.mail2_field_bar_mail_left, (Image)GFXLibrary.mail2_field_bar_mail_middle, (Image)GFXLibrary.mail2_field_bar_mail_right); this.headerLabelsImage2.Size = new Size(((base.Width - 0x19) - 0x17) - 200, 0x1c); this.headerLabelsImage2.Position = new Point(0x19, this.blockYSize + 5); this.mainBackgroundImage.addControl(this.headerLabelsImage2); this.headerLabelsImage2.Create((Image)GFXLibrary.mail2_field_bar_mail_left, (Image)GFXLibrary.mail2_field_bar_mail_middle, (Image)GFXLibrary.mail2_field_bar_mail_right); this.alliesLabel.Text = SK.Text("FactionDiplomacy_Allies", "Allies"); this.alliesLabel.Color = ARGBColors.Black; this.alliesLabel.Position = new Point(9, -2); this.alliesLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.alliesLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.alliesLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.alliesLabel); this.enemiesLabel.Text = SK.Text("FactionDiplomacy_Enemies", "Enemies"); this.enemiesLabel.Color = ARGBColors.Black; this.enemiesLabel.Position = new Point(9, -2); this.enemiesLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.enemiesLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.enemiesLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage2.addControl(this.enemiesLabel); InterfaceMgr.Instance.setVillageHeading(SK.Text("AllArmiesPanel_Diplomacy", "Diplomacy")); this.alliesScrollArea.Position = new Point(0x19, 40); this.alliesScrollArea.Size = new Size(0x2cb, (this.blockYSize - 40) - 10); this.alliesScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x393, (this.blockYSize - 40) - 10)); this.mainBackgroundImage.addControl(this.alliesScrollArea); this.mouseWheelOverlay1.Position = this.alliesScrollArea.Position; this.mouseWheelOverlay1.Size = this.alliesScrollArea.Size; this.mouseWheelOverlay1.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.mouseWheelMoved1)); this.mainBackgroundImage.addControl(this.mouseWheelOverlay1); int num1 = this.alliesScrollBar.Value; this.alliesScrollBar.Position = new Point(0x2dd, 40); this.alliesScrollBar.Size = new Size(0x18, (this.blockYSize - 40) - 10); this.mainBackgroundImage.addControl(this.alliesScrollBar); this.alliesScrollBar.Value = 0; this.alliesScrollBar.Max = 100; this.alliesScrollBar.NumVisibleLines = 0x19; this.alliesScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.alliesScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved)); this.enemiesScrollArea.Position = new Point(0x19, (0x23 + this.blockYSize) + 5); this.enemiesScrollArea.Size = new Size(0x2cb, (this.blockYSize - 40) - 10); this.enemiesScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x393, (this.blockYSize - 40) - 10)); this.mainBackgroundImage.addControl(this.enemiesScrollArea); this.mouseWheelOverlay2.Position = this.enemiesScrollArea.Position; this.mouseWheelOverlay2.Size = this.enemiesScrollArea.Size; this.mouseWheelOverlay2.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.mouseWheelMoved2)); this.mainBackgroundImage.addControl(this.mouseWheelOverlay2); int num2 = this.enemiesScrollBar.Value; this.enemiesScrollBar.Position = new Point(0x2dd, (0x23 + this.blockYSize) + 5); this.enemiesScrollBar.Size = new Size(0x18, (this.blockYSize - 40) - 10); this.mainBackgroundImage.addControl(this.enemiesScrollBar); this.enemiesScrollBar.Value = 0; this.enemiesScrollBar.Max = 100; this.enemiesScrollBar.NumVisibleLines = 0x19; this.enemiesScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.enemiesScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.incomingWallScrollBarMoved)); if (!resized) { CustomSelfDrawPanel.FactionPanelSideBar.downloadCurrentFactionInfo(); } this.addPlayers(); }
private void tabEntered(int pageID) { this.lastTab = pageID; long[] readIDs = new long[] { -1L, -1L, -1L, -1L, -1L, -1L }; int[] numArray2 = GameEngine.Instance.World.setReadIDs(this.currentParish, readIDs); if (numArray2 != null) { for (int j = 0; j < 6; j++) { this.chatAreas[j].setUnreads(numArray2[j]); } if (numArray2[pageID] > 0) { long readID = GameEngine.Instance.World.getHighestReadID(this.currentParish, pageID); RemoteServices.Instance.Chat_MarkParishTextRead(this.currentParish, pageID, readID); readIDs[pageID] = readID; GameEngine.Instance.World.setReadIDs(this.currentParish, readIDs); } } for (int i = 0; i < 6; i++) { this.chatAreas[i].Visible = i == pageID; } this.tab1Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab1Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab2Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab2Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab3Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab3Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab4Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab4Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab5Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab5Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab6Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab6Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab1Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab2Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab3Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab4Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab5Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab6Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); switch (pageID) { case 0: this.tab1Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab1Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab1Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); break; case 1: this.tab2Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab2Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab2Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); break; case 2: this.tab3Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab3Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab3Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); break; case 3: this.tab4Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab4Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab4Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); break; case 4: this.tab5Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab5Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab5Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); break; case 5: this.tab6Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab6Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab6Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); break; } if (!this.chatAreas[pageID].Locked) { this.textBox1.Enabled = true; } else { this.textBox1.Enabled = false; } }
public void init(bool resized) { int height = base.Height; instance = this; base.clearControls(); this.sidebar.addSideBar(2, this); this.mainBackgroundImage.FillColor = Color.FromArgb(0x86, 0x99, 0xa5); this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = new Size(base.Width - 200, height); base.addControl(this.mainBackgroundImage); this.backgroundFade.Image = (Image)GFXLibrary.background_top; this.backgroundFade.Position = new Point(0, 0); this.backgroundFade.Size = new Size(base.Width - 200, this.backgroundFade.Image.Height); this.mainBackgroundImage.addControl(this.backgroundFade); this.headerLabelsImage.Size = new Size(((base.Width - 0x19) - 0x17) - 200, 0x1c); this.headerLabelsImage.Position = new Point(0x19, 9); this.mainBackgroundImage.addControl(this.headerLabelsImage); this.headerLabelsImage.Create((Image)GFXLibrary.mail2_field_bar_mail_left, (Image)GFXLibrary.mail2_field_bar_mail_middle, (Image)GFXLibrary.mail2_field_bar_mail_right); this.divider1Image.Image = (Image)GFXLibrary.mail2_field_bar_mail_divider; this.divider1Image.Position = new Point(290, 0); this.headerLabelsImage.addControl(this.divider1Image); this.divider2Image.Image = (Image)GFXLibrary.mail2_field_bar_mail_divider; this.divider2Image.Position = new Point(440, 0); this.headerLabelsImage.addControl(this.divider2Image); this.divider3Image.Image = (Image)GFXLibrary.mail2_field_bar_mail_divider; this.divider3Image.Position = new Point(610, 0); this.headerLabelsImage.addControl(this.divider3Image); this.factionLabel.Text = SK.Text("STATS_CATEGORY_TITLE_FACTION", "Faction"); this.factionLabel.Color = ARGBColors.Black; this.factionLabel.Position = new Point(9, -2); this.factionLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.factionLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.factionLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.factionLabel); this.factionSortArea.Position = new Point(0, 0); this.factionSortArea.Size = new Size(290, this.headerLabelsImage.Height); this.factionSortArea.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortNameClick), "FactionAllFactionsPanel_sort_faction"); this.headerLabelsImage.addControl(this.factionSortArea); this.playersLabel.Text = SK.Text("FactionInvites_Players", "Players"); this.playersLabel.Color = ARGBColors.Black; this.playersLabel.Position = new Point(0x127, -2); this.playersLabel.Size = new Size(140, this.headerLabelsImage.Height); this.playersLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.playersLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.headerLabelsImage.addControl(this.playersLabel); this.playersSortArea.Position = new Point(290, 0); this.playersSortArea.Size = new Size(150, this.headerLabelsImage.Height); this.playersSortArea.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortPlayersClick), "FactionAllFactionsPanel_sort_players"); this.headerLabelsImage.addControl(this.playersSortArea); this.pointsLabel.Text = SK.Text("FactionsPanel_Points", "Points"); this.pointsLabel.Color = ARGBColors.Black; this.pointsLabel.Position = new Point(0x1bd, -2); this.pointsLabel.Size = new Size(160, this.headerLabelsImage.Height); this.pointsLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.pointsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.headerLabelsImage.addControl(this.pointsLabel); this.pointsSortArea.Position = new Point(440, 0); this.pointsSortArea.Size = new Size(170, this.headerLabelsImage.Height); this.pointsSortArea.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortPointsClick), "FactionAllFactionsPanel_sort_points"); this.headerLabelsImage.addControl(this.pointsSortArea); this.membershipLabel.Text = SK.Text("FactionInvites_Membership", "Membership"); this.membershipLabel.Color = ARGBColors.Black; this.membershipLabel.Position = new Point(0x267, -2); this.membershipLabel.Size = new Size(110, this.headerLabelsImage.Height); this.membershipLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.membershipLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.headerLabelsImage.addControl(this.membershipLabel); this.openSortArea.Position = new Point(610, 0); this.openSortArea.Size = new Size(120, this.headerLabelsImage.Height); this.openSortArea.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortOpenClick), "FactionAllFactionsPanel_sort_points"); this.headerLabelsImage.addControl(this.openSortArea); InterfaceMgr.Instance.setVillageHeading(SK.Text("FactionInvites_All_Factions", "All Factions")); this.wallScrollArea.Position = new Point(0x19, 0x26); this.wallScrollArea.Size = new Size(0x2c1, height - 0x26); this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x2c1, height - 0x26)); this.mainBackgroundImage.addControl(this.wallScrollArea); this.mouseWheelOverlay.Position = this.wallScrollArea.Position; this.mouseWheelOverlay.Size = this.wallScrollArea.Size; this.mouseWheelOverlay.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.mouseWheelMoved)); this.mainBackgroundImage.addControl(this.mouseWheelOverlay); int num1 = this.wallScrollBar.Value; this.wallScrollBar.Position = new Point(0x2dd, 0x26); this.wallScrollBar.Size = new Size(0x18, height - 0x26); this.mainBackgroundImage.addControl(this.wallScrollBar); this.wallScrollBar.Value = 0; this.wallScrollBar.Max = 100; this.wallScrollBar.NumVisibleLines = 0x19; this.wallScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.wallScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved)); if (!resized) { CustomSelfDrawPanel.FactionPanelSideBar.downloadCurrentFactionInfo(); } this.addFactions(); }
public void init(bool resized) { int villageID = InterfaceMgr.Instance.getSelectedMenuVillage(); this.m_currentVillage = villageID; int parishID = GameEngine.Instance.World.getParishFromVillageID(villageID); int height = base.Height; instance = this; base.clearControls(); this.headerImage.Size = new Size(base.Width, 40); this.headerImage.Position = new Point(0, 0); base.addControl(this.headerImage); this.headerImage.Create((Image)GFXLibrary.mail2_titlebar_left, (Image)GFXLibrary.mail2_titlebar_middle, (Image)GFXLibrary.mail2_titlebar_right); CustomSelfDrawPanel.WikiLinkControl.init(this.headerImage, 14, new Point(base.Width - 0x2c, 3)); this.backgroundImage.Size = new Size(base.Width, height - 40); this.backgroundImage.Position = new Point(0, 40); base.addControl(this.backgroundImage); this.backgroundImage.Create((Image)GFXLibrary.mail2_mail_panel_upper_left, (Image)GFXLibrary.mail2_mail_panel_upper_middle, (Image)GFXLibrary.mail2_mail_panel_upper_right, (Image)GFXLibrary.mail2_mail_panel_middle_left, (Image)GFXLibrary.mail2_mail_panel_middle_middle, (Image)GFXLibrary.mail2_mail_panel_middle_right, (Image)GFXLibrary.mail2_mail_panel_lower_left, (Image)GFXLibrary.mail2_mail_panel_lower_middle, (Image)GFXLibrary.mail2_mail_panel_lower_right); this.parishNameLabel.Text = GameEngine.Instance.World.getParishName(parishID); this.parishNameLabel.Color = ARGBColors.White; this.parishNameLabel.DropShadowColor = ARGBColors.Black; this.parishNameLabel.Position = new Point(20, 0); this.parishNameLabel.Size = new Size(base.Width - 40, 40); this.parishNameLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.parishNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerImage.addControl(this.parishNameLabel); this.illustrationImage.Image = (Image)GFXLibrary.parishwall_village_illlustration_01; this.illustrationImage.Position = new Point(0x11, 5); this.backgroundImage.addControl(this.illustrationImage); this.stewardLabel.Text = SK.Text("ParishWallPanel_Steward", "Steward") + " : "; this.stewardLabel.Color = ARGBColors.Black; this.stewardLabel.Position = new Point(5, 5); this.stewardLabel.Size = new Size(this.illustrationImage.Width - 6, 30); this.stewardLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.stewardLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.illustrationImage.addControl(this.stewardLabel); this.wallInfoImage.Size = new Size(0x18c, height - 170); this.wallInfoImage.Position = new Point(8, 0x77); this.backgroundImage.addControl(this.wallInfoImage); this.wallInfoImage.Create((Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_right); this.areaWindow.Size = new Size(0x234, height - 0x4e); this.areaWindow.Position = new Point(0x19b, 0x1a); this.backgroundImage.addControl(this.areaWindow); this.areaWindow.Create((Image)GFXLibrary.parishwall_village_center_tab_outline_top_left, (Image)GFXLibrary.parishwall_village_center_tab_outline_top_middle, (Image)GFXLibrary.parishwall_village_center_tab_outline_top_right, (Image)GFXLibrary.parishwall_village_center_tab_outline_middle_left, null, (Image)GFXLibrary.parishwall_village_center_tab_outline_middle_right, (Image)GFXLibrary.parishwall_village_center_tab_outline_bottom_left, (Image)GFXLibrary.parishwall_village_center_tab_outline_bottom_middle, (Image)GFXLibrary.parishwall_village_center_tab_outline_bottom_right); this.tab1Button.UseTextSize = true; this.tab1Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab1Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_up; this.tab1Button.Position = new Point(0x1a9, 6); this.tab1Button.Text.Text = SK.Text("ParishWallPanel_General", "General"); this.tab1Button.Text.Size = new Size(this.tab1Button.Size.Width, this.tab1Button.Text.Size.Height + 20); this.tab1Button.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.tab1Button.TextYOffset = 3; this.tab1Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.tab1Button.Text.Color = ARGBColors.Black; this.tab1Button.Data = 0; this.tab1Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tabClick), "ParishWallPanel_tab"); this.backgroundImage.addControl(this.tab1Button); this.tab2Button.UseTextSize = true; this.tab2Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab2Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab2Button.Position = new Point(510, 6); this.tab2Button.Text.Text = SK.Text("ParishWallPanel_War", "War"); this.tab2Button.Text.Size = new Size(this.tab2Button.Size.Width, this.tab2Button.Text.Size.Height + 20); this.tab2Button.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.tab2Button.TextYOffset = 3; this.tab2Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab2Button.Text.Color = ARGBColors.Black; this.tab2Button.Data = 1; this.tab2Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tabClick), "ParishWallPanel_tab"); this.backgroundImage.addControl(this.tab2Button); this.tab3Button.UseTextSize = true; this.tab3Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab3Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab3Button.Position = new Point(0x253, 6); this.tab3Button.Text.Text = SK.Text("ParishWallPanel_inn", "Inn"); this.tab3Button.Text.Size = new Size(this.tab3Button.Size.Width, this.tab3Button.Text.Size.Height + 20); this.tab3Button.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.tab3Button.TextYOffset = 3; this.tab3Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab3Button.Text.Color = ARGBColors.Black; this.tab3Button.Data = 2; this.tab3Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tabClick), "ParishWallPanel_tab"); this.backgroundImage.addControl(this.tab3Button); this.tab4Button.UseTextSize = true; this.tab4Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab4Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab4Button.Position = new Point(680, 6); this.tab4Button.Text.Text = SK.Text("ParishWallPanel_Steward", "Steward"); this.tab4Button.Text.Size = new Size(this.tab4Button.Size.Width, this.tab4Button.Text.Size.Height + 20); this.tab4Button.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.tab4Button.TextYOffset = 3; this.tab4Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab4Button.Text.Color = ARGBColors.Black; this.tab4Button.Data = 3; this.tab4Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tabClick), "ParishWallPanel_tab"); this.backgroundImage.addControl(this.tab4Button); this.tab5Button.UseTextSize = true; this.tab5Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab5Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab5Button.Position = new Point(0x2fd, 6); this.tab5Button.Text.Text = SK.Text("ParishWallPanel_Free", "Free"); this.tab5Button.Text.Size = new Size(this.tab5Button.Size.Width, this.tab5Button.Text.Size.Height + 20); this.tab5Button.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.tab5Button.TextYOffset = 3; this.tab5Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab5Button.Text.Color = ARGBColors.Black; this.tab5Button.Data = 4; this.tab5Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tabClick), "ParishWallPanel_tab"); this.backgroundImage.addControl(this.tab5Button); this.tab6Button.UseTextSize = true; this.tab6Button.ImageNorm = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab6Button.ImageOver = (Image)GFXLibrary.parishwall_village_center_tab_down; this.tab6Button.Position = new Point(850, 6); this.tab6Button.Text.Text = SK.Text("ParishWallPanel_Free", "Free"); this.tab6Button.Text.Size = new Size(this.tab6Button.Size.Width, this.tab6Button.Text.Size.Height + 20); this.tab6Button.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.tab6Button.TextYOffset = 3; this.tab6Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.tab6Button.Text.Color = ARGBColors.Black; this.tab6Button.Data = 5; this.tab6Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tabClick), "ParishWallPanel_tab"); this.backgroundImage.addControl(this.tab6Button); this.textInputImage.Image = (Image)GFXLibrary.parishwall_what_say_thou_box; this.textInputImage.Position = new Point(0x1b0, 0x2f); this.backgroundImage.addControl(this.textInputImage); this.wallScrollArea.Position = new Point(15, 15); this.wallScrollArea.Size = new Size(0x151, height - 0xbf); this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x151, height - 0xbf)); this.wallInfoImage.addControl(this.wallScrollArea); int max = this.wallScrollBar.Value; this.wallScrollBar.Visible = false; this.wallScrollBar.Position = new Point(0x166, 15); this.wallScrollBar.Size = new Size(0x18, height - 0xbf); this.wallInfoImage.addControl(this.wallScrollBar); this.wallScrollBar.Value = 0; this.wallScrollBar.Max = 100; this.wallScrollBar.NumVisibleLines = 0x19; this.wallScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.wallScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved)); if (resized) { this.updateWallArea(); if ((max > 0) && this.wallScrollBar.Visible) { if (max >= this.wallScrollBar.Max) { max = this.wallScrollBar.Max; } this.wallScrollBar.Value = max; this.wallScrollBarMoved(); } int id = 0; foreach (CustomSelfDrawPanel.ParishChatPanel panel4 in this.chatAreas) { panel4.Size = new Size(0x216, height - 0x99); this.areaWindow.addControl(panel4); panel4.reset(this, id); if (GameEngine.Instance.Village != null) { panel4.importText(GameEngine.Instance.World.getParishChat(parishID, id, GameEngine.Instance.Village.m_ownedDate).ToArray(), false, -1L); } panel4.scrollToBottom(); panel4.Visible = false; id++; } this.tabEntered(this.lastTab); goto Label_1127; } this.focusPanel.Focus(); this.initialTextInTextbox = true; this.textBox1.Text = SK.Text("ParishWallPanel_Enter_Text_Here", "Enter Text Here"); StoredParishInfo info = (StoredParishInfo)this.parishList[parishID]; bool flag = false; if (info != null) { TimeSpan span = (TimeSpan)(DateTime.Now - info.m_lastUpdateTime); if ((span.TotalMinutes <= 1.0) && (info.lastReturnData != null)) { goto Label_0D51; } } flag = true; Label_0D51: if (this.chatAreas == null) { this.chatAreas = new CustomSelfDrawPanel.ParishChatPanel[6]; for (int i = 0; i < 6; i++) { this.chatAreas[i] = new CustomSelfDrawPanel.ParishChatPanel { Position = new Point(20, 0x44), Size = new Size(0x216, height - 0x99) }; } } if ((this.currentParish != parishID) || this.forceNextUpdate) { this.forceNextUpdate = false; this.currentLeaderID = -1; this.electedLeaderID = -1; this.currentLeaderName = ""; this.electedLeaderName = ""; m_userIDOnCurrent = -1; this.checkTextUpdateTime = 5; int num6 = 0; foreach (CustomSelfDrawPanel.ParishChatPanel panel2 in this.chatAreas) { this.areaWindow.addControl(panel2); panel2.Visible = false; panel2.reset(this, num6); if (GameEngine.Instance.Village != null) { panel2.importText(GameEngine.Instance.World.getParishChat(parishID, num6, GameEngine.Instance.Village.m_ownedDate).ToArray(), false, -1L); } panel2.scrollToBottom(); panel2.Visible = false; num6++; } long[] readIDs = new long[] { -1L, -1L, -1L, -1L, -1L, -1L }; int[] numArray2 = GameEngine.Instance.World.setReadIDs(parishID, readIDs); if (numArray2 != null) { for (int j = 0; j < 6; j++) { this.chatAreas[j].setUnreads(numArray2[j]); } } this.currentParish = parishID; this.tabEntered(0); } else { foreach (CustomSelfDrawPanel.ParishChatPanel panel3 in this.chatAreas) { panel3.Repopulate = true; panel3.Size = new Size(0x216, height - 0x99); this.areaWindow.addControl(panel3); panel3.Visible = false; } this.currentParish = parishID; this.tabEntered(this.lastTab); } this.currentParish = parishID; if (GameEngine.Instance.Village != null) { if (flag) { RemoteServices.Instance.set_GetParishFrontPageInfo_UserCallBack(new RemoteServices.GetParishFrontPageInfo_UserCallBack(this.getParishFrontPageCallback)); RemoteServices.Instance.GetParishFrontPageInfo(this.m_currentVillage, DateTime.MinValue); Thread.Sleep(500); } else { DateTime lastUpdateTime = info.m_lastUpdateTime; this.getParishFrontPageCallback(info.lastReturnData); info.m_lastUpdateTime = lastUpdateTime; } this.inSend = true; RemoteServices.Instance.set_Chat_ReceiveParishText_UserCallBack(new RemoteServices.Chat_ReceiveParishText_UserCallBack(this.chat_ReceiveParishTextCallback)); RemoteServices.Instance.Chat_ReceiveParishText(this.currentParish, GameEngine.Instance.World.getParishChatNewestPostTime(this.currentParish, GameEngine.Instance.Village.m_ownedDate)); } else { this.forceNextUpdate = true; } Label_1127: this.updateLeaderInfo(); }
public LoadingPanel() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void init(FormationPopup parent) { this.m_parent = parent; base.Size = this.m_parent.Size; this.BackColor = ARGBColors.Transparent; CustomSelfDrawPanel.CSDImage control = new CustomSelfDrawPanel.CSDImage { Alpha = 0.1f, Image = (Image)GFXLibrary.formations_img, Scale = 5.0, Position = new Point(0, 0), Size = base.Size }; base.addControl(control); this.manageLabel.Text = SK.Text("Formations_Manage_Box", "Manage Formations"); this.manageLabel.Color = ARGBColors.White; this.manageLabel.DropShadowColor = ARGBColors.Black; this.manageLabel.Position = new Point(base.Width / 3, 5); this.manageLabel.Size = new Size(base.Width / 3, 0x18); this.manageLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.manageLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); base.addControl(this.manageLabel); this.storedLabel.Text = SK.Text("Formations_Stored", "Stored Formations"); this.storedLabel.Color = ARGBColors.White; this.storedLabel.DropShadowColor = ARGBColors.Black; this.storedLabel.Position = new Point(base.Width / 3, 0x19); this.storedLabel.Size = new Size(base.Width / 3, 0x18); this.storedLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.storedLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); base.addControl(this.storedLabel); this.storedList.Size = new Size(190, 0xd8); this.storedList.Position = new Point((base.Width / 2) - (this.storedList.Width / 2), 0x2d); base.addControl(this.storedList); this.storedList.Create(12, 0x12); this.storedList.setLineClickedDelegate(new CustomSelfDrawPanel.CSDListBox.CSD_LineClickedDelegate(this.listClick)); this.storedList.setDoubleClickedDelegate(new CustomSelfDrawPanel.CSDListBox.CSD_LineClickedDelegate(this.listDoubleClick)); this.loadButton.ImageNorm = (Image)GFXLibrary.button_132_normal; this.loadButton.ImageOver = (Image)GFXLibrary.button_132_over; this.loadButton.ImageClick = (Image)GFXLibrary.button_132_in; this.loadButton.setSizeToImage(); this.loadButton.Position = new Point((base.Width / 2) - (this.loadButton.Width / 2), this.storedList.Rectangle.Bottom + 5); this.loadButton.Text.Text = SK.Text("Formations_Load", "Load Formation"); this.loadButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.loadButton.TextYOffset = -2; this.loadButton.Text.Color = ARGBColors.Black; this.loadButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.loadClick), "Formation_Load"); this.loadButton.Enabled = true; base.addControl(this.loadButton); this.deleteButton.ImageNorm = (Image)GFXLibrary.button_132_normal; this.deleteButton.ImageOver = (Image)GFXLibrary.button_132_over; this.deleteButton.ImageClick = (Image)GFXLibrary.button_132_in; this.deleteButton.setSizeToImage(); this.deleteButton.Position = new Point(this.loadButton.Position.X, this.loadButton.Rectangle.Bottom + 5); this.deleteButton.Text.Text = SK.Text("Formations_Delete", "Delete Formation"); this.deleteButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.deleteButton.TextYOffset = -2; this.deleteButton.Text.Color = ARGBColors.Black; this.deleteButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.deleteClick), "Formation_Delete"); this.deleteButton.Enabled = true; base.addControl(this.deleteButton); this.renameButton.ImageNorm = (Image)GFXLibrary.button_132_normal; this.renameButton.ImageOver = (Image)GFXLibrary.button_132_over; this.renameButton.ImageClick = (Image)GFXLibrary.button_132_in; this.renameButton.setSizeToImage(); this.renameButton.Position = new Point(this.loadButton.Position.X, this.deleteButton.Rectangle.Bottom + 30); this.renameButton.Text.Text = SK.Text("Formations_Rename", "Rename Formation"); this.renameButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.renameButton.TextYOffset = -2; this.renameButton.Text.Color = ARGBColors.Black; this.renameButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.renameClick), "Formation_Rename"); this.renameButton.Enabled = true; base.addControl(this.renameButton); this.clearButton.ImageNorm = (Image)GFXLibrary.button_132_normal; this.clearButton.ImageOver = (Image)GFXLibrary.button_132_over; this.clearButton.ImageClick = (Image)GFXLibrary.button_132_in; this.clearButton.setSizeToImage(); this.clearButton.Position = new Point(((5 * base.Width) / 6) - (this.clearButton.Width / 2), this.renameButton.Y); this.clearButton.Text.Text = SK.Text("Formations_Clear", "Clear Deployment"); this.clearButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.clearButton.TextYOffset = -2; this.clearButton.Text.Color = ARGBColors.Black; this.clearButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clearClick), "Formation_Clear"); this.clearButton.Enabled = true; base.addControl(this.clearButton); this.totalsButton.ImageNorm = (Image)GFXLibrary.button_132_normal; this.totalsButton.ImageOver = (Image)GFXLibrary.button_132_over; this.totalsButton.ImageClick = (Image)GFXLibrary.button_132_in; this.totalsButton.setSizeToImage(); this.totalsButton.Position = new Point(((5 * base.Width) / 6) - (this.totalsButton.Width / 2), this.deleteButton.Y); this.totalsButton.Text.Text = SK.Text("Formations_CurrentTotals", "Current Totals"); this.totalsButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.totalsButton.TextYOffset = -2; this.totalsButton.Text.Color = ARGBColors.Black; this.totalsButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.totalsClick), "Formation_CurrentTotals"); this.totalsButton.Enabled = true; base.addControl(this.totalsButton); this.formationImage.Image = (Image)GFXLibrary.formations_img; this.formationImage.setSizeToImage(); this.formationImage.Position = new Point((base.Width / 6) - (this.formationImage.Width / 2), (this.storedList.Y + (this.storedList.Height / 2)) - (this.formationImage.Height / 2)); base.addControl(this.formationImage); this.createLabel.Text = SK.Text("Formations_New_Box", "Create New Formation"); this.createLabel.Color = ARGBColors.White; this.createLabel.DropShadowColor = ARGBColors.Black; this.createLabel.Position = new Point(0, this.deleteButton.Y); this.createLabel.Size = new Size(base.Width / 3, this.deleteButton.Height); this.createLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.BOTTOM_CENTER; this.createLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); base.addControl(this.createLabel); this.createNameLabel.Text = SK.Text("Formations_Name", "Formation Name"); this.createNameLabel.Color = ARGBColors.White; this.createNameLabel.DropShadowColor = ARGBColors.Black; this.createNameLabel.Position = new Point(0, this.deleteButton.Y); this.createNameLabel.Size = new Size(base.Width / 3, this.deleteButton.Height); this.createNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.BOTTOM_CENTER; this.createNameLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.createButton.ImageNorm = (Image)GFXLibrary.button_132_normal; this.createButton.ImageOver = (Image)GFXLibrary.button_132_over; this.createButton.ImageClick = (Image)GFXLibrary.button_132_in; this.createButton.setSizeToImage(); this.createButton.Position = new Point((base.Width / 6) - (this.createButton.Width / 2), this.renameButton.Y); this.createButton.Text.Text = SK.Text("Formations_Save", "Save Formation"); this.createButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.createButton.TextYOffset = -2; this.createButton.Text.Color = ARGBColors.Black; this.createButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.createClick), "Formation_Create"); this.createButton.Enabled = true; base.addControl(this.createButton); this.castlePlacePeasantButton.ImageNorm = (Image)GFXLibrary.r_building_miltary_peasent; this.castlePlacePeasantButton.ImageOver = (Image)GFXLibrary.r_building_miltary_peasent; this.castlePlacePeasantButton.setSizeToImage(); this.castlePlacePeasantButton.Position = new Point((((5 * base.Width) / 6) - this.castlePlacePeasantButton.Width) - 10, this.storedLabel.Y); this.castlePlacePeasantButton.Data = 90; this.castlePlacePeasantButton.ClickArea = new Rectangle(10, 10, 0x55, 0x55); this.castlePlacePeasantInset.Image = (Image)GFXLibrary.castlescreen_unit_capsule; this.castlePlacePeasantInset.Position = new Point(0x37, 0x37); this.castlePlacePeasantLabel.Text = "0"; this.castlePlacePeasantLabel.Color = Color.FromArgb(0xfe, 0xf8, 0xe5); this.castlePlacePeasantLabel.Position = new Point(0, -1); this.castlePlacePeasantLabel.Size = this.castlePlacePeasantInset.Size; this.castlePlacePeasantLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; base.addControl(this.castlePlacePeasantButton); this.castlePlacePeasantInset.addControl(this.castlePlacePeasantLabel); this.castlePlacePeasantButton.addControl(this.castlePlacePeasantInset); this.castlePlacePeasantButton.Active = false; this.castlePlaceArcherButton.ImageNorm = (Image)GFXLibrary.r_building_miltary_archer; this.castlePlaceArcherButton.ImageOver = (Image)GFXLibrary.r_building_miltary_archer; this.castlePlaceArcherButton.setSizeToImage(); this.castlePlaceArcherButton.Position = new Point(this.castlePlacePeasantButton.Rectangle.Right - 10, this.castlePlacePeasantButton.Position.Y); this.castlePlaceArcherButton.Data = 0x5c; this.castlePlaceArcherButton.ClickArea = new Rectangle(10, 10, 0x55, 0x55); this.castlePlaceArcherInset.Image = (Image)GFXLibrary.castlescreen_unit_capsule; this.castlePlaceArcherInset.Position = new Point(0x37, 0x37); this.castlePlaceArcherLabel.Text = "0"; this.castlePlaceArcherLabel.Color = Color.FromArgb(0xfe, 0xf8, 0xe5); this.castlePlaceArcherLabel.Position = new Point(0, -1); this.castlePlaceArcherLabel.Size = this.castlePlaceArcherInset.Size; this.castlePlaceArcherLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; base.addControl(this.castlePlaceArcherButton); this.castlePlaceArcherInset.addControl(this.castlePlaceArcherLabel); this.castlePlaceArcherButton.addControl(this.castlePlaceArcherInset); this.castlePlaceArcherButton.Active = false; this.castlePlacePikemanButton.ImageNorm = (Image)GFXLibrary.r_building_miltary_pikemen; this.castlePlacePikemanButton.ImageOver = (Image)GFXLibrary.r_building_miltary_pikemen; this.castlePlacePikemanButton.setSizeToImage(); this.castlePlacePikemanButton.Position = new Point(this.castlePlacePeasantButton.Position.X, this.castlePlacePeasantButton.Rectangle.Bottom - 0x22); this.castlePlacePikemanButton.Data = 0x5d; this.castlePlacePikemanButton.ClickArea = new Rectangle(10, 10, 0x55, 0x55); this.castlePlacePikemanInset.Image = (Image)GFXLibrary.castlescreen_unit_capsule; this.castlePlacePikemanInset.Position = new Point(0x37, 0x37); this.castlePlacePikemanLabel.Text = "0"; this.castlePlacePikemanLabel.Color = Color.FromArgb(0xfe, 0xf8, 0xe5); this.castlePlacePikemanLabel.Position = new Point(0, -1); this.castlePlacePikemanLabel.Size = this.castlePlacePikemanInset.Size; this.castlePlacePikemanLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; base.addControl(this.castlePlacePikemanButton); this.castlePlacePikemanInset.addControl(this.castlePlacePikemanLabel); this.castlePlacePikemanButton.addControl(this.castlePlacePikemanInset); this.castlePlacePikemanButton.Active = false; this.castlePlaceSwordsmanButton.ImageNorm = (Image)GFXLibrary.r_building_miltary_swordsman; this.castlePlaceSwordsmanButton.ImageOver = (Image)GFXLibrary.r_building_miltary_swordsman; this.castlePlaceSwordsmanButton.setSizeToImage(); this.castlePlaceSwordsmanButton.Position = new Point(this.castlePlaceArcherButton.Position.X, this.castlePlacePikemanButton.Y); this.castlePlaceSwordsmanButton.Data = 0x5b; this.castlePlaceSwordsmanButton.ClickArea = new Rectangle(10, 10, 0x55, 0x55); this.castlePlaceSwordsmanInset.Image = (Image)GFXLibrary.castlescreen_unit_capsule; this.castlePlaceSwordsmanInset.Position = new Point(0x37, 0x37); this.castlePlaceSwordsmanLabel.Text = "0"; this.castlePlaceSwordsmanLabel.Color = Color.FromArgb(0xfe, 0xf8, 0xe5); this.castlePlaceSwordsmanLabel.Position = new Point(0, -1); this.castlePlaceSwordsmanLabel.Size = this.castlePlaceSwordsmanInset.Size; this.castlePlaceSwordsmanLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; base.addControl(this.castlePlaceSwordsmanButton); this.castlePlaceSwordsmanInset.addControl(this.castlePlaceSwordsmanLabel); this.castlePlaceSwordsmanButton.addControl(this.castlePlaceSwordsmanInset); this.castlePlaceSwordsmanButton.Active = false; this.castlePlaceCatapultButton.ImageNorm = (Image)GFXLibrary.r_building_miltary_catapult; this.castlePlaceCatapultButton.ImageOver = (Image)GFXLibrary.r_building_miltary_catapult; this.castlePlaceCatapultButton.setSizeToImage(); this.castlePlaceCatapultButton.Position = new Point(this.castlePlacePeasantButton.Position.X, this.castlePlacePikemanButton.Rectangle.Bottom - 0x22); this.castlePlaceCatapultButton.Data = 0x5e; this.castlePlaceCatapultButton.ClickArea = new Rectangle(10, 10, 0x55, 0x55); this.castlePlaceCatapultInset.Image = (Image)GFXLibrary.castlescreen_unit_capsule; this.castlePlaceCatapultInset.Position = new Point(0x37, 0x41); this.castlePlaceCatapultLabel.Text = "0"; this.castlePlaceCatapultLabel.Color = Color.FromArgb(0xfe, 0xf8, 0xe5); this.castlePlaceCatapultLabel.Position = new Point(0, -1); this.castlePlaceCatapultLabel.Size = this.castlePlaceCatapultInset.Size; this.castlePlaceCatapultLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; base.addControl(this.castlePlaceCatapultButton); this.castlePlaceCatapultInset.addControl(this.castlePlaceCatapultLabel); this.castlePlaceCatapultButton.addControl(this.castlePlaceCatapultInset); this.castlePlaceCatapultButton.Active = false; this.castlePlaceCaptainButton.ImageNorm = (Image)GFXLibrary.r_building_miltary_captain_normal; this.castlePlaceCaptainButton.ImageOver = (Image)GFXLibrary.r_building_miltary_captain_normal; this.castlePlaceCaptainButton.setSizeToImage(); this.castlePlaceCaptainButton.Position = new Point(this.castlePlaceArcherButton.Position.X, this.castlePlaceCatapultButton.Position.Y); this.castlePlaceCaptainButton.Data = 0x5e; this.castlePlaceCaptainButton.ClickArea = new Rectangle(10, 10, 0x55, 0x55); this.castlePlaceCaptainInset.Image = (Image)GFXLibrary.castlescreen_unit_capsule; this.castlePlaceCaptainInset.Position = new Point(0x37, 0x41); this.castlePlaceCaptainLabel.Text = "0"; this.castlePlaceCaptainLabel.Color = Color.FromArgb(0xfe, 0xf8, 0xe5); this.castlePlaceCaptainLabel.Position = new Point(0, -1); this.castlePlaceCaptainLabel.Size = this.castlePlaceCaptainInset.Size; this.castlePlaceCaptainLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; base.addControl(this.castlePlaceCaptainButton); this.castlePlaceCaptainInset.addControl(this.castlePlaceCaptainLabel); this.castlePlaceCaptainButton.addControl(this.castlePlaceCaptainInset); this.castlePlaceCaptainButton.Active = false; this.selectedTitleLabel.Text = ""; this.selectedTitleLabel.Color = ARGBColors.White; this.selectedTitleLabel.DropShadowColor = ARGBColors.Black; this.selectedTitleLabel.Position = new Point((2 * base.Width) / 3, this.manageLabel.Y); this.selectedTitleLabel.Size = new Size(base.Width / 3, 0x18); this.selectedTitleLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.selectedTitleLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); base.addControl(this.selectedTitleLabel); this.selectedTroopCountLabel.Text = ""; this.selectedTroopCountLabel.Color = ARGBColors.White; this.selectedTroopCountLabel.DropShadowColor = ARGBColors.Black; this.selectedTroopCountLabel.Position = new Point((2 * base.Width) / 3, this.storedLabel.Y); this.selectedTroopCountLabel.Size = new Size(base.Width / 3, 0x18); this.selectedTroopCountLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.selectedTroopCountLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); base.addControl(this.selectedTroopCountLabel); if (!Program.mySettings.AttackSetupsUpdated) { GameEngine.Instance.CastleAttackerSetup.cleanUpAttackSaveNames(); Program.mySettings.AttackSetupsUpdated = true; } this.loadNames(); this.initTotals(); }
public void init(bool resized) { int villageID = InterfaceMgr.Instance.getSelectedMenuVillage(); this.m_currentVillage = villageID; int parishID = GameEngine.Instance.World.getParishFromVillageID(villageID); int height = base.Height; instance = this; base.clearControls(); this.headerImage.Size = new Size(base.Width, 40); this.headerImage.Position = new Point(0, 0); base.addControl(this.headerImage); this.headerImage.Create((Image)GFXLibrary.mail2_titlebar_left, (Image)GFXLibrary.mail2_titlebar_middle, (Image)GFXLibrary.mail2_titlebar_right); this.backgroundImage.Size = new Size(base.Width, height - 40); this.backgroundImage.Position = new Point(0, 40); base.addControl(this.backgroundImage); this.backgroundImage.Create((Image)GFXLibrary.mail2_mail_panel_upper_left, (Image)GFXLibrary.mail2_mail_panel_upper_middle, (Image)GFXLibrary.mail2_mail_panel_upper_right, (Image)GFXLibrary.mail2_mail_panel_middle_left, (Image)GFXLibrary.mail2_mail_panel_middle_middle, (Image)GFXLibrary.mail2_mail_panel_middle_right, (Image)GFXLibrary.mail2_mail_panel_lower_left, (Image)GFXLibrary.mail2_mail_panel_lower_middle, (Image)GFXLibrary.mail2_mail_panel_lower_right); CustomSelfDrawPanel.WikiLinkControl.init(this.backgroundImage, 15, new Point(base.Width - 0x2c, 3)); this.headerLabelsImage.Size = new Size((base.Width - 0x19) - 0x17, 0x1c); this.headerLabelsImage.Position = new Point(0x19, 0x81); this.backgroundImage.addControl(this.headerLabelsImage); this.headerLabelsImage.Create((Image)GFXLibrary.mail2_field_bar_mail_left, (Image)GFXLibrary.mail2_field_bar_mail_middle, (Image)GFXLibrary.mail2_field_bar_mail_right); this.divider1Image.Image = (Image)GFXLibrary.mail2_field_bar_mail_divider; this.divider1Image.Position = new Point(0x5f, 0); this.headerLabelsImage.addControl(this.divider1Image); this.divider2Image.Image = (Image)GFXLibrary.mail2_field_bar_mail_divider; this.divider2Image.Position = new Point(0x16e, 0); this.headerLabelsImage.addControl(this.divider2Image); this.divider3Image.Image = (Image)GFXLibrary.mail2_field_bar_mail_divider; this.divider3Image.Position = new Point(0x273, 0); this.headerLabelsImage.addControl(this.divider3Image); this.parishNameLabel.Text = GameEngine.Instance.World.getParishName(parishID); this.parishNameLabel.Color = ARGBColors.White; this.parishNameLabel.DropShadowColor = ARGBColors.Black; this.parishNameLabel.Position = new Point(20, 0); this.parishNameLabel.Size = new Size(base.Width - 40, 40); this.parishNameLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.parishNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerImage.addControl(this.parishNameLabel); this.illustrationImage.Image = (Image)GFXLibrary.parishwall_village_illlustration_01; this.illustrationImage.Position = new Point(0x11, 5); this.backgroundImage.addControl(this.illustrationImage); this.stewardLabel.Text = SK.Text("ParishWallPanel_Steward", "Steward") + " : "; this.stewardLabel.Color = ARGBColors.Black; this.stewardLabel.Position = new Point(5, 5); this.stewardLabel.Size = new Size(this.illustrationImage.Width - 6, 30); this.stewardLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.stewardLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.illustrationImage.addControl(this.stewardLabel); this.proclamationButton.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.proclamationButton.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.proclamationButton.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.proclamationButton.Position = new Point(base.Width - 220, 7); this.proclamationButton.Text.Text = SK.Text("Capitials_Proclamation", "Send Proclamation"); this.proclamationButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.proclamationButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.proclamationButton.TextYOffset = -3; this.proclamationButton.Text.Color = ARGBColors.Black; this.proclamationButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendProclamation)); this.proclamationButton.CustomTooltipID = 0x1068; this.proclamationButton.Visible = false; this.headerImage.addControl(this.proclamationButton); this.proclamationLabel.Text = ""; this.proclamationLabel.Color = ARGBColors.White; this.proclamationLabel.DropShadowColor = ARGBColors.Black; this.proclamationLabel.Position = new Point(20, 0); this.proclamationLabel.Size = new Size((base.Width - 40) - 220, 40); this.proclamationLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); this.proclamationLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT; this.proclamationLabel.Visible = false; this.headerImage.addControl(this.proclamationLabel); this.wallInfoImage.Size = new Size(440, 0x55); this.wallInfoImage.Position = new Point(460, 20); this.backgroundImage.addControl(this.wallInfoImage); this.wallInfoImage.Create((Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_right); this.wallScrollArea.Position = new Point(0x19, 0x9e); this.wallScrollArea.Size = new Size(0x393, height - 0xd4); this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x393, height - 0xd4)); this.backgroundImage.addControl(this.wallScrollArea); int num1 = this.wallScrollBar.Value; this.wallScrollBar.Position = new Point(0x3af, 0x9e); this.wallScrollBar.Size = new Size(0x18, height - 0xd4); this.backgroundImage.addControl(this.wallScrollBar); this.wallScrollBar.Value = 0; this.wallScrollBar.Max = 100; this.wallScrollBar.NumVisibleLines = 0x19; this.wallScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.wallScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved)); this.votesAvailableLabel.Text = SK.Text("GENERIC_Votes_Available", "Votes Available") + " :"; this.votesAvailableLabel.Color = ARGBColors.Black; this.votesAvailableLabel.Position = new Point(0x1f, 12); this.votesAvailableLabel.Size = new Size(300, 40); this.votesAvailableLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.votesAvailableLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.wallInfoImage.addControl(this.votesAvailableLabel); this.votesAvailableLabelValue.Text = "0"; this.votesAvailableLabelValue.Color = ARGBColors.Black; this.votesAvailableLabelValue.Position = new Point(0x133, 12); this.votesAvailableLabelValue.Size = new Size(100, 40); this.votesAvailableLabelValue.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.votesAvailableLabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.votesAvailableLabelValue.Visible = true; this.wallInfoImage.addControl(this.votesAvailableLabelValue); this.voteCapLabel.Text = SK.Text("ParishPanel_Current_Vote_cap", "Current Vote Cap") + " :"; this.voteCapLabel.Color = ARGBColors.Black; this.voteCapLabel.Position = new Point(0x1f, 0x2a); this.voteCapLabel.Size = new Size(300, 40); this.voteCapLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.voteCapLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.voteCapLabel.Visible = true; this.wallInfoImage.addControl(this.voteCapLabel); this.voteCapLabelValue.Text = "0"; this.voteCapLabelValue.Color = ARGBColors.Black; this.voteCapLabelValue.Position = new Point(0x133, 0x2a); this.voteCapLabelValue.Size = new Size(100, 40); this.voteCapLabelValue.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.voteCapLabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.voteCapLabelValue.Visible = true; this.wallInfoImage.addControl(this.voteCapLabelValue); this.voteLabel.Text = SK.Text("GENERIC_Vote", "Vote"); this.voteLabel.Color = ARGBColors.Black; this.voteLabel.Position = new Point(15, -2); this.voteLabel.Size = new Size(0x51, this.headerLabelsImage.Height); this.voteLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.voteLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.voteLabel); this.eligibleLabel.Text = SK.Text("GENERIC_Eligible_Candidates", "Eligible Candidates"); this.eligibleLabel.Color = ARGBColors.Black; this.eligibleLabel.Position = new Point(0x6a, -2); this.eligibleLabel.Size = new Size(250, this.headerLabelsImage.Height); this.eligibleLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.eligibleLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.eligibleLabel); this.FactionsLabel.Text = SK.Text("STATS_CATEGORY_TITLE_FACTION", "Faction"); this.FactionsLabel.Color = ARGBColors.Black; this.FactionsLabel.Position = new Point(0x178, -2); this.FactionsLabel.Size = new Size(0xf7, this.headerLabelsImage.Height); this.FactionsLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.FactionsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.FactionsLabel); this.votesReceivedLabel.Text = SK.Text("GENERIC_Votes_Received", "Votes Received"); this.votesReceivedLabel.Color = ARGBColors.Black; this.votesReceivedLabel.Position = new Point(0x27b, -2); this.votesReceivedLabel.Size = new Size(300, this.headerLabelsImage.Height); this.votesReceivedLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.votesReceivedLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.votesReceivedLabel); if (resized) { this.addPlayers(); return; } StoredParishInfo info = (StoredParishInfo)this.parishList[parishID]; bool flag = false; if (info != null) { TimeSpan span = (TimeSpan)(DateTime.Now - info.m_lastUpdateTime); if ((span.TotalMinutes <= 2.0) && (info.lastReturnData != null)) { goto Label_0C6A; } } flag = true; Label_0C6A: this.m_currentVillage = villageID; if (this.currentParish != parishID) { this.parishMembers.Clear(); this.currentLeaderID = -1; this.electedLeaderID = -1; this.currentLeaderName = ""; this.electedLeaderName = ""; this.m_userIDOnCurrent = -1; } this.currentParish = parishID; if (flag) { this.voteCap = 0x98967f; RemoteServices.Instance.set_GetParishMembersList_UserCallBack(new RemoteServices.GetParishMembersList_UserCallBack(this.getParishMembersListCallback)); RemoteServices.Instance.GetParishMembersList(this.m_currentVillage); } this.nextElectionTime = DateTime.MinValue; this.votingAllowed = false; this.addPlayers(); if (!flag) { this.getParishMembersListCallback(info.lastReturnData); } }
public AttackReportsResourcesPanel() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void init(string playerName, int userID, int rank, int points, bool votingAllowed, int numSpareVotes, int numReceivedVotes, int factionID, int yourVotes, int position, ParishVotePanel parent) { this.m_parent = parent; this.m_position = position; this.m_userID = userID; this.m_factionID = factionID; this.clearControls(); if ((position & 1) == 0) { this.backgroundImage.Image = (Image)GFXLibrary.lineitem_strip_02_light; } else { this.backgroundImage.Image = (Image)GFXLibrary.lineitem_strip_02_dark; } this.backgroundImage.Position = new Point(0, 0); base.addControl(this.backgroundImage); this.Size = this.backgroundImage.Size; this.voteButton.ImageNorm = (Image)GFXLibrary.parishwall_button_vote_checked_normal; this.voteButton.ImageOver = (Image)GFXLibrary.parishwall_button_vote_checked_over; this.voteButton.Position = new Point(8, 4); this.voteButton.Text.Text = SK.Text("GENERIC_Vote", "Vote"); this.voteButton.Text.Color = ARGBColors.Black; this.voteButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.voteButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked), "ParishVotePanel_vote"); this.backgroundImage.addControl(this.voteButton); if (yourVotes > 0) { this.voteButton.Enabled = true; } else { this.voteButton.Enabled = false; } NumberFormatInfo nFI = GameEngine.NFI; int num = 0; if (factionID < 0) { this.factionName.Text = ""; } else { FactionData data = GameEngine.Instance.World.getFaction(factionID); if (data == null) { this.factionName.Text = ""; } else { this.factionName.Text = data.factionNameAbrv; int houseID = data.houseID; if (houseID > 0) { this.houseImage.Image = (Image)GFXLibrary.house_flag_001_small; switch (houseID) { case 1: this.houseImage.Image = (Image)GFXLibrary.house_flag_001_small; break; case 2: this.houseImage.Image = (Image)GFXLibrary.house_flag_002_small; break; case 3: this.houseImage.Image = (Image)GFXLibrary.house_flag_003_small; break; case 4: this.houseImage.Image = (Image)GFXLibrary.house_flag_004_small; break; case 5: this.houseImage.Image = (Image)GFXLibrary.house_flag_005_small; break; case 6: this.houseImage.Image = (Image)GFXLibrary.house_flag_006_small; break; case 7: this.houseImage.Image = (Image)GFXLibrary.house_flag_007_small; break; case 8: this.houseImage.Image = (Image)GFXLibrary.house_flag_008_small; break; case 9: this.houseImage.Image = (Image)GFXLibrary.house_flag_009_small; break; case 10: this.houseImage.Image = (Image)GFXLibrary.house_flag_010_small; break; case 11: this.houseImage.Image = (Image)GFXLibrary.house_flag_011_small; break; case 12: this.houseImage.Image = (Image)GFXLibrary.house_flag_012_small; break; case 13: this.houseImage.Image = (Image)GFXLibrary.house_flag_013_small; break; case 14: this.houseImage.Image = (Image)GFXLibrary.house_flag_014_small; break; case 15: this.houseImage.Image = (Image)GFXLibrary.house_flag_015_small; break; case 0x10: this.houseImage.Image = (Image)GFXLibrary.house_flag_016_small; break; case 0x11: this.houseImage.Image = (Image)GFXLibrary.house_flag_017_small; break; case 0x12: this.houseImage.Image = (Image)GFXLibrary.house_flag_018_small; break; case 0x13: this.houseImage.Image = (Image)GFXLibrary.house_flag_019_small; break; case 20: this.houseImage.Image = (Image)GFXLibrary.house_flag_020_small; break; } this.houseImage.Position = new Point(0x179, 5); this.houseImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.factionClick)); this.backgroundImage.addControl(this.houseImage); num = 0x20; } } } this.factionName.Color = ARGBColors.Black; this.factionName.Position = new Point(0x179 + num, 0); this.factionName.Size = new Size(210, this.backgroundImage.Height); this.factionName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.factionName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; if (factionID >= 0) { this.factionName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.factionClick)); } this.backgroundImage.addControl(this.factionName); this.personName.Text = playerName; this.personName.Color = ARGBColors.Black; this.personName.Position = new Point(0x88, 0); this.personName.Size = new Size(0xe1, this.backgroundImage.Height); this.personName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.personName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.personName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.playerClick), "ParishVotePanel_user"); this.backgroundImage.addControl(this.personName); this.votesLabel.Text = numReceivedVotes.ToString("N", nFI); this.votesLabel.Color = ARGBColors.Black; this.votesLabel.Position = new Point(0x27b, 0); this.votesLabel.Size = new Size(150, this.backgroundImage.Height); this.votesLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.votesLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.backgroundImage.addControl(this.votesLabel); this.shieldImage.Image = GameEngine.Instance.World.getWorldShield(userID, 0x19, 0x1c); if (this.shieldImage.Image != null) { this.shieldImage.Position = new Point(0x6a, 1); this.shieldImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.playerClick)); this.backgroundImage.addControl(this.shieldImage); } base.invalidate(); }
public void init() { base.clearControls(); this.mainBackgroundImage.Image = (Image)GFXLibrary.interface_bar_top_left_empty; this.mainBackgroundImage.Position = new Point(0, 0); base.addControl(this.mainBackgroundImage); this.panelConnectorImage.Image = (Image)GFXLibrary.menubar_connecter_left; this.panelConnectorImage.Position = new Point(0x161, 0); base.addControl(this.panelConnectorImage); this.controlsArea.Position = new Point(0, 0); this.controlsArea.Size = base.Size; base.addControl(this.controlsArea); Image image = GameEngine.Instance.World.getPlayerShieldImage(0x45, 0x4d); if (image != null) { this.shieldImage.Image = image; this.shieldImage.Position = new Point(2, 2); this.shieldImage.CustomTooltipID = 0xfaf; this.shieldImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.imgRealShield_Click)); this.controlsArea.addControl(this.shieldImage); } this.SetFaithPoints(0.0); this.secondAgeImage.Image = (Image)GFXLibrary.secondAgeLogo; this.secondAgeImage.Visible = false; this.secondAgeImage.CustomTooltipID = 8; this.secondAgeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.secondAgeImage_Click)); this.controlsArea.addControl(this.secondAgeImage); this.userNameLabel.Position = new Point(0x67, 0); this.userNameLabel.Size = new Size(0xe0, 0x12); this.userNameLabel.Font = FontManager.GetFont("Microsoft Sans Serif", 12f); this.userNameLabel.Color = ARGBColors.Black; this.userNameLabel.CustomTooltipID = 2; this.controlsArea.addControl(this.userNameLabel); this.currentGoldLabel.Position = new Point(130, 0x40); this.currentGoldLabel.Size = new Size(80, 0x12); this.currentGoldLabel.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.currentGoldLabel.Color = ARGBColors.White; this.currentGoldLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.currentGoldLabel.CustomTooltipID = 5; this.controlsArea.addControl(this.currentGoldLabel); this.currentGoldToolTip.Position = new Point(90, 0x40); this.currentGoldToolTip.Size = new Size(40, 0x12); this.currentGoldToolTip.CustomTooltipID = 5; this.controlsArea.addControl(this.currentGoldToolTip); this.currentHonourLabel.Position = new Point(130, 40); this.currentHonourLabel.Size = new Size(80, 0x12); this.currentHonourLabel.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.currentHonourLabel.Color = ARGBColors.White; this.currentHonourLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.currentHonourLabel.CustomTooltipID = 4; this.controlsArea.addControl(this.currentHonourLabel); this.currentHonourToolTip.Position = new Point(90, 40); this.currentHonourToolTip.Size = new Size(40, 0x12); this.currentHonourToolTip.CustomTooltipID = 4; this.controlsArea.addControl(this.currentHonourToolTip); this.rankLabel.Position = new Point(0x68, 0x10); this.rankLabel.Size = new Size(0xe0, 0x17); this.rankLabel.Font = FontManager.GetFont("Microsoft Sans Serif", 9f); this.rankLabel.Color = ARGBColors.Black; this.rankLabel.CustomTooltipID = 3; this.controlsArea.addControl(this.rankLabel); this.pointsLabel.Position = new Point(0x107, 40); this.pointsLabel.Size = new Size(80, 0x12); this.pointsLabel.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.pointsLabel.Color = ARGBColors.White; this.pointsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.pointsLabel.CustomTooltipID = 7; this.controlsArea.addControl(this.pointsLabel); this.pointsToolTip.Position = new Point(0xdf, 40); this.pointsToolTip.Size = new Size(40, 0x12); this.pointsToolTip.CustomTooltipID = 7; this.controlsArea.addControl(this.pointsToolTip); this.faithPointsLabel.Position = new Point(0x107, 0x40); this.faithPointsLabel.Color = ARGBColors.White; this.faithPointsLabel.Size = new Size(0x39, 0x12); this.faithPointsLabel.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.faithPointsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.faithPointsLabel.CustomTooltipID = 6; this.controlsArea.addControl(this.faithPointsLabel); this.faithpointsToolTip.Position = new Point(0xdf, 0x40); this.faithpointsToolTip.Size = new Size(40, 0x12); this.faithpointsToolTip.CustomTooltipID = 6; this.controlsArea.addControl(this.faithpointsToolTip); this.cardsButton.Position = new Point(0x162, 0); this.cardsButton.CustomTooltipID = 1; this.cardsButton.ClickArea = new Rectangle(0x25, 0, 0x88, 0x51); this.cardsButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.cardsClick)); this.controlsArea.addControl(this.cardsButton); this.gameDateLabel.Text = ""; this.gameDateLabel.Position = new Point(6, 4); this.gameDateLabel.Size = new Size(0xa2, 0x12); this.gameDateLabel.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.gameDateLabel.Color = ARGBColors.Black; if ((GameEngine.Instance.LocalWorldData != null) && (GameEngine.Instance.LocalWorldData.Alternate_Ruleset == 1)) { this.gameDateLabel.CustomTooltipID = 11; } else { this.gameDateLabel.CustomTooltipID = 0; } this.gameDateLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.cardsButton.addControl(this.gameDateLabel); this.resize(); this.contextTabBar.Position = new Point(0, 0x58); this.contextTabBar.Size = new Size(530, 0x20); this.contextTabBar.Visible = true; this.controlsArea.addControl(this.contextTabBar); this.villageInfoBar.init(); this.villageInfoBar.Position = new Point(0, 0); this.villageInfoBar.Size = new Size(530, 0x20); this.villageInfoBar.Visible = false; this.contextTabBar.addControl(this.villageInfoBar); this.castleInfoBar.init(); this.castleInfoBar.Position = new Point(0, 0); this.castleInfoBar.Size = new Size(530, 0x20); this.castleInfoBar.Visible = false; this.contextTabBar.addControl(this.castleInfoBar); InterfaceMgr.Instance.setVillageInfoBar(this.villageInfoBar, this.castleInfoBar); }
public void init(AdvancedCastleOptionsPopup parent, bool castleSetup) { base.clearControls(); this.backgroundImage.Image = (Image)GFXLibrary.popup_background_01; this.backgroundImage.Position = new Point(0, 0); base.addControl(this.backgroundImage); this.captureLabel.Text = SK.Text("Advanced_Castle_Options", "Advanced Options"); this.captureLabel.Color = ARGBColors.White; this.captureLabel.Position = new Point(13, 7); this.captureLabel.Size = new Size(0x14f, 20); this.captureLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.captureLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.backgroundImage.addControl(this.captureLabel); if (castleSetup) { this.memoriseLabel.Text = SK.Text("Advanced_Castle_Memorise", "Memorize"); this.memoriseLabel.Color = ARGBColors.White; this.memoriseLabel.Position = new Point(13, 50); this.memoriseLabel.Size = new Size(0x14f, 20); this.memoriseLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.memoriseLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.backgroundImage.addControl(this.memoriseLabel); this.memoriseTroopsButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.memoriseTroopsButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.memoriseTroopsButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.memoriseTroopsButton.Position = new Point(0x19, 0x4b); this.memoriseTroopsButton.Text.Text = SK.Text("Advanced_Castle_Troops", "Troops"); this.memoriseTroopsButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.memoriseTroopsButton.Text.Color = ARGBColors.Black; this.memoriseTroopsButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.memoriseTroopsClicked), "AdvancedCastleOptionsPanel_memorise_troops"); this.backgroundImage.addControl(this.memoriseTroopsButton); this.memoriseCastleButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.memoriseCastleButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.memoriseCastleButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.memoriseCastleButton.Position = new Point(0xc3, 0x4b); this.memoriseCastleButton.Text.Text = SK.Text("Advanced_Castle_Castle", "Infrastructure"); this.memoriseCastleButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.memoriseCastleButton.Text.Color = ARGBColors.Black; this.memoriseCastleButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.memoriseCastleClicked), "AdvancedCastleOptionsPanel_memorise_infrastructure"); this.backgroundImage.addControl(this.memoriseCastleButton); this.restoreLabel.Text = SK.Text("Advanced_Castle_Restore", "Restore"); this.restoreLabel.Color = ARGBColors.White; this.restoreLabel.Position = new Point(13, 110); this.restoreLabel.Size = new Size(0x14f, 20); this.restoreLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.restoreLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.backgroundImage.addControl(this.restoreLabel); this.restoreTroopsButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.restoreTroopsButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.restoreTroopsButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.restoreTroopsButton.Position = new Point(0x19, 0x87); this.restoreTroopsButton.Text.Text = SK.Text("Advanced_Castle_Troops", "Troops"); this.restoreTroopsButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.restoreTroopsButton.Text.Color = ARGBColors.Black; this.restoreTroopsButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.restoreTroopsClicked), "AdvancedCastleOptionsPanel_restore_troops"); this.backgroundImage.addControl(this.restoreTroopsButton); this.restoreCastleButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.restoreCastleButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.restoreCastleButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.restoreCastleButton.Position = new Point(0xc3, 0x87); this.restoreCastleButton.Text.Text = SK.Text("Advanced_Castle_Castle", "Infrastructure"); this.restoreCastleButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.restoreCastleButton.Text.Color = ARGBColors.Black; this.restoreCastleButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.restoreCastleClicked), "AdvancedCastleOptionsPanel_restore_Infrastructure"); this.backgroundImage.addControl(this.restoreCastleButton); this.infoLabel.Text = ""; this.infoLabel.Color = ARGBColors.White; this.infoLabel.Position = new Point(0, 0xa5); this.infoLabel.Size = new Size(this.backgroundImage.Width, 20); this.infoLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.infoLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.backgroundImage.addControl(this.infoLabel); this.deleteCastleButton.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.deleteCastleButton.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.deleteCastleButton.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.deleteCastleButton.Position = new Point(70, 200); this.deleteCastleButton.Text.Text = SK.Text("Advanced_Castle_Delete_Castle", "Delete All Castle Infrastructure"); if ((Program.mySettings.LanguageIdent == "it") || (Program.mySettings.LanguageIdent == "pt")) { this.deleteCastleButton.Text.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); } else { this.deleteCastleButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); } this.deleteCastleButton.Text.Color = ARGBColors.Black; this.deleteCastleButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.deleteCastleClicked), "CastleMapPanel_delete_constructing"); this.backgroundImage.addControl(this.deleteCastleButton); this.deleteMoatButton.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.deleteMoatButton.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.deleteMoatButton.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.deleteMoatButton.Position = new Point(70, 230); this.deleteMoatButton.Text.Text = SK.Text("Advanced_Castle_Delete_Castle_moat", "Delete All Moat"); if (Program.mySettings.LanguageIdent == "pt") { this.deleteMoatButton.Text.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); } else { this.deleteMoatButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); } this.deleteMoatButton.Text.Color = ARGBColors.Black; this.deleteMoatButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.deleteMoatClicked), "CastleMapPanel_delete_constructing"); this.backgroundImage.addControl(this.deleteMoatButton); this.deletePitsButton.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.deletePitsButton.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.deletePitsButton.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.deletePitsButton.Position = new Point(70, 260); this.deletePitsButton.Text.Text = SK.Text("Advanced_Castle_Delete_Castle_pits", "Delete All Killing Pits"); if (Program.mySettings.LanguageIdent == "pt") { this.deletePitsButton.Text.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); } else { this.deletePitsButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); } this.deletePitsButton.Text.Color = ARGBColors.Black; this.deletePitsButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.deletePitsClicked), "CastleMapPanel_delete_constructing"); this.backgroundImage.addControl(this.deletePitsButton); this.deleteOilPotsButton.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.deleteOilPotsButton.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.deleteOilPotsButton.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.deleteOilPotsButton.Position = new Point(70, 290); this.deleteOilPotsButton.Text.Text = SK.Text("Advanced_Castle_Delete_Castle_oil_pots", "Delete All Oil Pots"); if (Program.mySettings.LanguageIdent == "pt") { this.deleteOilPotsButton.Text.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); } else { this.deleteOilPotsButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); } this.deleteOilPotsButton.Text.Color = ARGBColors.Black; this.deleteOilPotsButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.deleteOilPotsClicked), "CastleMapPanel_delete_constructing"); this.backgroundImage.addControl(this.deleteOilPotsButton); this.memoriseTroopsButton.Enabled = true; this.memoriseCastleButton.Enabled = true; this.restoreCastleButton.Enabled = true; this.restoreTroopsButton.Enabled = true; if (GameEngine.Instance.Castle != null) { if (GameEngine.Instance.Castle.countPlacedTroops() <= 0) { this.memoriseTroopsButton.Enabled = false; } if (GameEngine.Instance.Castle.countPlacedInfrastructure() <= 0) { this.deleteCastleButton.Enabled = false; this.memoriseCastleButton.Enabled = false; } if (GameEngine.Instance.Castle.countPlacedMoat() <= 0) { this.deleteMoatButton.Enabled = false; } if (GameEngine.Instance.Castle.countPlacedPits() <= 0) { this.deletePitsButton.Enabled = false; } if (GameEngine.Instance.Castle.countPlacedOilPots() <= 0) { this.deleteOilPotsButton.Enabled = false; } if (!GameEngine.Instance.Castle.gotInfrastructureSave()) { this.restoreCastleButton.Enabled = false; } if (!GameEngine.Instance.Castle.gotTroopsSave()) { this.restoreTroopsButton.Enabled = false; } if (GameEngine.Instance.World.isCapital(GameEngine.Instance.Castle.VillageID)) { this.deleteCastleButton.Enabled = false; this.deleteMoatButton.Enabled = false; this.deletePitsButton.Enabled = false; this.deleteOilPotsButton.Enabled = false; } } } else { int num = 0x36; this.setup1Label.Text = SK.Text("Advanced_Castle_SETUP1", "Configuration 1"); this.setup1Label.Color = ARGBColors.White; this.setup1Label.Position = new Point(13, 50); this.setup1Label.Size = new Size(0x14f, 20); this.setup1Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.setup1Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.backgroundImage.addControl(this.setup1Label); this.memoriseSetup1Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.memoriseSetup1Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.memoriseSetup1Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.memoriseSetup1Button.Position = new Point(0x19, 0x45); this.memoriseSetup1Button.Text.Text = SK.Text("Advanced_Castle_Memorise", "Memorize"); this.memoriseSetup1Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.memoriseSetup1Button.Text.Color = ARGBColors.Black; this.memoriseSetup1Button.Data = 1; this.memoriseSetup1Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.memoriseAttackClicked), "AdvancedCastleOptionsPanel_memorise_troops"); this.backgroundImage.addControl(this.memoriseSetup1Button); this.restoreSetup1Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.restoreSetup1Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.restoreSetup1Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.restoreSetup1Button.Position = new Point(0xc3, 0x45); this.restoreSetup1Button.Text.Text = SK.Text("Advanced_Castle_Restore", "Restore"); this.restoreSetup1Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.restoreSetup1Button.Text.Color = ARGBColors.Black; this.restoreSetup1Button.Data = 1; this.restoreSetup1Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.restoreAttackClicked), "AdvancedCastleOptionsPanel_memorise_infrastructure"); this.backgroundImage.addControl(this.restoreSetup1Button); this.setup2Label.Text = SK.Text("Advanced_Castle_SETUP2", "Configuration 2"); this.setup2Label.Color = ARGBColors.White; this.setup2Label.Position = new Point(13, 50 + num); this.setup2Label.Size = new Size(0x14f, 20); this.setup2Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.setup2Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.backgroundImage.addControl(this.setup2Label); this.memoriseSetup2Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.memoriseSetup2Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.memoriseSetup2Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.memoriseSetup2Button.Position = new Point(0x19, 0x45 + num); this.memoriseSetup2Button.Text.Text = SK.Text("Advanced_Castle_Memorise", "Memorize"); this.memoriseSetup2Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.memoriseSetup2Button.Text.Color = ARGBColors.Black; this.memoriseSetup2Button.Data = 2; this.memoriseSetup2Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.memoriseAttackClicked), "AdvancedCastleOptionsPanel_memorise_troops"); this.backgroundImage.addControl(this.memoriseSetup2Button); this.restoreSetup2Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.restoreSetup2Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.restoreSetup2Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.restoreSetup2Button.Position = new Point(0xc3, 0x45 + num); this.restoreSetup2Button.Text.Text = SK.Text("Advanced_Castle_Restore", "Restore"); this.restoreSetup2Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.restoreSetup2Button.Text.Color = ARGBColors.Black; this.restoreSetup2Button.Data = 2; this.restoreSetup2Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.restoreAttackClicked), "AdvancedCastleOptionsPanel_memorise_infrastructure"); this.backgroundImage.addControl(this.restoreSetup2Button); this.setup3Label.Text = SK.Text("Advanced_Castle_SETUP3", "Configuration 3"); this.setup3Label.Color = ARGBColors.White; this.setup3Label.Position = new Point(13, 50 + (num * 2)); this.setup3Label.Size = new Size(0x14f, 20); this.setup3Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.setup3Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.backgroundImage.addControl(this.setup3Label); this.memoriseSetup3Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.memoriseSetup3Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.memoriseSetup3Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.memoriseSetup3Button.Position = new Point(0x19, 0x45 + (num * 2)); this.memoriseSetup3Button.Text.Text = SK.Text("Advanced_Castle_Memorise", "Memorize"); this.memoriseSetup3Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.memoriseSetup3Button.Text.Color = ARGBColors.Black; this.memoriseSetup3Button.Data = 3; this.memoriseSetup3Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.memoriseAttackClicked), "AdvancedCastleOptionsPanel_memorise_troops"); this.backgroundImage.addControl(this.memoriseSetup3Button); this.restoreSetup3Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.restoreSetup3Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.restoreSetup3Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.restoreSetup3Button.Position = new Point(0xc3, 0x45 + (num * 2)); this.restoreSetup3Button.Text.Text = SK.Text("Advanced_Castle_Restore", "Restore"); this.restoreSetup3Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.restoreSetup3Button.Text.Color = ARGBColors.Black; this.restoreSetup3Button.Data = 3; this.restoreSetup3Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.restoreAttackClicked), "AdvancedCastleOptionsPanel_memorise_infrastructure"); this.backgroundImage.addControl(this.restoreSetup3Button); this.setup4Label.Text = SK.Text("Advanced_Castle_SETUP4", "Configuration 4"); this.setup4Label.Color = ARGBColors.White; this.setup4Label.Position = new Point(13, 50 + (num * 3)); this.setup4Label.Size = new Size(0x14f, 20); this.setup4Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.setup4Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.backgroundImage.addControl(this.setup4Label); this.memoriseSetup4Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.memoriseSetup4Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.memoriseSetup4Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.memoriseSetup4Button.Position = new Point(0x19, 0x45 + (num * 3)); this.memoriseSetup4Button.Text.Text = SK.Text("Advanced_Castle_Memorise", "Memorize"); this.memoriseSetup4Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.memoriseSetup4Button.Text.Color = ARGBColors.Black; this.memoriseSetup4Button.Data = 4; this.memoriseSetup4Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.memoriseAttackClicked), "AdvancedCastleOptionsPanel_memorise_troops"); this.backgroundImage.addControl(this.memoriseSetup4Button); this.restoreSetup4Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.restoreSetup4Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.restoreSetup4Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.restoreSetup4Button.Position = new Point(0xc3, 0x45 + (num * 3)); this.restoreSetup4Button.Text.Text = SK.Text("Advanced_Castle_Restore", "Restore"); this.restoreSetup4Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.restoreSetup4Button.Text.Color = ARGBColors.Black; this.restoreSetup4Button.Data = 4; this.restoreSetup4Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.restoreAttackClicked), "AdvancedCastleOptionsPanel_memorise_infrastructure"); this.backgroundImage.addControl(this.restoreSetup4Button); this.setup5Label.Text = SK.Text("Advanced_Castle_SETUP5", "Configuration 5"); this.setup5Label.Color = ARGBColors.White; this.setup5Label.Position = new Point(13, 50 + (num * 4)); this.setup5Label.Size = new Size(0x14f, 20); this.setup5Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.setup5Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.backgroundImage.addControl(this.setup5Label); this.memoriseSetup5Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.memoriseSetup5Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.memoriseSetup5Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.memoriseSetup5Button.Position = new Point(0x19, 0x45 + (num * 4)); this.memoriseSetup5Button.Text.Text = SK.Text("Advanced_Castle_Memorise", "Memorize"); this.memoriseSetup5Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.memoriseSetup5Button.Text.Color = ARGBColors.Black; this.memoriseSetup5Button.Data = 5; this.memoriseSetup5Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.memoriseAttackClicked), "AdvancedCastleOptionsPanel_memorise_troops"); this.backgroundImage.addControl(this.memoriseSetup5Button); this.restoreSetup5Button.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.restoreSetup5Button.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.restoreSetup5Button.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.restoreSetup5Button.Position = new Point(0xc3, 0x45 + (num * 4)); this.restoreSetup5Button.Text.Text = SK.Text("Advanced_Castle_Restore", "Restore"); this.restoreSetup5Button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.restoreSetup5Button.Text.Color = ARGBColors.Black; this.restoreSetup5Button.Data = 5; this.restoreSetup5Button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.restoreAttackClicked), "AdvancedCastleOptionsPanel_memorise_infrastructure"); this.backgroundImage.addControl(this.restoreSetup5Button); this.infoLabel.Text = ""; this.infoLabel.Color = ARGBColors.White; this.infoLabel.Position = new Point(20, 0x149); this.infoLabel.Size = new Size(this.backgroundImage.Width, 20); this.infoLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.infoLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.backgroundImage.addControl(this.infoLabel); this.restoreSetup1Button.Enabled = false; this.restoreSetup2Button.Enabled = false; this.restoreSetup3Button.Enabled = false; this.restoreSetup4Button.Enabled = false; this.restoreSetup5Button.Enabled = false; if (GameEngine.Instance.CastleAttackerSetup != null) { if (GameEngine.Instance.CastleAttackerSetup.gotAttackSetupSave(1)) { this.restoreSetup1Button.Enabled = true; } if (GameEngine.Instance.CastleAttackerSetup.gotAttackSetupSave(2)) { this.restoreSetup2Button.Enabled = true; } if (GameEngine.Instance.CastleAttackerSetup.gotAttackSetupSave(3)) { this.restoreSetup3Button.Enabled = true; } if (GameEngine.Instance.CastleAttackerSetup.gotAttackSetupSave(4)) { this.restoreSetup4Button.Enabled = true; } if (GameEngine.Instance.CastleAttackerSetup.gotAttackSetupSave(5)) { this.restoreSetup5Button.Enabled = true; } bool flag = GameEngine.Instance.CastleAttackerSetup.canMemoriseAttackSetup(); this.memoriseSetup1Button.Enabled = flag; this.memoriseSetup2Button.Enabled = flag; this.memoriseSetup3Button.Enabled = flag; this.memoriseSetup4Button.Enabled = flag; this.memoriseSetup5Button.Enabled = flag; } } this.okButton.ImageNorm = (Image)GFXLibrary.button_blue_01_normal; this.okButton.ImageOver = (Image)GFXLibrary.button_blue_01_over; this.okButton.ImageClick = (Image)GFXLibrary.button_blue_01_in; this.okButton.Position = new Point(240, 0x145); this.okButton.Text.Text = SK.Text("GENERIC_OK", "OK"); this.okButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.okButton.Text.Color = ARGBColors.Black; this.okButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.okClicked), "AdvancedCastleOptionsPanel_restore_ok"); this.backgroundImage.addControl(this.okButton); parent.Size = this.backgroundImage.Size; base.Invalidate(); parent.Invalidate(); }
public GloryVictoryWindow() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void init() { base.clearControls(); this.backImage = this.backGround.init(true, 0x2710); base.addControl(this.backGround); this.tradeButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0]; this.tradeButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[7]; this.tradeButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[14]; this.tradeButton.Position = new Point(10, 0x8e); this.tradeButton.CustomTooltipID = 0x97f; this.tradeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendResources), "OwnVillagePanel2_trade"); this.backImage.addControl(this.tradeButton); this.attackButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[1]; this.attackButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[8]; this.attackButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[15]; this.attackButton.Position = new Point(0x2d, 0x8e); this.attackButton.CustomTooltipID = 0x980; this.attackButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendTroops), "OwnVillagePanel2_attack"); this.backImage.addControl(this.attackButton); this.scoutButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[3]; this.scoutButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[10]; this.scoutButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0x11]; this.scoutButton.Position = new Point(80, 0x8e); this.scoutButton.CustomTooltipID = 0x981; this.scoutButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendScouts), "OwnVillagePanel2_scouts"); this.backImage.addControl(this.scoutButton); this.reinforceButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[2]; this.reinforceButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[9]; this.reinforceButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0x10]; this.reinforceButton.Position = new Point(0x73, 0x8e); this.reinforceButton.CustomTooltipID = 0x982; this.reinforceButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendReinforcements), "OwnVillagePanel2_reinforcements"); this.backImage.addControl(this.reinforceButton); this.monkButton.ImageNorm = (Image)GFXLibrary.mrhp_world_icons_rhs_array[4]; this.monkButton.ImageOver = (Image)GFXLibrary.mrhp_world_icons_rhs_array[11]; this.monkButton.ImageClick = (Image)GFXLibrary.mrhp_world_icons_rhs_array[0x12]; this.monkButton.Position = new Point(150, 0x8e); this.monkButton.CustomTooltipID = 0x983; this.monkButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendMonks), "OwnVillagePanel2_monks"); this.backImage.addControl(this.monkButton); this.villageButton.ImageNorm = (Image)GFXLibrary.int_world_icon_village; this.villageButton.OverBrighten = true; this.villageButton.MoveOnClick = true; this.villageButton.Position = new Point(0x1d, 0x70); this.villageButton.CustomTooltipID = 0x985; this.villageButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.villageClick), "OwnVillagePanel2_village"); this.backImage.addControl(this.villageButton); this.castleButton.ImageNorm = (Image)GFXLibrary.int_world_icon_castle; this.castleButton.OverBrighten = true; this.castleButton.MoveOnClick = true; this.castleButton.Position = new Point(0x40, 0x70); this.castleButton.CustomTooltipID = 0x986; this.castleButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.castleClick), "OwnVillagePanel2_castle"); this.backImage.addControl(this.castleButton); this.resourcesButton.ImageNorm = (Image)GFXLibrary.int_world_icon_resource; this.resourcesButton.OverBrighten = true; this.resourcesButton.MoveOnClick = true; this.resourcesButton.Position = new Point(0x63, 0x70); this.resourcesButton.CustomTooltipID = 0x987; this.resourcesButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.resourcesClick), "OwnVillagePanel2_resources"); this.backImage.addControl(this.resourcesButton); this.troopsButton.ImageNorm = (Image)GFXLibrary.int_world_icon_troops; this.troopsButton.OverBrighten = true; this.troopsButton.MoveOnClick = true; this.troopsButton.Position = new Point(0x86, 0x70); this.troopsButton.CustomTooltipID = 0x988; this.troopsButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.troopsClick), "OwnVillagePanel2_troops"); this.backImage.addControl(this.troopsButton); this.lblProtectionType.Text = ""; this.lblProtectionType.Color = ARGBColors.Black; this.lblProtectionType.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.lblProtectionType.Position = new Point(0, 0x26); this.lblProtectionType.Size = new Size(this.backImage.Width, 0x17); this.lblProtectionType.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.backImage.addControl(this.lblProtectionType); this.lblProtected.Text = ""; this.lblProtected.Color = ARGBColors.Black; this.lblProtected.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.lblProtected.Position = new Point(6, 0x30); this.lblProtected.Size = new Size(this.backImage.Width - 12, 0x4a); this.lblProtected.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.backImage.addControl(this.lblProtected); this.leftButton.ImageNorm = (Image)GFXLibrary.r_arrow_small_left_norm; this.leftButton.ImageOver = (Image)GFXLibrary.r_arrow_small_left_over; this.leftButton.Position = new Point(5, 50); this.leftButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.infoLeft), "OwnVillagePanel2_protection_left"); this.leftButton.Visible = false; this.backImage.addControl(this.leftButton); this.rightButton.ImageNorm = (Image)GFXLibrary.r_arrow_small_right_norm; this.rightButton.ImageOver = (Image)GFXLibrary.r_arrow_small_right_over; this.rightButton.Position = new Point(170, 50); this.rightButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.infoRight), "OwnVillagePanel2_protection_right"); this.rightButton.Visible = false; this.backImage.addControl(this.rightButton); this.updateSize(); this.numInfos = 0; this.selectedProtection = 0; }
public void init() { int height = base.Height; instance = this; base.clearControls(); int villageID = InterfaceMgr.Instance.getSelectedMenuVillage(); int provinceID = GameEngine.Instance.World.getProvinceFromVillageID(villageID); this.headerImage.Size = new Size(base.Width, 40); this.headerImage.Position = new Point(0, 0); base.addControl(this.headerImage); this.headerImage.Create((Image)GFXLibrary.mail2_titlebar_left, (Image)GFXLibrary.mail2_titlebar_middle, (Image)GFXLibrary.mail2_titlebar_right); CustomSelfDrawPanel.WikiLinkControl.init(this.headerImage, 14, new Point(base.Width - 0x2c, 3)); this.backgroundImage.Size = new Size(base.Width, height - 40); this.backgroundImage.Position = new Point(0, 40); base.addControl(this.backgroundImage); this.backgroundImage.Create((Image)GFXLibrary.mail2_mail_panel_upper_left, (Image)GFXLibrary.mail2_mail_panel_upper_middle, (Image)GFXLibrary.mail2_mail_panel_upper_right, (Image)GFXLibrary.mail2_mail_panel_middle_left, (Image)GFXLibrary.mail2_mail_panel_middle_middle, (Image)GFXLibrary.mail2_mail_panel_middle_right, (Image)GFXLibrary.mail2_mail_panel_lower_left, (Image)GFXLibrary.mail2_mail_panel_lower_middle, (Image)GFXLibrary.mail2_mail_panel_lower_right); this.parishNameLabel.Text = SK.Text("GENERIC_Province", "Province") + " : " + GameEngine.Instance.World.getProvinceName(provinceID) + " (" + GameEngine.Instance.World.getVillageName(villageID) + ")"; this.parishNameLabel.Color = ARGBColors.White; this.parishNameLabel.DropShadowColor = ARGBColors.Black; this.parishNameLabel.Position = new Point(20, 0); this.parishNameLabel.Size = new Size(base.Width - 40, 40); this.parishNameLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.parishNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerImage.addControl(this.parishNameLabel); this.windowImage.Size = new Size(400, 150); this.windowImage.Position = new Point(0x1ed, 130); this.backgroundImage.addControl(this.windowImage); this.windowImage.Create((Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_right); this.sheriffLabel.Text = SK.Text("Provinces_Current_Governor", "Current Governor"); this.sheriffLabel.Position = new Point(30, 0x1a); this.sheriffLabel.Size = new Size(250, 40); this.sheriffLabel.Color = ARGBColors.Black; this.sheriffLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.sheriffLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.windowImage.addControl(this.sheriffLabel); this.goldLabel.Text = SK.Text("GENERIC_Current_Gold", "Current Gold"); this.goldLabel.Position = new Point(30, 0x42); this.goldLabel.Size = new Size(250, 40); this.goldLabel.Color = ARGBColors.Black; this.goldLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.goldLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.windowImage.addControl(this.goldLabel); this.taxLabel.Text = SK.Text("GENERIC_Tax_Rate", "Tax Rate"); this.taxLabel.Position = new Point(30, 0x6a); this.taxLabel.Size = new Size(250, 40); this.taxLabel.Color = ARGBColors.Black; this.taxLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.taxLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.windowImage.addControl(this.taxLabel); this.sheriffName.Text = ""; this.sheriffName.Position = new Point(170, 0x1a); this.sheriffName.Size = new Size(200, 40); this.sheriffName.Color = ARGBColors.Black; this.sheriffName.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.sheriffName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.windowImage.addControl(this.sheriffName); this.goldValue.Text = ""; this.goldValue.Position = new Point(170, 0x42); this.goldValue.Size = new Size(200, 40); this.goldValue.Color = ARGBColors.Black; this.goldValue.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.goldValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.windowImage.addControl(this.goldValue); this.taxValue.Text = ""; this.taxValue.Position = new Point(170, 0x6a); this.taxValue.Size = new Size(200, 40); this.taxValue.Color = ARGBColors.Black; this.taxValue.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.taxValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.windowImage.addControl(this.taxValue); this.activityLabel.Text = SK.Text("WALL_recent_activity", "Recent Activity"); this.activityLabel.Position = new Point(8, -16); this.activityLabel.Size = new Size(0x184, 40); this.activityLabel.Color = ARGBColors.Black; this.activityLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.activityLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.BOTTOM_CENTER; this.backgroundImage.addControl(this.activityLabel); this.wallInfoImage.Size = new Size(0x18c, height - 80); this.wallInfoImage.Position = new Point(8, 0x1d); this.backgroundImage.addControl(this.wallInfoImage); this.wallInfoImage.Create((Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_right); this.wallScrollArea.Position = new Point(15, 15); this.wallScrollArea.Size = new Size(0x151, height - 0x65); this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x151, height - 0x65)); this.wallInfoImage.addControl(this.wallScrollArea); int num1 = this.wallScrollBar.Value; this.wallScrollBar.Visible = false; this.wallScrollBar.Position = new Point(0x166, 15); this.wallScrollBar.Size = new Size(0x18, height - 0x65); this.wallInfoImage.addControl(this.wallScrollBar); this.wallScrollBar.Value = 0; this.wallScrollBar.Max = 100; this.wallScrollBar.NumVisibleLines = 0x19; this.wallScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.wallScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved)); StoredProvinceInfo info = (StoredProvinceInfo)this.provinceList[provinceID]; bool flag = false; if (info != null) { TimeSpan span = (TimeSpan)(DateTime.Now - info.m_lastUpdateTime); if ((span.TotalMinutes <= 2.0) && (info.lastReturnData != null)) { goto Label_08B9; } } flag = true; Label_08B9: this.m_currentVillage = villageID; if (this.currentProvince != provinceID) { this.currentLeaderID = -1; this.currentLeaderName = ""; this.m_userIDOnCurrent = -1; } this.currentProvince = provinceID; if (flag) { RemoteServices.Instance.set_GetProvinceFrontPageInfo_UserCallBack(new RemoteServices.GetProvinceFrontPageInfo_UserCallBack(this.getProvinceFrontPageInfoCallback)); RemoteServices.Instance.GetProvinceFrontPageInfo(this.m_currentVillage); } this.updateLeaderInfo(); if (!flag) { this.getProvinceFrontPageInfoCallback(info.lastReturnData); } this.btnChat.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.btnChat.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.btnChat.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.btnChat.Position = new Point(base.Width - 230, base.Height - 90); this.btnChat.Text.Text = SK.Text("GENERIC_Chat", "Chat"); this.btnChat.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.btnChat.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.btnChat.TextYOffset = -3; this.btnChat.Text.Color = ARGBColors.Black; this.btnChat.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.chatClick), "ProvinceFrontPagePanel2_chat"); this.backgroundImage.addControl(this.btnChat); }
public VacationCancelPopupWindow() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void init(AttackTargetsPopup parent) { this.m_parent = parent; base.Size = this.m_parent.Size; this.BackColor = ARGBColors.Transparent; CustomSelfDrawPanel.CSDImage control = new CustomSelfDrawPanel.CSDImage { Alpha = 0.1f, Image = (Image)GFXLibrary.formations_img, Scale = 5.0, Position = new Point(0, 0), Size = base.Size }; base.addControl(control); this.favouritesHeader.Text = SK.Text("Attack_Targets_Favourites", "Favourite Targets"); this.favouritesHeader.Color = ARGBColors.White; this.favouritesHeader.Position = new Point(30, 0); this.favouritesHeader.Size = new Size(300, 30); this.favouritesHeader.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.favouritesHeader.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; control.addControl(this.favouritesHeader); this.recentHeader.Text = SK.Text("Attack_Targets_Recent", "Recent Targets"); this.recentHeader.Color = ARGBColors.White; this.recentHeader.Position = new Point(370, 0); this.recentHeader.Size = new Size(300, 30); this.recentHeader.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.recentHeader.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; control.addControl(this.recentHeader); this.favouritesList.Size = new Size(300, 0x156); this.favouritesList.Position = new Point(30, 30); control.addControl(this.favouritesList); this.favouritesList.Create(0x13, 0x12); this.favouritesList.setLineClickedDelegate(new CustomSelfDrawPanel.CSDListBox.CSD_LineClickedDelegate(this.favouriteClick)); this.favouritesList.setDoubleClickedDelegate(new CustomSelfDrawPanel.CSDListBox.CSD_LineClickedDelegate(this.favouriteDoubleClick)); this.recentList.Size = new Size(300, 0x156); this.recentList.Position = new Point(370, 30); control.addControl(this.recentList); this.recentList.Create(0x13, 0x12); this.recentList.setLineClickedDelegate(new CustomSelfDrawPanel.CSDListBox.CSD_LineClickedDelegate(this.recentClick)); this.recentList.setDoubleClickedDelegate(new CustomSelfDrawPanel.CSDListBox.CSD_LineClickedDelegate(this.recentDoubleClick)); this.closeButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.closeButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.closeButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.closeButton.Position = new Point(540, base.Height - 70); this.closeButton.Text.Text = SK.Text("GENERIC_Close", "Close"); this.closeButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.closeButton.TextYOffset = -3; this.closeButton.Text.Color = ARGBColors.Black; this.closeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick)); control.addControl(this.closeButton); this.attackButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.attackButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.attackButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.attackButton.Position = new Point(380, base.Height - 70); this.attackButton.Text.Text = SK.Text("GENERIC_Attack", "Attack"); this.attackButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.attackButton.TextYOffset = -3; this.attackButton.Text.Color = ARGBColors.Black; this.attackButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.attackClicked)); this.attackButton.Enabled = false; control.addControl(this.attackButton); this.scoutButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.scoutButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.scoutButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.scoutButton.Position = new Point(220, base.Height - 70); this.scoutButton.Text.Text = SK.Text("GENERIC_Scout", "Scout"); this.scoutButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.scoutButton.TextYOffset = -3; this.scoutButton.Text.Color = ARGBColors.Black; this.scoutButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.scoutClicked)); this.scoutButton.Enabled = false; control.addControl(this.scoutButton); this.removeButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.removeButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.removeButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.removeButton.Position = new Point(30, base.Height - 70); this.removeButton.Text.Text = SK.Text("MailScreen_Remove", "Remove"); this.removeButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.removeButton.TextYOffset = -3; this.removeButton.Text.Color = ARGBColors.Black; this.removeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.removeClicked)); this.removeButton.Visible = false; control.addControl(this.removeButton); this.fillBoxes(); }
public void init(MyFormBase parent, int troopType, bool isTroops, object back) { base.clearControls(); this.imgBackground.Image = (Image)back; this.m_isTroops = isTroops; this.m_parent = parent; base.Size = this.m_parent.Size; this.BackColor = ARGBColors.Transparent; this.imgBackground.Size = base.Size; this.imgBackground.Position = new Point(0, 0); this.imgBackground.Visible = true; base.addControl(this.imgBackground); VillageMap village = GameEngine.Instance.Village; this.m_troopType = troopType; int numPeasants = 0; this.lblTroopType.Text = ""; this.lblTroopType.Color = ARGBColors.White; this.lblTroopType.DropShadowColor = ARGBColors.Black; this.lblTroopType.Position = new Point(0, 10); this.lblTroopType.Size = new Size(base.Width, 0x18); this.lblTroopType.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblTroopType.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.lblMax.Text = ""; if (village != null) { switch (troopType) { case 1: this.lblTroopType.Text = SK.Text("GENERIC_Monks", "Monks"); numPeasants = village.calcTotalMonksAtHome(); break; case 2: this.lblTroopType.Text = SK.Text("GENERIC_Merchants", "Merchants"); numPeasants = village.calcTotalTradersAtHome(); break; case 3: this.lblTroopType.Text = SK.Text("GENERIC_Spiese", "Spies"); numPeasants = 0; break; case 4: this.lblTroopType.Text = SK.Text("GENERIC_Scouts", "Scouts"); numPeasants = village.calcTotalScoutsAtHome(); break; case 70: this.lblTroopType.Text = SK.Text("GENERIC_Peasants", "Peasants"); numPeasants = village.m_numPeasants; break; case 0x47: this.lblTroopType.Text = SK.Text("GENERIC_Swordsmen", "Swordsmen"); numPeasants = village.m_numSwordsmen; break; case 0x48: this.lblTroopType.Text = SK.Text("GENERIC_Archers", "Archers"); numPeasants = village.m_numArchers; break; case 0x49: this.lblTroopType.Text = SK.Text("GENERIC_Pikemen", "Pikemen"); numPeasants = village.m_numPikemen; break; case 0x4a: this.lblTroopType.Text = SK.Text("GENERIC_Catapults", "Catapults"); numPeasants = village.m_numCatapults; break; case 100: this.lblTroopType.Text = SK.Text("GENERIC_Captains", "Captains"); numPeasants = village.m_numCaptains; break; } this.lblMax.Text = numPeasants.ToString(); } this.tbTroopsDisband.Position = new Point((base.Width / 2) - (GFXLibrary.int_slidebar_ruler.Width / 2), 40); this.tbTroopsDisband.Size = new Size(base.Width - 50, 0x17); this.tbTroopsDisband.StepValue = 1; this.tbTroopsDisband.Value = 0; this.tbTroopsDisband.Max = numPeasants; this.tbTroopsDisband.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.trackMoved)); this.tbTroopsDisband.Create((Image)GFXLibrary.int_slidebar_ruler, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider, (Image)GFXLibrary.reinforce_slider); this.lblMin.Text = "0"; this.lblMin.Color = ARGBColors.White; this.lblMin.DropShadowColor = ARGBColors.Black; this.lblMin.Position = new Point(0, this.tbTroopsDisband.Position.Y); this.lblMin.Size = new Size(this.tbTroopsDisband.Position.X - 10, this.tbTroopsDisband.Height); this.lblMin.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblMin.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.lblMax.Color = ARGBColors.White; this.lblMax.DropShadowColor = ARGBColors.Black; this.lblMax.Position = new Point(this.tbTroopsDisband.Rectangle.Right + 5, this.tbTroopsDisband.Position.Y); this.lblMax.Size = new Size((base.Width - this.tbTroopsDisband.Rectangle.Right) - 10, this.tbTroopsDisband.Height); this.lblMax.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblMax.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.lblCurValue.Text = SK.Text("GENERIC_Disband", "Disband"); this.lblCurValue.Text = this.lblCurValue.Text + ": 0"; this.lblCurValue.Color = ARGBColors.White; this.lblCurValue.DropShadowColor = ARGBColors.Black; this.lblCurValue.Position = new Point(this.tbTroopsDisband.Position.X, this.tbTroopsDisband.Rectangle.Bottom + 10); this.lblCurValue.Size = new Size(base.Width, 0x1a); this.lblCurValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblCurValue.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.btnDisband.Text.Text = SK.Text("GENERIC_Disband", "Disband"); this.btnDisband.ImageNorm = (Image)GFXLibrary.button_132_normal; this.btnDisband.ImageOver = (Image)GFXLibrary.button_132_over; this.btnDisband.ImageClick = (Image)GFXLibrary.button_132_in; this.btnDisband.setSizeToImage(); this.btnDisband.Position = new Point((base.Width / 2) - (this.btnDisband.Width / 2), this.lblCurValue.Rectangle.Bottom + 10); this.btnDisband.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.btnDisband.TextYOffset = -2; this.btnDisband.Text.Color = ARGBColors.Black; this.btnDisband.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.disbandClick), "Disband_Disband"); this.btnDisband.Enabled = true; this.btnEdit.ImageNorm = (Image)GFXLibrary.faction_pen; this.btnEdit.ImageOver = (Image)GFXLibrary.faction_pen; this.btnEdit.ImageClick = (Image)GFXLibrary.faction_pen; this.btnEdit.setSizeToImage(); this.btnEdit.MoveOnClick = true; this.btnEdit.OverBrighten = true; this.btnEdit.Position = new Point(this.tbTroopsDisband.Rectangle.Right - this.btnEdit.Width, this.lblCurValue.Position.Y); this.btnEdit.Data = 1; this.btnEdit.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.editValue), "Disband_EditValue"); if (this.imgBackground.Image != null) { this.imgBackground.addControl(this.btnEdit); this.imgBackground.addControl(this.btnDisband); this.imgBackground.addControl(this.lblCurValue); this.imgBackground.addControl(this.lblMax); this.imgBackground.addControl(this.lblMin); this.imgBackground.addControl(this.tbTroopsDisband); this.imgBackground.addControl(this.lblTroopType); } else { base.addControl(this.btnEdit); base.addControl(this.btnDisband); base.addControl(this.lblCurValue); base.addControl(this.lblMax); base.addControl(this.lblMin); base.addControl(this.tbTroopsDisband); base.addControl(this.lblTroopType); } }
public VacationCancelPopupPanel() { this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.InitializeComponent(); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); }
public ConfirmBuyOfferPopup() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void init(LostVillageWindow parent, int age, int cardsMode) { this.m_secondAgeMessage = age; this.m_parent = parent; this.m_cardsMode = cardsMode; base.clearControls(); this.transparentBackground.Size = base.Size; this.transparentBackground.FillColor = Color.FromArgb(0xff, 0, 0xff); base.addControl(this.transparentBackground); if (age != 0x3e8) { this.background.Position = new Point(0, 70); this.background.Size = new Size(base.Width, 0x1be); base.addControl(this.background); this.background.Create((Image)GFXLibrary._9sclice_fancy_top_left, (Image)GFXLibrary._9sclice_fancy_top_mid, (Image)GFXLibrary._9sclice_fancy_top_right, (Image)GFXLibrary._9sclice_fancy_mid_left, (Image)GFXLibrary._9sclice_fancy_mid_mid, (Image)GFXLibrary._9sclice_fancy_mid_right, (Image)GFXLibrary._9sclice_fancy_bottom_left, (Image)GFXLibrary._9sclice_fancy_bottom_mid, (Image)GFXLibrary._9sclice_fancy_bottom_right); this.background.ForceTiling(); this.topImage.Image = (Image)GFXLibrary._9sclice_fancy_top_mid_over_01; this.topImage.Position = new Point((base.Width - this.topImage.Image.Width) / 2, 0); base.addControl(this.topImage); this.bottomImage.Image = (Image)GFXLibrary._9sclice_fancy_bottom_mid_over; this.bottomImage.Position = new Point((base.Width - this.bottomImage.Image.Width) / 2, (base.Height - this.bottomImage.Image.Height) - 5); base.addControl(this.bottomImage); this.backgroundArea.Position = new Point(0xab, 0x86); this.backgroundArea.Size = new Size(0x202, 340); base.addControl(this.backgroundArea); } else { this.backgroundImage.Position = new Point(0, 0); this.backgroundImage.Image = (Image)GFXLibrary.dominationEnd; base.addControl(this.backgroundImage); this.backgroundArea.Position = new Point(0, 0); this.backgroundArea.Size = this.backgroundImage.Size; base.addControl(this.backgroundArea); } this.btnLogout.ImageNorm = (Image)GFXLibrary.worldSelect_swap_norm; this.btnLogout.ImageOver = (Image)GFXLibrary.worldSelect_swap_over; this.btnLogout.ImageClick = (Image)GFXLibrary.worldSelect_swap_pushed; if (age != 0x3e8) { this.btnLogout.Position = new Point(260 - (this.btnLogout.ImageNorm.Width / 2), 0x147); } else { this.btnLogout.Position = new Point((base.Width / 2) - (this.btnLogout.ImageNorm.Width / 2), 0x23d); } this.btnLogout.Text.Text = SK.Text("GENERIC_Continue", "Continue"); 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.backgroundArea.addControl(this.btnLogout); if (cardsMode < 0) { if (this.m_secondAgeMessage == 0) { this.headerLabel.Text = SK.Text("WorldSelect_Villages_Lost", "Your village was lost due to") + " :"; this.headerLabel.Position = new Point(-50, 12); this.headerLabel.Size = new Size(this.backgroundArea.Width + 100, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.Color = ARGBColors.Black; this.headerLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); if (GameEngine.Instance.World.lastAttacker.Length == 0) { this.lostMessageLabel.Text = SK.Text("WorldSelect_Inactivity", "Inactivity"); } else if (GameEngine.Instance.World.lastAttacker == RemoteServices.Instance.UserName) { this.lostMessageLabel.Text = SK.Text("WorldSelect_Abandoning", "You Abandoned Your Village"); } else { this.lostMessageLabel.Text = SK.Text("WorldSelect_Attacking_Player", "An Attacking Player") + " (" + GameEngine.Instance.World.lastAttacker + ")"; } this.lostMessageLabel.Position = new Point(0, 0x2f); this.lostMessageLabel.Size = new Size(this.backgroundArea.Width, 240); this.lostMessageLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lostMessageLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lostMessageLabel.Color = ARGBColors.Black; this.lostMessageLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.lostMessageLabel); this.wallOfText.Text = SK.Text("WorldSelect_wall_of_text1", "Losing your village is all part of the game and this is only the beginning!") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_wall_of_text2", "There are no penalties for losing a village. You have the same amount of Gold, Honour and Faith Points as before and any unused Cards, Card Packs or Premium Tokens remain in your account. Quests, Research and Achievements are all unaffected and your Rank remains the same.") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_wall_of_text3", "With all your resources and abilities intact all that remains is for you to rebuild and rise to fight again!"); this.wallOfText.Position = new Point(0, 0x40); this.wallOfText.Size = new Size(this.backgroundArea.Width, 260); this.wallOfText.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.wallOfText.Color = ARGBColors.Black; this.wallOfText.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); } else if (this.m_secondAgeMessage == 2) { this.headerLabel.Text = SK.Text("WorldSelect_2ndAge_Header", "Welcome to the Second Age!"); this.headerLabel.Position = new Point(-50, 12); this.headerLabel.Size = new Size(this.backgroundArea.Width + 100, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.Color = ARGBColors.Black; this.headerLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); this.wallOfText.Text = SK.Text("WorldSelect_2ndAge_body1", "A new rule set is now in effect:") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_2ndAge_body2", "1. Armies move across the world map at double speed.") + Environment.NewLine + SK.Text("WorldSelect_2ndAge_body3", "2. Three times as much Glory is earned for holding territory.") + Environment.NewLine + SK.Text("WorldSelect_2ndAge_body4", "3. Monks can influence voting at county level, with high voting costs and caps at county, province and country level.") + Environment.NewLine + SK.Text("WorldSelect_2ndAge_body5", "4. Interdicting and excommunicating villages costs twice the usual amount.") + Environment.NewLine + SK.Text("WorldSelect_2ndAge_body6", "5. At the end of the Second Age Glory Race players will be given unique treasures for their victory and a 'Champion Pack'.") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_2ndAge_body7", "For more information on the Second Age please check your mail."); this.wallOfText.Position = new Point(0, 0x31); this.wallOfText.Size = new Size(this.backgroundArea.Width, 260); if ((Program.mySettings.LanguageIdent == "fr") || (Program.mySettings.LanguageIdent == "ru")) { this.wallOfText.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); } else { this.wallOfText.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); } this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.wallOfText.Color = ARGBColors.Black; this.wallOfText.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); CustomSelfDrawPanel.WikiLinkControl.init(this.backgroundArea, 0x2d, new Point(0x201, -6)); } else if (this.m_secondAgeMessage == 3) { this.headerLabel.Text = SK.Text("WorldSelect_3rdAge_Header", "Welcome to the Third Age!"); this.headerLabel.Position = new Point(-50, 12); this.headerLabel.Size = new Size(this.backgroundArea.Width + 100, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.Color = ARGBColors.Black; this.headerLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); this.wallOfText.Text = SK.Text("WorldSelect_2ndAge_body1", "A new rule set is now in effect:") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_3rdAge_body2", "1. Crown Princes may now access up to 30 villages") + Environment.NewLine + SK.Text("WorldSelect_3rdAge_body3", "2. Honour production has been increased by 900% for Banqueting and 300% for Popularity") + Environment.NewLine + SK.Text("WorldSelect_3rdAge_body4", "3. Goods have been cleared from all Markets, with prices reset to their starting levels") + Environment.NewLine + SK.Text("WorldSelect_3rdAge_body5", "4. All in-game Factions and Houses have been disbanded") + Environment.NewLine + SK.Text("WorldSelect_3rdAge_body6", "5. Certain upgradeable parish buildings can now gain additional levels") + Environment.NewLine + SK.Text("WorldSelect_3rdAge_body7", "6. The rate at which Glory is gained has been rebalanced") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_3rdAge_body8", "For more information on the Third Age please check your mail"); this.wallOfText.Position = new Point(0, 0x31); this.wallOfText.Size = new Size(this.backgroundArea.Width, 260); this.wallOfText.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.wallOfText.Color = ARGBColors.Black; this.wallOfText.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); CustomSelfDrawPanel.WikiLinkControl.init(this.backgroundArea, 0x2e, new Point(0x201, -6)); } else if (this.m_secondAgeMessage == 4) { this.headerLabel.Text = SK.Text("WorldSelect_4thAge_Header", "Welcome to the Fourth Age!"); this.headerLabel.Position = new Point(-50, 12); this.headerLabel.Size = new Size(this.backgroundArea.Width + 100, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.Color = ARGBColors.Black; this.headerLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); this.wallOfText.Text = SK.Text("WorldSelect_2ndAge_body1", "A new rule set is now in effect:") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_4thAge_body2", "1. Crown Princes may now own up to 40 villages.") + Environment.NewLine + SK.Text("WorldSelect_4thAge_body3", "2. Army and Scout movement speeds are three times faster than in the First Age.") + Environment.NewLine + SK.Text("WorldSelect_4thAge_body4", "3. Weapons can no longer be sold or purchased at Markets.") + Environment.NewLine + SK.Text("WorldSelect_4thAge_body5", "4. Goods have been cleared from all Markets, with prices reset to their starting level.") + Environment.NewLine + SK.Text("WorldSelect_4thAge_body6", "5. The Faith Point cost for Interdiction has been increased.") + Environment.NewLine + SK.Text("WorldSelect_4thAge_body7", "6. A Military School can be built in a parish, which gives access to Bombards.") + Environment.NewLine + SK.Text("WorldSelect_4thAge_body8", "7. Players who own more than 10 villages will no longer have to pay the extra honour cost to regain a village, if one of their villages is captured.") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_4thAge_body9", "For more information on the Fourth Age please check your mail."); this.wallOfText.Position = new Point(0, 0x31); this.wallOfText.Size = new Size(this.backgroundArea.Width, 260); this.wallOfText.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.wallOfText.Color = ARGBColors.Black; this.wallOfText.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); CustomSelfDrawPanel.WikiLinkControl.init(this.backgroundArea, 0x30, new Point(0x201, -6)); } else if (this.m_secondAgeMessage == 5) { this.headerLabel.Text = SK.Text("WorldSelect_5thAge_Header", "Welcome to the Fifth Age!"); this.headerLabel.Position = new Point(-50, 12); this.headerLabel.Size = new Size(this.backgroundArea.Width + 100, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.Color = ARGBColors.Black; this.headerLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); this.wallOfText.Text = SK.Text("WorldSelect_2ndAge_body1", "A new rule set is now in effect:") + Environment.NewLine + Environment.NewLine + SK.Text("FifthAge_Mail_03", "1. Military Schools can be upgraded to level 5.") + Environment.NewLine + SK.Text("FifthAge_Mail_04", "2. Treasure Castles are twice as likely to appear.") + Environment.NewLine + SK.Text("FifthAge_Mail_05", "3. All factions and houses have been disbanded.") + Environment.NewLine + SK.Text("FifthAge_Mail_06", "4. All capital forums and walls have been cleared.") + Environment.NewLine + SK.Text("FifthAge_Mail_07", "5. Only members of a House can be candidates for County elections.") + Environment.NewLine + SK.Text("FifthAge_Mail_08", "6. To be eligible for the office of sheriff, a candidate must belong to a House which controls at least 30% of the parishes in the county.") + Environment.NewLine + SK.Text("WorldSelect_5thAge_body8", "7. Large Houses gain Glory more slowly than small Houses.") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_5thAge_body9", "For more information on the Fifth Age please check your mail."); this.wallOfText.Position = new Point(0, 0x31); this.wallOfText.Size = new Size(this.backgroundArea.Width, 260); this.wallOfText.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.wallOfText.Color = ARGBColors.Black; this.wallOfText.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); CustomSelfDrawPanel.WikiLinkControl.init(this.backgroundArea, 0x33, new Point(0x201, -6)); } else if (this.m_secondAgeMessage == 10) { this.headerLabel.Text = SK.Text("WorldSelect_Dom_Heading1", "Welcome to Domination World!"); this.headerLabel.Position = new Point(-50, 0); this.headerLabel.Size = new Size(this.backgroundArea.Width + 100, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.Color = ARGBColors.Black; this.headerLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); this.wallOfText.Text = SK.Text("WorldSelect_Dom_body2", "New gameplay rules are in effect") + ":" + Environment.NewLine + Environment.NewLine + "1. " + SK.Text("WorldSelect_Dom_body3", "Interdiction cannot be used.") + Environment.NewLine + "2. " + SK.Text("WorldSelect_Dom_body4", "Build speeds quadrupled for buildings and castles in villages and capitals.") + Environment.NewLine + "3. " + SK.Text("WorldSelect_Dom_body5", "Research times reduced by half.") + Environment.NewLine + "4. " + SK.Text("WorldSelect_Dom_body6", "Time limit of 60 days, after which the world ends.") + Environment.NewLine + "5. " + SK.Text("WorldSelect_Dom_body7", "No Glory Rounds or Ages. The House with the most Glory when the world ends wins.") + Environment.NewLine + "6. " + SK.Text("WorldSelect_Dom_body8", "Unique Platinum Card Pack with rare cards for players in the winning House, as well as Ultimate, Super and Random Card Packs.") + Environment.NewLine + "7. " + SK.Text("WorldSelect_Dom_body9", "Other prizes for players who reach the top of each Leaderboard.") + Environment.NewLine + "8. " + SK.Text("WorldSelect_Dom_body10", "New Anglo-Saxon era map borders.") + Environment.NewLine + Environment.NewLine + SK.Text("WorldSelect_Dom_body11", "For more information on Domination World please check your mail."); this.wallOfText.Position = new Point(0, 0x20); this.wallOfText.Size = new Size(this.backgroundArea.Width, 0x11d); if ((Program.mySettings.LanguageIdent == "de") || (Program.mySettings.LanguageIdent == "ru")) { this.wallOfText.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); } else { this.wallOfText.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); } this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.wallOfText.Color = ARGBColors.Black; this.wallOfText.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); CustomSelfDrawPanel.WikiLinkControl.init(this.backgroundArea, 0x2f, new Point(0x201, -6)); } else if (this.m_secondAgeMessage == 0x3e8) { this.headerLabel.Text = SK.Text("PT_TUT_header1", "Congratulations!"); this.headerLabel.Position = new Point(0, 0x19); this.headerLabel.Size = new Size(this.backgroundArea.Width, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.DropShadowColor = ARGBColors.Black; this.headerLabel.Color = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); this.wallOfText.Text = SK.Text("DOMINATION_END_MESSAGE", "Goodness my lord! The end of days is now upon us! My how you've grown from that stumbling bumpkin I tutored long ago! It seems that the final reckoning has come and that this world is at its end! Will your name also be recorded amongst the storied warriors in the Hall of Legends to be remembered for all eternity? This world has been a true test of your mettle and you are to be congratulated for having achieved so much here!"); this.wallOfText.Position = new Point(0x70, 250); this.wallOfText.Size = new Size(this.backgroundArea.Width - 0xe0, 300); this.wallOfText.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.wallOfText.DropShadowColor = ARGBColors.Black; this.wallOfText.Color = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); this.btnLogout.Text.Text = SK.Text("LogoutPanel_Swap_Worlds", "Swap Worlds"); this.btnHallOfLegends.ImageNorm = (Image)GFXLibrary.HOLlink; this.btnHallOfLegends.OverBrighten = true; this.btnHallOfLegends.MoveOnClick = true; this.btnHallOfLegends.Position = new Point((base.Width / 2) - (this.btnHallOfLegends.ImageNorm.Width / 2), 0x1e3); this.btnHallOfLegends.Text.Text = SK.Text("HALL_OF_LEGENDS", "Hall of Legends"); this.btnHallOfLegends.TextYOffset = -2; this.btnHallOfLegends.Text.Color = ARGBColors.White; this.btnHallOfLegends.Text.DropShadowColor = ARGBColors.Black; this.btnHallOfLegends.Text.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); this.btnHallOfLegends.Text.Position = new Point(-3, 0); this.btnHallOfLegends.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.hallOfLegendsClick)); this.btnHallOfLegends.Enabled = true; this.backgroundArea.addControl(this.btnHallOfLegends); } } else { if (cardsMode == 0) { this.headerLabel.Text = SK.Text("CARD_OFFERS_Super_Random_Pack", "Super Random Pack"); } else { this.headerLabel.Text = SK.Text("CARD_OFFERS_Ultimate_Random_Pack", "Ultimate Random Pack"); } this.headerLabel.Position = new Point(-50, 12); this.headerLabel.Size = new Size(this.backgroundArea.Width + 100, 150); this.headerLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Regular); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.headerLabel.Color = ARGBColors.Black; this.headerLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.headerLabel); if (cardsMode == 0) { this.lostMessageLabel.Text = SK.Text("Cards_Super_Explanation", "Super random packs generally contain less silver ranked cards and give you a much greater chance of rare diamond and double diamond cards."); } else { this.lostMessageLabel.Text = SK.Text("Cards_Ultimate_Explanation", "Ultimate random packs generally contain far less silver ranked cards and give you a much greater chance of super rare triple diamond and Sapphire cards."); } this.lostMessageLabel.Position = new Point(0, 0x2f); this.lostMessageLabel.Size = new Size(this.backgroundArea.Width, 240); this.lostMessageLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lostMessageLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lostMessageLabel.Color = ARGBColors.Black; this.lostMessageLabel.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.lostMessageLabel); this.wallOfText.Text = SK.Text("Cards_NewPacks", "While one can expect better cards across all ranks, some of the cards in this pack may be suitable only for higher ranked players."); this.wallOfText.Position = new Point(0x19, 250); this.wallOfText.Size = new Size(this.backgroundArea.Width - 50, 60); this.wallOfText.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.wallOfText.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.BOTTOM_CENTER; this.wallOfText.Color = ARGBColors.Black; this.wallOfText.DropShadowColor = ARGBColors.LightGray; this.backgroundArea.addControl(this.wallOfText); CustomSelfDrawPanel.CSDImage control = new CustomSelfDrawPanel.CSDImage(); if (cardsMode == 0) { control.Image = (Image)GFXLibrary.SuperFan; } else { control.Image = (Image)GFXLibrary.UltimateFan; } control.Position = new Point(120, 0x69); this.backgroundArea.addControl(control); } }
public void init(bool resized) { int height = base.Height; instance = this; base.clearControls(); this.sidebar.addSideBar(5, this); this.mainBackgroundImage.FillColor = Color.FromArgb(0x86, 0x99, 0xa5); this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = new Size(base.Width - 200, height); base.addControl(this.mainBackgroundImage); this.backgroundFade.Image = (Image)GFXLibrary.background_top; this.backgroundFade.Position = new Point(0, 0); this.backgroundFade.Size = new Size(base.Width - 200, this.backgroundFade.Image.Height); this.mainBackgroundImage.addControl(this.backgroundFade); this.bar1.Image = (Image)GFXLibrary.lineitem_strip_01_dark; this.bar1.Position = new Point(30, 20); this.mainBackgroundImage.addControl(this.bar1); this.bar2.Image = (Image)GFXLibrary.lineitem_strip_01_light; this.bar2.Position = new Point(30, 80); this.mainBackgroundImage.addControl(this.bar2); this.bar3.Image = (Image)GFXLibrary.lineitem_strip_01_dark; this.bar3.Position = new Point(30, 140); this.mainBackgroundImage.addControl(this.bar3); this.nameLabel.Text = SK.Text("CreateFactionPopup_Faction_Name", "Faction Name"); this.nameLabel.Color = ARGBColors.Black; this.nameLabel.Position = new Point(20, 0); this.nameLabel.Size = new Size(600, this.bar1.Height); this.nameLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.nameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.bar1.addControl(this.nameLabel); this.nameLabelInfo.Text = SK.Text("CreateFactionPopup_Faction_Name_Length", "(between 4 - 49 characters)"); this.nameLabelInfo.Color = Color.FromArgb(0x40, 0x40, 0x40); this.nameLabelInfo.Position = new Point(0xe1, 0x1a); this.nameLabelInfo.Size = new Size(600, 40); this.nameLabelInfo.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.nameLabelInfo.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.bar1.addControl(this.nameLabelInfo); this.abbrvLabel.Text = SK.Text("CreateFactionPopup_Faction_Short_Name", "Faction Short Name"); this.abbrvLabel.Color = ARGBColors.Black; this.abbrvLabel.Position = new Point(20, 0); this.abbrvLabel.Size = new Size(600, this.bar1.Height); this.abbrvLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.abbrvLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.bar2.addControl(this.abbrvLabel); this.abbrvLabelInfo.Text = SK.Text("CreateFactionPopup_Faction_Short_Name_Length", "(between 4 - 10 characters)"); this.abbrvLabelInfo.Color = Color.FromArgb(0x40, 0x40, 0x40); this.abbrvLabelInfo.Position = new Point(0xe1, 0x1a); this.abbrvLabelInfo.Size = new Size(600, 40); this.abbrvLabelInfo.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.abbrvLabelInfo.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.bar2.addControl(this.abbrvLabelInfo); this.mottoLabel.Text = SK.Text("CreateFactionPopup_Faction_Motto", "Faction Motto"); this.mottoLabel.Color = ARGBColors.Black; this.mottoLabel.Position = new Point(20, 0); this.mottoLabel.Size = new Size(600, this.bar3.Height); this.mottoLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.mottoLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.bar3.addControl(this.mottoLabel); this.mottoLabelInfo.Text = SK.Text("CreateFactionPopup_Faction_Motto_Length", "(between 4 - 49 characters)"); this.mottoLabelInfo.Color = Color.FromArgb(0x40, 0x40, 0x40); this.mottoLabelInfo.Position = new Point(0xe1, 0x1a); this.mottoLabelInfo.Size = new Size(600, 40); this.mottoLabelInfo.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.mottoLabelInfo.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.bar3.addControl(this.mottoLabelInfo); if (StartFaction) { InterfaceMgr.Instance.setVillageHeading(SK.Text("FactionInvites_Start_Faction", "Start New Faction")); } else { InterfaceMgr.Instance.setVillageHeading(SK.Text("FactionInvites_Edit_Faction", "Edit Faction Details")); } this.createButton.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.createButton.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.createButton.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.createButton.Position = new Point(0x123, 520); if (StartFaction) { this.createButton.Text.Text = SK.Text("CreateFactionPopup_Create", "Create"); } else { this.createButton.Text.Text = SK.Text("FactionInvites_Apply_Changes", "Apply Changes"); } this.createButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.createButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.createButton.TextYOffset = -3; this.createButton.Text.Color = ARGBColors.Black; if (!resized) { this.createButton.Enabled = false; this.createButton.Visible = true; } this.createButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.createClick), "FactionStartFactionPanel_create"); this.mainBackgroundImage.addControl(this.createButton); this.selectedFlag.Position = new Point(0x114, 230); this.mainBackgroundImage.addControl(this.selectedFlag); this.flagMinus1.Position = new Point(0xa6, 260); this.flagMinus1.Scale = 0.5; this.flagMinus1.ClickArea = new Rectangle(0, 0, GFXLibrary.factionFlags[0].Width / 2, GFXLibrary.factionFlags[0].Height / 2); this.flagMinus1.Visible = false; this.flagMinus1.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.flagDec), "FactionStartFactionPanel_change"); this.mainBackgroundImage.addControl(this.flagMinus1); this.flagMinus2.Position = new Point(0x2e, 260); this.flagMinus2.Scale = 0.5; this.flagMinus2.ClickArea = new Rectangle(0, 0, GFXLibrary.factionFlags[0].Width / 2, GFXLibrary.factionFlags[0].Height / 2); this.flagMinus2.Visible = false; this.flagMinus2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.flagDec2), "FactionStartFactionPanel_change"); this.mainBackgroundImage.addControl(this.flagMinus2); this.flagPlus1.Position = new Point(0x1fa, 260); this.flagPlus1.Scale = 0.5; this.flagPlus1.ClickArea = new Rectangle(0, 0, GFXLibrary.factionFlags[0].Width / 2, GFXLibrary.factionFlags[0].Height / 2); this.flagPlus1.Visible = false; this.flagPlus1.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.flagInc), "FactionStartFactionPanel_change"); this.mainBackgroundImage.addControl(this.flagPlus1); this.flagPlus2.Position = new Point(0x272, 260); this.flagPlus2.Scale = 0.5; this.flagPlus2.ClickArea = new Rectangle(0, 0, GFXLibrary.factionFlags[0].Width / 2, GFXLibrary.factionFlags[0].Height / 2); this.flagPlus2.Visible = false; this.flagPlus2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.flagInc2), "FactionStartFactionPanel_change"); this.mainBackgroundImage.addControl(this.flagPlus2); this.flagPlusButton.ImageNorm = (Image)GFXLibrary.arrow_button_right_normal; this.flagPlusButton.ImageOver = (Image)GFXLibrary.arrow_button_right_over; this.flagPlusButton.ImageClick = (Image)GFXLibrary.arrow_button_right_pushed; this.flagPlusButton.Position = new Point(0x2ea, 0x10d); this.flagPlusButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.flagInc), "FactionStartFactionPanel_change"); this.mainBackgroundImage.addControl(this.flagPlusButton); this.flagMinusButton.ImageNorm = (Image)GFXLibrary.arrow_button_left_normal; this.flagMinusButton.ImageOver = (Image)GFXLibrary.arrow_button_left_over; this.flagMinusButton.ImageClick = (Image)GFXLibrary.arrow_button_left_pushed; this.flagMinusButton.Position = new Point(2, 0x10d); this.flagMinusButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.flagDec), "FactionStartFactionPanel_change"); this.mainBackgroundImage.addControl(this.flagMinusButton); this.inset1.Image = (Image)GFXLibrary.faction_inset; this.inset1.Position = new Point(7, 0x176); this.mainBackgroundImage.addControl(this.inset1); this.inset2.Image = (Image)GFXLibrary.faction_inset; this.inset2.Position = new Point(0xcf, 0x176); this.mainBackgroundImage.addControl(this.inset2); this.inset3.Image = (Image)GFXLibrary.faction_inset; this.inset3.Position = new Point(0x197, 0x176); this.mainBackgroundImage.addControl(this.inset3); this.inset4.Image = (Image)GFXLibrary.faction_inset; this.inset4.Position = new Point(0x25f, 0x176); this.mainBackgroundImage.addControl(this.inset4); for (int i = 0; i < 0x20; i++) { this.colours1[i] = new CustomSelfDrawPanel.CSDFill(); this.colours1[i].Position = new Point(0x11 + ((i % 8) * 20), 400 + ((i / 8) * 20)); this.colours1[i].FillColor = FactionData.getColour(i); this.colours1[i].Size = new Size(20, 20); this.colours1[i].Data = i; this.colours1[i].setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.colours1clicked), "FactionStartFactionPanel_colours"); this.mainBackgroundImage.addControl(this.colours1[i]); } for (int j = 0; j < 0x20; j++) { this.colours2[j] = new CustomSelfDrawPanel.CSDFill(); this.colours2[j].Position = new Point(0xd9 + ((j % 8) * 20), 400 + ((j / 8) * 20)); this.colours2[j].FillColor = FactionData.getColour(j); this.colours2[j].Size = new Size(20, 20); this.colours2[j].Data = j; this.colours2[j].setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.colours2clicked), "FactionStartFactionPanel_colours"); this.mainBackgroundImage.addControl(this.colours2[j]); } for (int k = 0; k < 0x20; k++) { this.colours3[k] = new CustomSelfDrawPanel.CSDFill(); this.colours3[k].Position = new Point(0x1a1 + ((k % 8) * 20), 400 + ((k / 8) * 20)); this.colours3[k].FillColor = FactionData.getColour(k); this.colours3[k].Size = new Size(20, 20); this.colours3[k].Data = k; this.colours3[k].setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.colours3clicked), "FactionStartFactionPanel_colours"); this.mainBackgroundImage.addControl(this.colours3[k]); } for (int m = 0; m < 0x20; m++) { this.colours4[m] = new CustomSelfDrawPanel.CSDFill(); this.colours4[m].Position = new Point(0x269 + ((m % 8) * 20), 400 + ((m / 8) * 20)); this.colours4[m].FillColor = FactionData.getColour(m); this.colours4[m].Size = new Size(20, 20); this.colours4[m].Data = m; this.colours4[m].setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.colours4clicked), "FactionStartFactionPanel_colours"); this.mainBackgroundImage.addControl(this.colours4[m]); } this.selectedColour1.LineColor = ARGBColors.Black; this.selectedColour1.Size = new Size(20, 20); this.mainBackgroundImage.addControl(this.selectedColour1); this.selectedColour2.LineColor = ARGBColors.Black; this.selectedColour2.Size = new Size(20, 20); this.mainBackgroundImage.addControl(this.selectedColour2); this.selectedColour3.LineColor = ARGBColors.Black; this.selectedColour3.Size = new Size(20, 20); this.mainBackgroundImage.addControl(this.selectedColour3); this.selectedColour4.LineColor = ARGBColors.Black; this.selectedColour4.Size = new Size(20, 20); this.mainBackgroundImage.addControl(this.selectedColour4); this.colour1Label.Text = SK.Text("FactionFlags_colour1", "Colour 1"); this.colour1Label.Color = ARGBColors.Black; this.colour1Label.Position = new Point(0x11, 0x177); this.colour1Label.Size = new Size(160, 0x19); this.colour1Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.colour1Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.mainBackgroundImage.addControl(this.colour1Label); this.colour2Label.Text = SK.Text("FactionFlags_colour2", "Colour 2"); this.colour2Label.Color = ARGBColors.Black; this.colour2Label.Position = new Point(0xd9, 0x177); this.colour2Label.Size = new Size(160, 0x19); this.colour2Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.colour2Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.mainBackgroundImage.addControl(this.colour2Label); this.colour3Label.Text = SK.Text("FactionFlags_colour3", "Colour 3"); this.colour3Label.Color = ARGBColors.Black; this.colour3Label.Position = new Point(0x1a1, 0x177); this.colour3Label.Size = new Size(160, 0x19); this.colour3Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.colour3Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.mainBackgroundImage.addControl(this.colour3Label); this.colour4Label.Text = SK.Text("FactionFlags_colour4", "Colour 4"); this.colour4Label.Color = ARGBColors.Black; this.colour4Label.Position = new Point(0x269, 0x177); this.colour4Label.Size = new Size(160, 0x19); this.colour4Label.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.colour4Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.mainBackgroundImage.addControl(this.colour4Label); if (!resized) { if (StartFaction) { this.tbFactionName.Text = ""; this.tbFactionShortName.Text = ""; this.tbMotto.Text = ""; this.factionFlagData = FactionData.createFlagData(1, 9, 15, 4, 0x1c); } else { this.tbFactionName.Text = GameEngine.Instance.World.YourFaction.factionName; this.tbFactionShortName.Text = GameEngine.Instance.World.YourFaction.factionNameAbrv; this.tbMotto.Text = GameEngine.Instance.World.YourFaction.factionMotto; this.factionFlagData = GameEngine.Instance.World.YourFaction.flagData; if (this.factionFlagData <= 0) { this.factionFlagData = FactionData.createFlagData(1, 9, 15, 4, 0x1c); } } } this.updateFlags(null, 0); if (GameEngine.Instance.World.getRank() < (GameEngine.Instance.LocalWorldData.Faction_CreateAtLevel - 1)) { if (GameEngine.Instance.LocalWorldData.Faction_CreateAtLevel == 12) { this.rankNeededLabel.Text = SK.Text("FactionsPanel_Rank_Needed_12", "You don't currently have the required Rank (12) to create a Faction."); } else { this.rankNeededLabel.Text = SK.Text("FactionsPanel_Rank_Needed", "You don't currently have the required Rank (14) to create a Faction."); } this.rankNeededLabel.Color = ARGBColors.Black; this.rankNeededLabel.Position = new Point(0, 190); this.rankNeededLabel.Size = new Size(this.mainBackgroundImage.Size.Width, 40); this.rankNeededLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.rankNeededLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.mainBackgroundImage.addControl(this.rankNeededLabel); this.createButton.Visible = false; this.tbFactionName.Enabled = false; this.tbFactionShortName.Enabled = false; this.tbMotto.Enabled = false; this.flagPlusButton.Enabled = false; this.flagMinusButton.Enabled = false; this.clicksActive = false; for (int n = 0; n < 0x20; n++) { this.colours1[n].FillColor = Color.FromArgb(0x80, this.colours1[n].FillColor); this.colours2[n].FillColor = Color.FromArgb(0x80, this.colours2[n].FillColor); this.colours3[n].FillColor = Color.FromArgb(0x80, this.colours3[n].FillColor); this.colours4[n].FillColor = Color.FromArgb(0x80, this.colours4[n].FillColor); } this.inset1.Alpha = 0.3f; this.inset2.Alpha = 0.3f; this.inset3.Alpha = 0.3f; this.inset4.Alpha = 0.3f; this.flagMinus1.Alpha = 0.3f; this.flagMinus2.Alpha = 0.3f; this.flagPlus1.Alpha = 0.3f; this.flagPlus2.Alpha = 0.3f; int flag = 0; int num8 = 0; int num9 = 0; int num10 = 0; int num11 = 0; FactionData.getFlagData(this.factionFlagData, ref flag, ref num8, ref num9, ref num10, ref num11); ColorMap[] mapArray = FactionData.getColourMap(num8, num9, num10, num11, 100); this.selectedFlag.ColourMap = mapArray; this.flagMinus2.ColourMap = mapArray; this.flagMinus1.ColourMap = mapArray; this.flagPlus1.ColourMap = mapArray; this.flagPlus2.ColourMap = mapArray; } else { this.createButton.Visible = true; this.tbFactionName.Enabled = true; this.tbFactionShortName.Enabled = true; this.tbMotto.Enabled = true; this.flagPlusButton.Enabled = true; this.flagMinusButton.Enabled = true; this.clicksActive = true; this.inset1.Alpha = 1f; this.inset2.Alpha = 1f; this.inset3.Alpha = 1f; this.inset4.Alpha = 1f; this.flagMinus1.Alpha = 1f; this.flagMinus2.Alpha = 1f; this.flagPlus1.Alpha = 1f; this.flagPlus2.Alpha = 1f; } if (!resized) { CustomSelfDrawPanel.FactionPanelSideBar.downloadCurrentFactionInfo(); } }
public void init(string header, bool captains, bool catapults) { this.useCaptains = captains; this.useCatapults = catapults; this.lblHeader.Text = header; this.lblHeader.Color = ARGBColors.Black; this.lblHeader.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblHeader.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblHeader.Position = new Point(0, 0); this.lblHeader.Size = new Size(base.Width, 0x1a); this.lblPeasants.Text = SK.Text("GENERIC_Peasants", "Peasants"); this.lblPeasants.Color = ARGBColors.Black; this.lblPeasants.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblPeasants.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblPeasants.Position = new Point(0, this.lblHeader.Rectangle.Bottom + 2); this.lblPeasants.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblPeasantsCount.Color = ARGBColors.Black; this.lblPeasantsCount.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblPeasantsCount.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblPeasantsCount.Position = new Point((base.Width / 2) + 2, this.lblPeasants.Y); this.lblPeasantsCount.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblPeasantsCount.Text = "?"; this.lblArchers.Text = SK.Text("GENERIC_Archers", "Archers"); this.lblArchers.Color = ARGBColors.Black; this.lblArchers.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblArchers.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblArchers.Position = new Point(0, this.lblPeasants.Rectangle.Bottom); this.lblArchers.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblArchersCount.Color = ARGBColors.Black; this.lblArchersCount.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblArchersCount.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblArchersCount.Position = new Point((base.Width / 2) + 2, this.lblArchers.Y); this.lblArchersCount.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblArchersCount.Text = "?"; this.lblPikemen.Text = SK.Text("GENERIC_Pikemen", "Pikemen"); this.lblPikemen.Color = ARGBColors.Black; this.lblPikemen.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblPikemen.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblPikemen.Position = new Point(0, this.lblArchers.Rectangle.Bottom); this.lblPikemen.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblPikemenCount.Color = ARGBColors.Black; this.lblPikemenCount.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblPikemenCount.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblPikemenCount.Position = new Point((base.Width / 2) + 2, this.lblPikemen.Y); this.lblPikemenCount.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblPikemenCount.Text = "?"; this.lblSwordsmen.Text = SK.Text("GENERIC_Swordsmen", "Swordsmen"); this.lblSwordsmen.Color = ARGBColors.Black; this.lblSwordsmen.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblSwordsmen.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblSwordsmen.Position = new Point(0, this.lblPikemen.Rectangle.Bottom); this.lblSwordsmen.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblSwordsmenCount.Color = ARGBColors.Black; this.lblSwordsmenCount.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblSwordsmenCount.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblSwordsmenCount.Position = new Point((base.Width / 2) + 2, this.lblSwordsmen.Y); this.lblSwordsmenCount.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblSwordsmenCount.Text = "?"; this.lblCatapults.Text = SK.Text("GENERIC_Catapults", "Catapults"); this.lblCatapults.Color = ARGBColors.Black; this.lblCatapults.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblCatapults.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblCatapults.Position = new Point(0, this.lblSwordsmen.Rectangle.Bottom); this.lblCatapults.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblCatapultsCount.Color = ARGBColors.Black; this.lblCatapultsCount.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblCatapultsCount.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblCatapultsCount.Position = new Point((base.Width / 2) + 2, this.lblCatapults.Y); this.lblCatapultsCount.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblCatapultsCount.Text = "?"; this.lblCaptains.Text = SK.Text("GENERIC_Captains", "Captains"); this.lblCaptains.Color = ARGBColors.Black; this.lblCaptains.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblCaptains.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblCaptains.Position = new Point(0, this.lblCatapults.Rectangle.Bottom); this.lblCaptains.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblCaptainsCount.Color = ARGBColors.Black; this.lblCaptainsCount.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblCaptainsCount.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblCaptainsCount.Position = new Point((base.Width / 2) + 2, this.lblCaptains.Y); this.lblCaptainsCount.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblCaptainsCount.Text = "?"; this.lblChests.Text = SK.Text("Reports_Remaining_Chests", "Remaining Chests"); this.lblChests.Color = ARGBColors.Black; this.lblChests.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblChests.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.lblChests.Position = new Point(-50, this.lblCaptains.Rectangle.Bottom); this.lblChests.Size = new Size(((base.Width / 2) - 2) + 50, 0x1a); this.lblChestsCount.Color = ARGBColors.Black; this.lblChestsCount.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblChestsCount.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lblChestsCount.Position = new Point((base.Width / 2) + 2, this.lblChests.Y); this.lblChestsCount.Size = new Size((base.Width / 2) - 2, 0x1a); this.lblChestsCount.Text = "?"; if (!this.useCatapults) { this.lblCatapults.Visible = false; this.lblCatapultsCount.Visible = false; this.lblCaptains.Y -= 0x1c; this.lblCaptainsCount.Y -= 0x1c; this.lblChests.Y -= 0x1c; this.lblChestsCount.Y -= 0x1c; } if (!this.useCaptains) { this.lblCaptains.Visible = false; this.lblCaptainsCount.Visible = false; } base.addControl(this.lblHeader); base.addControl(this.lblPeasants); base.addControl(this.lblPeasantsCount); base.addControl(this.lblArchers); base.addControl(this.lblArchersCount); base.addControl(this.lblPikemen); base.addControl(this.lblPikemenCount); base.addControl(this.lblSwordsmen); base.addControl(this.lblSwordsmenCount); base.addControl(this.lblCatapults); base.addControl(this.lblCatapultsCount); base.addControl(this.lblCaptains); base.addControl(this.lblCaptainsCount); }