public void init() { base.clearControls(); CustomSelfDrawPanel.CSDImage image = this.backGround.init(true, 0x3eb); this.backGround.updateHeading(SK.Text("SelectArmyPanel_Reinforcements", "Reinforcements")); this.backGround.centerSubHeading(); base.addControl(this.backGround); this.backGround.initTravelButton(this.homeVillageButton); this.homeVillageButton.Position = new Point(11, 0x3d); this.homeVillageButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.homeClick), "SelectReinforcementPanel2_home_village"); image.addControl(this.homeVillageButton); this.backGround.initTravelButton(this.targetVillageButton); this.targetVillageButton.Position = new Point(11, 0x77); this.targetVillageButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.targetClick), "SelectReinforcementPanel2_target_village"); image.addControl(this.targetVillageButton); this.travelDirection.Image = (Image)GFXLibrary.mrhp_travelling_arrows[0]; this.travelDirection.Alpha = 0.5f; this.travelDirection.Position = new Point(0x58, 90); image.addControl(this.travelDirection); this.returnButton.ImageNorm = (Image)GFXLibrary.mrhp_button_150x25[0]; this.returnButton.ImageOver = (Image)GFXLibrary.mrhp_button_150x25[1]; this.returnButton.ImageClick = (Image)GFXLibrary.mrhp_button_150x25[2]; this.returnButton.Position = new Point(0x1a, 0x9b); this.returnButton.Text.Text = ""; this.returnButton.TextYOffset = -3; this.returnButton.Text.Color = ARGBColors.Black; this.returnButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.returnButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.returnClick), "SelectReinforcementPanel2_return"); this.returnButton.Visible = false; image.addControl(this.returnButton); }
public void init() { base.clearControls(); this.backImage = this.backGround.init(false, 0x5dd); 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, 0x31); this.tradeButton.Enabled = false; this.tradeButton.CustomTooltipID = 0x96a; this.tradeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.btnTradeWith_Click), "CountyCapitalVillagePanel2_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, 0x31); this.attackButton.Enabled = false; this.attackButton.CustomTooltipID = 0x96b; this.attackButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.btnAttack_Click), "CountyCapitalVillagePanel2_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, 0x31); this.scoutButton.Enabled = false; this.scoutButton.CustomTooltipID = 0x96c; this.scoutButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.btnScout_Click), "CountyCapitalVillagePanel2_scout"); 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, 0x31); this.reinforceButton.Enabled = false; this.reinforceButton.CustomTooltipID = 0x96d; this.reinforceButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.btnSendTroops_Click), "CountyCapitalVillagePanel2_reinforce"); 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, 0x31); this.monkButton.Enabled = false; this.monkButton.CustomTooltipID = 0x96e; this.monkButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.btnSendMonks_Click), "CountyCapitalVillagePanel2_sendmonks"); this.backImage.addControl(this.monkButton); 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); }
public LogoutOptionsWindow2() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); base.TransparencyKey = Color.FromArgb(0xff, 0xff, 0, 0xff); this.BackColor = base.TransparencyKey; }
public void init(int villageID) { this.wasTall = this.isTallTreasureChestPanel(villageID); int num = 0; if (this.wasTall) { num = 60; } base.clearControls(); CustomSelfDrawPanel.CSDImage image = this.backGround.init(this.wasTall, 0x2710); base.addControl(this.backGround); 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, 0x31 + num); this.attackButton.Enabled = false; this.attackButton.CustomTooltipID = 0x96b; this.attackButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.btnAttack_Click), "VassalAttackVillagePanel2_attack"); image.addControl(this.attackButton); this.treasureCastleTimeoutLabel.Text = ""; this.treasureCastleTimeoutLabel.Color = ARGBColors.Black; this.treasureCastleTimeoutLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); this.treasureCastleTimeoutLabel.Position = new Point(10, 50); this.treasureCastleTimeoutLabel.Size = new Size(image.Width - 20, 80); this.treasureCastleTimeoutLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.treasureCastleTimeoutLabel.Visible = false; image.addControl(this.treasureCastleTimeoutLabel); }
public MyFormBase() { this.InitializeComponent(); try { this.panel1.BackgroundImage = (Image)GFXLibrary.messageboxclose; this.panel3.BackgroundImage = (Image)GFXLibrary.message_box_maximize_normal; this.panel4.BackgroundImage = (Image)GFXLibrary.message_box_minimize_normal; this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.lblTitle.Font = FontManager.GetFont("Microsoft Sans Serif", 9.75f, FontStyle.Bold); Form parentForm = InterfaceMgr.Instance.ParentForm; if ((parentForm != null) && (parentForm.WindowState != FormWindowState.Minimized)) { Point location = parentForm.Location; Size size = parentForm.Size; Size size2 = base.Size; Point point2 = new Point(((size.Width - size2.Width) / 2) + location.X, ((size.Height - size2.Height) / 2) + location.Y); base.Location = point2; } else { base.StartPosition = FormStartPosition.CenterScreen; } } catch (Exception) { UniversalDebugLog.Log("An exception occurred in myformbase constructor"); } }
private CustomSelfDrawPanel.CSDImage addRow(int index, int buildingType, int amount, int resource) { int num = GFXLibrary.parishwall_tan_bar_01_short.Height + 3; CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.parishwall_tan_bar_01_short, Position = new Point(10, 10 + (num * index)) }; CustomSelfDrawPanel.CSDLabel control = new CustomSelfDrawPanel.CSDLabel { Text = VillageBuildingsData.getBuildingName(buildingType), Color = ARGBColors.Black, Position = new Point(10, 0), Size = new Size(image.Width - 20, image.Height), Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; image.addControl(control); CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel { Text = amount.ToString(), Color = ARGBColors.Black, Position = new Point(10, 0), Size = new Size(image.Width - 60, image.Height), Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT }; image.addControl(label2); CustomSelfDrawPanel.CSDImage image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.getCommodity32Image(resource), Position = new Point(image.Width - 0x2d, 2) }; image.addControl(image2); return(image); }
public AboutPopup() { this.InitializeComponent(); this.label1.Font = FontManager.GetFont("Microsoft Sans Serif", 14f, FontStyle.Regular); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); base.ShowClose = true; }
public CapitalHelpBox() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.lblBuildingType.Font = FontManager.GetFont("Microsoft Sans Serif", 9f, FontStyle.Bold); this.Text = base.Title = SK.Text("MENU_Help", "Help"); }
public void init(ProfileLoginWindow parentForm) { this.m_parentForm = parentForm; base.clearControls(); this.BackColor = ARGBColors.White; this.headingLabel.Text = SK.Text("BIGPOINT_PleaseLogin", "Please Log into Bigpoint in your Browser"); this.headingLabel.Position = new Point(0, 10); this.headingLabel.Size = new Size(600, 30); this.headingLabel.Color = ARGBColors.Black; this.headingLabel.Font = FontManager.GetFont("Arial", 11f, FontStyle.Bold); this.headingLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; base.addControl(this.headingLabel); this.bodyLabel.Text = SK.Text("BIGPOINT_ClickHere", "Click here once you have completed your Login"); this.bodyLabel.Position = new Point(0, 80); this.bodyLabel.Size = new Size(600, 30); this.bodyLabel.Color = ARGBColors.Black; this.bodyLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.bodyLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.bodyLabel.Visible = false; base.addControl(this.bodyLabel); this.closeButton.ImageNorm = this.CloseImage; this.closeButton.ImageOver = this.CloseImageOver; this.closeButton.Position = new Point(370, 160); this.closeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "WorldSelectPopupPanel_close"); base.addControl(this.closeButton); this.completeButton.ImageNorm = this.CompleteImage; this.completeButton.ImageOver = this.CompleteImageOver; this.completeButton.Position = new Point(100, 100); this.completeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.completeClick), "WorldSelectPopupPanel_close"); this.completeButton.Visible = false; base.addControl(this.completeButton); this.startedTime = DateTime.Now; this.firstAttemptTried = false; }
public void init(int villageID, NewQuestRewardPanel parent, int position, bool selected) { this.m_villageID = villageID; this.m_parent = parent; this.clearControls(); if (selected) { this.backgroundImage.Image = (Image)GFXLibrary.quest_popup_inset_highlight; this.backgroundImage.Position = new Point(0, 5); this.backgroundImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); base.addControl(this.backgroundImage); } base.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); this.Size = new Size(390, 0x22); int index = GameEngine.Instance.World.getVillageSize(villageID); this.villageIcon.Image = (Image)GFXLibrary.char_village_icons[index]; this.villageIcon.Position = new Point(0, -8); this.villageIcon.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); base.addControl(this.villageIcon); this.villageName.Text = GameEngine.Instance.World.getVillageName(villageID); this.villageName.Color = ARGBColors.Black; this.villageName.Position = new Point(50, 0); this.villageName.Size = new Size(330, base.Height); this.villageName.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.villageName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.villageName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); base.addControl(this.villageName); }
public WheelSelectPopup() { this.InitializeComponent(); base.TransparencyKey = Color.FromArgb(0xff, 0xff, 0, 0xff); this.BackColor = base.TransparencyKey; this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public MailAbuseSubmissionForm() { this.dockableControl = new DockableControl(this); this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f, FontStyle.Regular); this.lblTextTitle.Font = FontManager.GetFont("Microsoft Sans Serif", 9f, FontStyle.Bold); this.lblTitle.Font = FontManager.GetFont("Microsoft Sans Serif", 12f, FontStyle.Bold); this.lblAdvice.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f, FontStyle.Regular); this.btnClose.Text = SK.Text("GENERIC_Close", "Close"); this.btnReport.Text = SK.Text("REPORT_ABUSE_Title", "Report Mail"); this.lblTitle.Text = SK.Text("REPORT_ABUSE_Title", "Report Mail"); this.lblAdvice.Text = SK.Text("REPORT_ABUSE_Advice", "If you believe that the contents of this mail need to be investigated by the game administration, you may report it using this form. Please select a reason for doing so from the choices listed below, and provide a summary as to why you feel investigation is required. Please note that being attacked through game mechanics is not a valid reason for reporting, and use of this system for inappropriate reasons will not be tolerated."); this.lblReason.Text = SK.Text("REPORT_ABUSE_SelectReason", "Reason for reporting:"); this.lblTextTitle.Text = SK.Text("REPORT_ABUSE_SummaryTitle", "Summary of the issue (minimum 50 characters):"); this.lblBlockReminder.Text = SK.Text("REPORT_ABUSE_BlockReminder", "Please note that, on sending the report, the user in question will automatically be added to your 'Blocked Users' list"); this.cbReason.Items.Add(SK.Text("REPORT_ABUSE_PleaseSelect", "Please select")); this.cbReason.Items.Add(SK.Text("REPORT_ABUSE_Inappropriate", "Inappropriate Conduct")); this.cbReason.Items.Add(SK.Text("REPORT_ABUSE_Personal", "Threats outside the game")); this.cbReason.Items.Add(SK.Text("REPORT_ABUSE_Spam", "Advertisements or Links")); this.cbReason.Items.Add(SK.Text("REPORT_ABUSE_Scam", "Scam or Phishing Attempt")); this.cbReason.Items.Add(SK.Text("REPORT_ABUSE_Proclamation", "Offensive Proclamation")); this.cbReason.SelectedIndex = 0; this.btnReport.Enabled = false; this.cbReason.DropDownStyle = ComboBoxStyle.DropDownList; }
public MainWindow() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.mainRightHandPanel1.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.topLeftMenu1.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); }
public void init() { base.clearControls(); CustomSelfDrawPanel.CSDImage image = this.backGround.init(true, 0x3ec); this.backGround.updateHeading(SK.Text("SelectArmyPanel_Trader", "Trader")); this.backGround.centerSubHeading(); base.addControl(this.backGround); this.backGround.initTravelButton(this.homeVillageButton); this.homeVillageButton.Position = new Point(11, 0x3d); this.homeVillageButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.homeClick), "TraderInfoPanel2_home_village"); image.addControl(this.homeVillageButton); this.backGround.initTravelButton(this.targetVillageButton); this.targetVillageButton.Position = new Point(11, 0x77); this.targetVillageButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.targetClick), "TraderInfoPanel2_target_village"); image.addControl(this.targetVillageButton); this.travelDirection.Image = (Image)GFXLibrary.mrhp_travelling_arrows[0]; this.travelDirection.Position = new Point(0x58, 90); this.travelDirection.Alpha = 0.5f; image.addControl(this.travelDirection); this.resourceImage.Image = GFXLibrary.dummy; this.resourceImage.Position = new Point(0x2d, 0x90); this.resourceImage.Visible = false; image.addControl(this.resourceImage); this.resourceAmountLabel.Text = ""; this.resourceAmountLabel.Color = ARGBColors.Black; this.resourceAmountLabel.Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular); this.resourceAmountLabel.Position = new Point(90, 0x9e); this.resourceAmountLabel.Size = new Size(0xa8, 0x17); this.resourceAmountLabel.Visible = false; image.addControl(this.resourceAmountLabel); }
public void init(CapitalForumPanel.ForumThreadData threadData, int position, CapitalForumPanel parent) { this.m_parent = parent; this.m_position = position; this.m_ForumThreadData = threadData; 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); this.backgroundImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); base.addControl(this.backgroundImage); this.Size = new Size(900, this.backgroundImage.Size.Height); this.ClipVisible = true; FontStyle regular = FontStyle.Regular; if (!threadData.read) { regular = FontStyle.Bold; } this.threadTitleLabel.Text = threadData.title; this.threadTitleLabel.Color = ARGBColors.Black; this.threadTitleLabel.Position = new Point(8, 0); this.threadTitleLabel.Size = new Size(410, this.backgroundImage.Height); this.threadTitleLabel.Font = FontManager.GetFont("Arial", 9f, regular); this.threadTitleLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.threadTitleLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); this.backgroundImage.addControl(this.threadTitleLabel); this.userLabel.Text = threadData.userName; this.userLabel.Color = ARGBColors.Black; this.userLabel.Position = new Point(420, 0); this.userLabel.Size = new Size(0x86, this.backgroundImage.Height); this.userLabel.Font = FontManager.GetFont("Arial", 9f, regular); this.userLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.userLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); this.backgroundImage.addControl(this.userLabel); this.dateLabel.Text = threadData.lastTime.ToShortTimeString() + " " + threadData.lastTime.ToShortDateString(); this.dateLabel.Color = ARGBColors.Black; this.dateLabel.Position = new Point(0x22a, 0); this.dateLabel.Size = new Size(0xab, this.backgroundImage.Height); this.dateLabel.Font = FontManager.GetFont("Arial", 9f, regular); this.dateLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.dateLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked)); this.backgroundImage.addControl(this.dateLabel); base.invalidate(); if (RemoteServices.Instance.Admin || RemoteServices.Instance.Moderator) { this.deleteThread.ImageNorm = (Image)GFXLibrary.trashcan_normal; this.deleteThread.ImageOver = (Image)GFXLibrary.trashcan_over; this.deleteThread.ImageClick = (Image)GFXLibrary.trashcan_clicked; this.deleteThread.Position = new Point(870, 4); this.deleteThread.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.deleteClicked), "CapitalForumPanel_delete"); this.backgroundImage.addControl(this.deleteThread); } }
public LoginHistoryPopup() { this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.loginHistory = GameEngine.Instance.World.getLoginHistory(true); this.updateList(); }
public PlayCardsWindow() { this.currentPanel = this.cardPanelPlay; this.currentPanelID = 1; this.InitializeComponent(); this.tbSearchBox.Font = FontManager.GetFont("Arial", 9.75f, FontStyle.Regular); this.tbSearchBox.Parent.Controls.Remove(this.tbSearchBox); this.currentPanel.Controls.Add(this.tbSearchBox); this.processTextChanged = false; this.tbSearchBox.Text = ""; this.processTextChanged = true; this.tbSearchBox.Visible = false; this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); base.TransparencyKey = Color.FromArgb(0xff, 0xff, 0, 0xff); this.BackColor = base.TransparencyKey; if (!GameEngine.Instance.World.TutorialIsAdvancing()) { if (GameEngine.Instance.World.getTutorialStage() == 8) { GameEngine.Instance.World.checkQuestObjectiveComplete(7); } if (GameEngine.Instance.World.getTutorialStage() == 12) { GameEngine.Instance.World.checkQuestObjectiveComplete(11); } if (GameEngine.Instance.World.getTutorialStage() == 0x66) { GameEngine.Instance.World.checkQuestObjectiveComplete(13); } } }
public void init(FactionData factionData, int position, bool ally, FactionDiplomacyPanel parent) { this.m_parent = parent; this.m_position = position; this.m_factionData = factionData; 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); this.backgroundImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.factionClick)); 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.factionClick)); base.addControl(this.flagImage); this.factionName.Text = factionData.factionName; this.factionName.Color = ARGBColors.Black; this.factionName.Position = new Point(9, 0); this.factionName.Size = new Size(500, 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.factionClick)); this.backgroundImage.addControl(this.factionName); }
public void init(int quest, int position) { this.clearControls(); if ((position & 1) == 0) { this.backgroundImage.Image = (Image)GFXLibrary.quest_screen_bar1; } else { this.backgroundImage.Image = (Image)GFXLibrary.quest_screen_bar2; } this.backgroundImage.Position = new Point(60, 11); base.addControl(this.backgroundImage); NewQuests.NewQuestDefinition definition = NewQuests.getNewQuestDef(quest); this.Size = new Size(0x1bc, 60); this.questImage.Image = (Image)GFXLibrary.quest_icons[Math.Min(definition.questType, GFXLibrary.quest_icons.Length - 1)]; this.questImage.Position = new Point(0, 6); base.addControl(this.questImage); this.lblQuestName.Text = SK.NoStoreText("Z_QUESTS_" + definition.tagString); this.lblQuestName.Color = ARGBColors.Black; this.lblQuestName.Position = new Point(9, 0); this.lblQuestName.Size = new Size(400, this.backgroundImage.Height); this.lblQuestName.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.lblQuestName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.backgroundImage.addControl(this.lblQuestName); }
public MainRightHandPanel() { this.dockWindow = new DockWindow(this); this.InitializeComponent(); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); }
public void getProvinceElectionInfoCallback(GetProvinceElectionInfo_ReturnType returnData) { if (returnData.Success) { StoredProvinceInfo info = (StoredProvinceInfo)this.provinceList[returnData.provinceID]; if (info == null) { info = new StoredProvinceInfo(); this.provinceList[returnData.provinceID] = info; } info.m_lastUpdateTime = DateTime.Now; info.lastReturnData = returnData; if (this.currentProvince == returnData.provinceID) { this.votingAllowed = returnData.votingAllowed; if (this.provinceMembers == null) { this.provinceMembers = new List <ParishMember>(); } else { this.provinceMembers.Clear(); } if (returnData.provinceMembers == null) { this.votesAvailableLabel.Text = SK.Text("ProvincePanel_Need_More_Counties", "More Counties need to be active before an election is held"); this.votesAvailableLabel.Position = new Point(0x1f, 12); this.votesAvailableLabel.Size = new Size(400, 100); this.votesAvailableLabel.Font = FontManager.GetFont("Arial", 14f, FontStyle.Regular); this.votesAvailableLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.votesAvailableLabelValue.Visible = false; this.wallInfoImage.invalidate(); } else { this.provinceMembers.AddRange(returnData.provinceMembers); int numSpareVotes = 0; foreach (ParishMember member in this.provinceMembers) { if (member.userID == RemoteServices.Instance.UserID) { numSpareVotes = member.numSpareVotes; break; } } this.votesAvailableLabelValue.Text = numSpareVotes.ToString(); } this.m_userIDOnCurrent = -1; this.electedLeaderID = returnData.leaderID; this.electedLeaderName = returnData.leaderName; this.lastProclamationTime = returnData.lastProclamation; this.currentLeaderID = returnData.leaderID; this.currentLeaderName = returnData.leaderName; this.voteCapLabelValue.Text = returnData.voteCap.ToString(); this.voteCap = returnData.voteCap; this.addPlayers(); } } }
public BuyCrownsPopup() { this.InitializeComponent(); this.lblMessage.Font = FontManager.GetFont("Arial", 9.75f, FontStyle.Regular); base.Title = this.Text = SK.Text("BuyCardsPanel_Low_Crowns", "Crown stocks are too low m'lord"); this.btnBuyCrowns.Text = SK.Text("BuyCrownsPanel_Buy_Crowns", "Buy Crowns"); this.btnBuyCrowns.Font = FontManager.GetFont("Arial", 11f, FontStyle.Bold); }
public MailUserPopup() { this.InitializeComponent(); this.label4.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f, FontStyle.Bold); this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f); this.m_searchTimer = new System.Threading.Timer(new TimerCallback(this.timerCallbackFunction), null, 1, 500); RemoteServices.Instance.set_GetMailUserSearch_UserCallBack(new RemoteServices.GetMailUserSearch_UserCallBack(this.getMailUserSearchCallback)); }
public TutorialBattleReportPopup() { this.InitializeComponent(); this.lblMessage.Font = FontManager.GetFont("Arial", 9.75f, FontStyle.Regular); base.Title = this.Text = SK.Text("TutorialBattleReport_Victorious", "We are victorious Sire"); this.btnViewReport.Text = SK.Text("TutorialBattleReport_View_Battle", "View Battle"); this.btnViewReport.Font = FontManager.GetFont("Arial", 11f, FontStyle.Bold); }
public ParishWallPanel() { this.dockableControl = new DockableControl(this); this.InitializeComponent(); this.textBox1.Font = FontManager.GetFont("Microsoft Sans Serif", 9.75f); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); this.focusPanel.Focus(); }
public override void init(IDockableControl parent, Size size, object back) { base.init(parent, size, back); this.btnViewCastle.ImageNorm = (Image)GFXLibrary.button_132_normal; this.btnViewCastle.ImageOver = (Image)GFXLibrary.button_132_over; this.btnViewCastle.ImageClick = (Image)GFXLibrary.button_132_in; this.btnViewCastle.setSizeToImage(); this.btnViewCastle.Position = new Point(base.btnForward.Position.X, (base.btnUtility.Position.Y - this.btnViewCastle.Height) - 2); this.btnViewCastle.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.btnViewCastle.TextYOffset = -2; this.btnViewCastle.Text.Color = ARGBColors.Black; this.btnViewCastle.Enabled = true; this.btnViewCastle.Visible = false; this.btnViewCastle.Text.Text = SK.Text("Reports_View_Castle", "View Castle"); this.btnViewCastle.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.viewCastleClick), "Reports_View_Castle"); base.btnUtility.Text.Text = SK.Text("Reports_Show_On_Map", "Show On Map"); this.lblResult.Color = ARGBColors.Black; this.lblResult.Font = FontManager.GetFont("Arial", 14f, FontStyle.Regular); this.lblResult.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblResult.Position = new Point(20, base.lblSecondaryText.Rectangle.Bottom); this.lblResult.Size = new Size(base.Width - 40, 0x1a); base.lblDate.Y = this.lblResult.Rectangle.Bottom; this.lblScouts.Text = SK.Text("GENERIC_Scouts", "Scouts"); this.lblScouts.Color = ARGBColors.Black; this.lblScouts.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblScouts.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblScouts.Position = new Point(base.borderOffset, base.lblDate.Rectangle.Bottom + 5); this.lblScouts.Size = new Size(base.Width - (base.borderOffset * 2), 0x1a); this.lblScouts.Visible = false; this.lblWolves.Color = ARGBColors.Black; this.lblWolves.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblWolves.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblWolves.Position = new Point(base.borderOffset, this.lblScouts.Y + 30); this.lblWolves.Size = new Size(base.Width - (base.borderOffset * 2), 0x1a); this.lblWolves.Visible = false; this.lblHonour.Color = ARGBColors.Black; this.lblHonour.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblHonour.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblHonour.Position = new Point(base.borderOffset, base.btnDelete.Y); this.lblHonour.Size = new Size(base.Width - (base.borderOffset * 2), 0x1a); this.lblHonour.Visible = false; if (base.imgBackground.Image != null) { base.imgBackground.addControl(this.lblScouts); base.imgBackground.addControl(this.lblResult); base.imgBackground.addControl(this.btnViewCastle); base.imgBackground.addControl(this.lblHonour); base.imgBackground.addControl(this.lblWolves); } else { base.addControl(this.lblScouts); base.addControl(this.lblResult); base.addControl(this.btnViewCastle); base.addControl(this.lblHonour); base.addControl(this.lblWolves); } }
public void activate(int id) { base.Location = new Point((InterfaceMgr.Instance.ParentMainWindow.Location.X + (InterfaceMgr.Instance.ParentMainWindow.Width / 2)) - 150, ((InterfaceMgr.Instance.ParentMainWindow.Location.Y + InterfaceMgr.Instance.ParentMainWindow.Height) - 100) - 10); base.Width = 300; base.Height = 100; this.lifespan = 450; FontStyle bold = FontStyle.Bold; this.title.Size = new Size(300, 20); this.title.Text = ""; this.title.Position = new Point(0, 10); this.title.Font = FontManager.GetFont("Microsoft Sans Serif", 12f, bold); this.title.Color = ARGBColors.Black; this.title.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.title.Visible = true; this.background.addControl(this.title); bold = FontStyle.Regular; this.content.Size = new Size(200, 60); this.content.Text = ""; this.content.Position = new Point(50, 30); this.content.Font = FontManager.GetFont("Microsoft Sans Serif", 10f, bold); this.content.Color = ARGBColors.Black; this.content.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.content.Visible = true; this.background.addControl(this.content); this.gotoButton.Size = new Size(290, 90); this.gotoButton.Position = new Point(5, 5); this.gotoButton.FillRectColor = Color.FromArgb(0, 200, 220, 200); this.gotoButton.FillRectOverColor = Color.FromArgb(0, 210, 230, 210); this.gotoButton.Text.Position = new Point(0, 0); this.gotoButton.Text.Size = new Size(140, 20); this.gotoButton.Text.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f, bold); this.gotoButton.Text.Color = ARGBColors.Black; this.gotoButton.TextYOffset = 0; this.gotoButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.gotoButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.openAchievementsFunction)); this.background.addControl(this.gotoButton); this.closeButton.Size = new Size(150, 30); this.closeButton.Position = new Point(90, 70); this.closeButton.Text.Text = SK.Text("GENERIC_Close", "Close"); this.closeButton.Text.Position = new Point(0, 7); this.closeButton.Text.Size = new Size(150, 20); this.closeButton.Text.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f, bold); this.closeButton.Text.Color = ARGBColors.Black; this.closeButton.TextYOffset = 0; this.closeButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.closeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeFunction)); this.closeButton.ImageNorm = (Image)GFXLibrary.button_blue_01_normal; this.closeButton.ImageOver = (Image)GFXLibrary.button_blue_01_over; this.background.addControl(this.closeButton); this.icon.Position = new Point(2, 10); this.icon.Image = (Image)GFXLibrary.achievement_ribbons_centre[0]; this.background.addControl(this.icon); base.Opacity = 0.0; this.populateControls(id); base.Show(InterfaceMgr.Instance.ParentForm); }
public EmailOptInPopup() { this.InitializeComponent(); this.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); base.ShowClose = false; this.cbMailOptIn.Text = SK.Text("EMAIL_OptIn", "Please Tick here if you would like us to contact you via email with information related to Stronghold Kingdoms, including exclusive offers and competitions."); this.cbMailOptIn.Checked = false; base.Title = this.Text = SK.Text("EMAIL_OptInHeader", "Stronghold Kingdoms Email Preferences"); }
public void init(FactionNewForumPostsPanel.ForumPostData postData, int position, FactionNewForumPostsPanel parent, int yourRank) { this.m_parent = parent; this.m_position = position; this.m_postData = postData; Graphics graphics = parent.CreateGraphics(); Size size = graphics.MeasureString(postData.text, FontManager.GetFont("Arial", 9f, FontStyle.Regular), 630).ToSize(); graphics.Dispose(); int height = size.Height + 10; if (height < 0x20) { height = 0x20; } this.clearControls(); this.ClipVisible = true; this.Size = new Size(680, 0x19 + height); this.lightArea1.Size = new Size(640, height); this.lightArea1.Position = new Point(40, 0x19); base.addControl(this.lightArea1); this.lightArea1.Create((Image)GFXLibrary.int_insetpanel_lighten_top_left, (Image)GFXLibrary.int_insetpanel_lighten_middle, (Image)GFXLibrary.int_insetpanel_lighten_top_right, (Image)GFXLibrary.int_insetpanel_lighten_middle, (Image)GFXLibrary.int_insetpanel_lighten_middle, (Image)GFXLibrary.int_insetpanel_lighten_middle, (Image)GFXLibrary.int_insetpanel_lighten_bottom_left, (Image)GFXLibrary.int_insetpanel_lighten_middle, (Image)GFXLibrary.int_insetpanel_lighten_bottom_right); NumberFormatInfo nFI = GameEngine.NFI; this.userName.Text = postData.userName; this.userName.Color = ARGBColors.Black; this.userName.Position = new Point(9, 3); this.userName.Size = new Size(280, 30); this.userName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.userName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; base.addControl(this.userName); this.dateLabel.Text = postData.postTime.ToShortTimeString() + " " + postData.postTime.ToShortDateString(); this.dateLabel.Color = ARGBColors.Black; this.dateLabel.Position = new Point(0x216, 3); this.dateLabel.Size = new Size(0xa1, 30); this.dateLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.dateLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; base.addControl(this.dateLabel); this.bodyLabel.Text = postData.text; this.bodyLabel.Color = ARGBColors.Black; this.bodyLabel.Position = new Point(5, 5); this.bodyLabel.Size = new Size(this.lightArea1.Width - 10, height - 5); this.bodyLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.bodyLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.bodyLabel.setRightClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.copyTextToClipboardClick)); this.lightArea1.addControl(this.bodyLabel); if (((yourRank == 1) || (yourRank == 2)) || (((postData.userID == RemoteServices.Instance.UserID) || RemoteServices.Instance.Admin) || RemoteServices.Instance.Moderator)) { this.deleteThread.ImageNorm = (Image)GFXLibrary.trashcan_normal; this.deleteThread.ImageOver = (Image)GFXLibrary.trashcan_over; this.deleteThread.ImageClick = (Image)GFXLibrary.trashcan_clicked; this.deleteThread.Position = new Point(680, 4); this.deleteThread.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.deleteClicked), "FactionNewForumPostsPanel_delete_post"); base.addControl(this.deleteThread); } base.invalidate(); }
public void init(Form parent, bool forQuestList, string questTag, int questID) { this.m_parent = parent; base.clearControls(); this.isQuestList = forQuestList; this.questText = questTag; this._questID = questID; this.mainBackgroundImage.Image = (Image)GFXLibrary.mail2_mail_panel_middle_middle; this.mainBackgroundImage.ClipRect = new Rectangle(new Point(), base.Size); this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; base.addControl(this.mainBackgroundImage); this.questsScrollArea.Position = new Point(0x1b, 30); this.questsScrollArea.Size = new Size(0x199, 0x130); this.questsScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x199, 0x130)); this.mainBackgroundImage.addControl(this.questsScrollArea); this.questsScrollBar.Position = new Point(0x1bc, 0x23); this.questsScrollBar.Size = new Size(0x18, 0x126); this.mainBackgroundImage.addControl(this.questsScrollBar); this.questsScrollBar.Value = 0; this.questsScrollBar.Max = 100; this.questsScrollBar.NumVisibleLines = 0x19; this.questsScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.questsScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved)); this.mouseWheelOverlay.Position = this.questsScrollArea.Position; this.mouseWheelOverlay.Size = this.questsScrollArea.Size; this.mouseWheelOverlay.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.mouseWheelMoved)); this.mainBackgroundImage.addControl(this.mouseWheelOverlay); this.overlayImage.Image = (Image)GFXLibrary.char_achievementOverlay; this.overlayImage.Position = new Point(0, 0); this.mainBackgroundImage.addControl(this.overlayImage); this.closeButton.ImageNorm = (Image)GFXLibrary.int_button_close_normal; this.closeButton.ImageOver = (Image)GFXLibrary.int_button_close_over; this.closeButton.ImageClick = (Image)GFXLibrary.int_button_close_in; this.closeButton.Position = new Point(base.Width - 40, 0); this.closeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "NewQuestsCompletedPanel_close"); this.overlayImage.addControl(this.closeButton); if (forQuestList) { this.headerLabel.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); this.headerLabel.Text = SK.Text("QUESTS_CompletedQuests", "Completed Quests"); } else { this.headerLabel.Font = FontManager.GetFont("Arial", 11f, FontStyle.Regular); this.headerLabel.Text = SK.NoStoreText("Z_QUESTS_" + this.questText) + " - "; this.headerLabel.Text = this.headerLabel.Text + SK.Text("QUESTS_FurtherDetails", "Further Information"); } this.headerLabel.Position = new Point(0, 0); this.headerLabel.Size = new Size(base.Width, 30); this.headerLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.headerLabel.Color = ARGBColors.White; this.headerLabel.DropShadowColor = ARGBColors.Black; this.overlayImage.addControl(this.headerLabel); this.rebuild(); }