public void closeAttackTargetsPopup() { if (!this.AttackTargetsPopupClosing) { this.AttackTargetsPopupClosing = true; if (this.isPopupWindowOpenAndClose(this.m_AttackTargetsPopup)) { GameEngine.Instance.EnableMouseClicks(); } this.m_AttackTargetsPopup = null; this.AttackTargetsPopupClosing = false; } }
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 AttackTargetsPopup openAttackTargetsPopup() { this.closePopupWindow(this.m_AttackTargetsPopup); this.m_AttackTargetsPopup = new AttackTargetsPopup(); this.positionWindow(this.m_AttackTargetsPopup, false, false); this.m_AttackTargetsPopup.Show(this.ParentMainWindow); GameEngine.Instance.DisableMouseClicks(); return this.m_AttackTargetsPopup; }
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(); }