public QuestsPanel2() { Instance = this; this.dockableControl = new DockableControl(this); this.InitializeComponent(); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); this.focusPanel.Focus(); }
public void init(int quest, QuestsPanel2 parent, int completeState, int position) { this.m_quest = quest; this.m_parent = parent; 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.lblQuestDescription.Text = Quests.getQuestText(quest); this.lblQuestDescription.Color = ARGBColors.Black; this.lblQuestDescription.RolloverColor = ARGBColors.White; this.lblQuestDescription.Position = new Point(9, 0); this.lblQuestDescription.Size = new Size(480, this.backgroundImage.Height); this.lblQuestDescription.Font = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular); this.lblQuestDescription.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.backgroundImage.addControl(this.lblQuestDescription); this.collectButton.Visible = false; switch (completeState) { case -1: this.lblStatus.Visible = false; break; case 0: this.lblStatus.Text = "?"; break; case 1: this.lblStatus.Text = SK.Text("QuestLine_Not_Complete", "Objective not complete"); break; case 2: this.lblStatus.Text = SK.Text("QuestLine_Complete", "Objective Complete"); this.collectButton.Visible = true; break; } this.lblStatus.Color = ARGBColors.Black; this.lblStatus.RolloverColor = ARGBColors.White; this.lblStatus.Position = new Point(0x1f0, 0); this.lblStatus.Size = new Size(0x120, this.backgroundImage.Height); this.lblStatus.Font = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular); this.lblStatus.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.backgroundImage.addControl(this.lblStatus); this.collectButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.collectButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.collectButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.collectButton.Position = new Point(0x306, 4); this.collectButton.Text.Text = SK.Text("QuestLine_Collect_Reward", "Collect Reward"); this.collectButton.Text.Color = ARGBColors.Black; this.collectButton.Text.Font = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular); this.collectButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lineClicked), "QuestsPanel2_collect"); this.backgroundImage.addControl(this.collectButton); }
public void init(bool resized) { int height = base.Height; questXPos = base.Location.X; 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); this.parishNameLabel.Text = SK.Text("QuestPanel_TutorialQuests", "Tutorial Quests"); 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.blockYSize = (height - 40) - 0x38; this.headerLabelsImage.Size = new Size((base.Width - 0x19) - 0x17, 0x1c); this.headerLabelsImage.Position = new Point(0x19, 5); 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(490, 0); this.headerLabelsImage.addControl(this.divider1Image); this.objectivesLabel.Text = SK.Text("QuestsPanel_Objectives", "Objectives"); this.objectivesLabel.Color = ARGBColors.Black; this.objectivesLabel.Position = new Point(12, -2); this.objectivesLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.objectivesLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.objectivesLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.objectivesLabel); this.statusLabel.Text = SK.Text("QuestsPanel_Status", "Status"); this.statusLabel.Color = ARGBColors.Black; this.statusLabel.Position = new Point(0x1f0, -2); this.statusLabel.Size = new Size(0xdf, this.headerLabelsImage.Height); this.statusLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.statusLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.statusLabel); this.outgoingScrollArea.Position = new Point(0x19, 40); this.outgoingScrollArea.Size = new Size(0x393, (this.blockYSize - 40) - 10); this.outgoingScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x393, (this.blockYSize - 40) - 10)); this.backgroundImage.addControl(this.outgoingScrollArea); int num2 = this.outgoingScrollBar.Value; this.outgoingScrollBar.Position = new Point(0x3af, 40); this.outgoingScrollBar.Size = new Size(0x18, (this.blockYSize - 40) - 10); this.backgroundImage.addControl(this.outgoingScrollBar); this.outgoingScrollBar.Value = 0; this.outgoingScrollBar.Max = 100; this.outgoingScrollBar.NumVisibleLines = 0x19; this.outgoingScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.outgoingScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved)); if (!resized) { this.downloadQuestInfo(); } this.rebuild(); if (resized) { this.outgoingScrollBar.Value = num2; } }