public void init(FactionData factionData, int position, FactionInvitePanel parent, bool invite) { 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); 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.playerName.Text = factionData.factionName; this.playerName.Color = ARGBColors.Black; this.playerName.Position = new Point(9, 0); this.playerName.Size = new Size(280, this.backgroundImage.Height); this.playerName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.playerName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.playerName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); this.backgroundImage.addControl(this.playerName); if (invite) { if (RemoteServices.Instance.UserFactionID < 0) { this.acceptButton.ImageNorm = (Image) GFXLibrary.mail2_button_blue_141wide_normal; this.acceptButton.ImageOver = (Image) GFXLibrary.mail2_button_blue_141wide_over; this.acceptButton.ImageClick = (Image) GFXLibrary.mail2_button_blue_141wide_pushed; this.acceptButton.Position = new Point(350, 0); this.acceptButton.Text.Text = SK.Text("FactionInviteLine_Accept", "Accept"); this.acceptButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.acceptButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.acceptButton.TextYOffset = -3; this.acceptButton.Text.Color = ARGBColors.Black; this.acceptButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.acceptClicked), "FactionInvitePanel_accept_clicked"); this.backgroundImage.addControl(this.acceptButton); } this.declineButton.ImageNorm = (Image) GFXLibrary.mail2_button_blue_141wide_normal; this.declineButton.ImageOver = (Image) GFXLibrary.mail2_button_blue_141wide_over; this.declineButton.ImageClick = (Image) GFXLibrary.mail2_button_blue_141wide_pushed; this.declineButton.Position = new Point(500, 0); this.declineButton.Text.Text = SK.Text("FactionInviteLine_Decline", "Decline"); this.declineButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.declineButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.declineButton.TextYOffset = -3; this.declineButton.Text.Color = ARGBColors.Black; this.declineButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.declineClicked), "FactionInvitePanel_declined_clicked"); this.backgroundImage.addControl(this.declineButton); } else { this.declineButton.ImageNorm = (Image) GFXLibrary.mail2_button_blue_141wide_normal; this.declineButton.ImageOver = (Image) GFXLibrary.mail2_button_blue_141wide_over; this.declineButton.ImageClick = (Image) GFXLibrary.mail2_button_blue_141wide_pushed; this.declineButton.Position = new Point(500, 0); this.declineButton.Text.Text = SK.Text("GENERIC_Cancel", "Cancel"); this.declineButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.declineButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.declineButton.TextYOffset = -3; this.declineButton.Text.Color = ARGBColors.Black; this.declineButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.appCancelClicked), "FactionInvitePanel_declined_clicked"); this.backgroundImage.addControl(this.declineButton); } base.invalidate(); }
public void init(FactionData factionData, int position, FactionInvitePanel parent, bool invite) { 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); 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.playerName.Text = factionData.factionName; this.playerName.Color = ARGBColors.Black; this.playerName.Position = new Point(9, 0); this.playerName.Size = new Size(280, this.backgroundImage.Height); this.playerName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.playerName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.playerName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine)); this.backgroundImage.addControl(this.playerName); if (invite) { if (RemoteServices.Instance.UserFactionID < 0) { this.acceptButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.acceptButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.acceptButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.acceptButton.Position = new Point(350, 0); this.acceptButton.Text.Text = SK.Text("FactionInviteLine_Accept", "Accept"); this.acceptButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.acceptButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.acceptButton.TextYOffset = -3; this.acceptButton.Text.Color = ARGBColors.Black; this.acceptButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.acceptClicked), "FactionInvitePanel_accept_clicked"); this.backgroundImage.addControl(this.acceptButton); } this.declineButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.declineButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.declineButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.declineButton.Position = new Point(500, 0); this.declineButton.Text.Text = SK.Text("FactionInviteLine_Decline", "Decline"); this.declineButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.declineButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.declineButton.TextYOffset = -3; this.declineButton.Text.Color = ARGBColors.Black; this.declineButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.declineClicked), "FactionInvitePanel_declined_clicked"); this.backgroundImage.addControl(this.declineButton); } else { this.declineButton.ImageNorm = (Image)GFXLibrary.mail2_button_blue_141wide_normal; this.declineButton.ImageOver = (Image)GFXLibrary.mail2_button_blue_141wide_over; this.declineButton.ImageClick = (Image)GFXLibrary.mail2_button_blue_141wide_pushed; this.declineButton.Position = new Point(500, 0); this.declineButton.Text.Text = SK.Text("GENERIC_Cancel", "Cancel"); this.declineButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.declineButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); this.declineButton.TextYOffset = -3; this.declineButton.Text.Color = ARGBColors.Black; this.declineButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.appCancelClicked), "FactionInvitePanel_declined_clicked"); this.backgroundImage.addControl(this.declineButton); } base.invalidate(); }
public void init(bool resized) { int height = base.Height; this.blockYSize = height / 2; instance = this; base.clearControls(); this.sidebar.addSideBar(0, 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.playerNameLabel.Text = SK.Text("FactionsPanel_Users", "Invites"); this.playerNameLabel.Color = ARGBColors.Black; this.playerNameLabel.Position = new Point(9, -2); this.playerNameLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.playerNameLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.playerNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.playerNameLabel); this.headerLabelsImage2.Size = new Size(((base.Width - 0x19) - 0x17) - 200, 0x1c); this.headerLabelsImage2.Position = new Point(0x19, this.blockYSize); 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.applicationsNameLabel.Text = SK.Text("FactionInvites_Applications", "Applications"); this.applicationsNameLabel.Color = ARGBColors.Black; this.applicationsNameLabel.Position = new Point(9, -2); this.applicationsNameLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.applicationsNameLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.applicationsNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage2.addControl(this.applicationsNameLabel); InterfaceMgr.Instance.setVillageHeading(SK.Text("FactionInvites_Faction_Invites", "Faction Invites")); this.wallScrollArea.Position = new Point(0x19, 0x26); this.wallScrollArea.Size = new Size(0x2c1, this.blockYSize - 50); this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x2c1, this.blockYSize - 50)); 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.Visible = false; this.wallScrollBar.Position = new Point(0x2dd, 0x26); this.wallScrollBar.Size = new Size(0x18, this.blockYSize - 50); 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)); this.appScrollArea.Position = new Point(0x19, 0x26 + this.blockYSize); this.appScrollArea.Size = new Size(0x2c1, this.blockYSize - 50); this.appScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x2c1, this.blockYSize - 50)); this.mainBackgroundImage.addControl(this.appScrollArea); this.appMouseWheelOverlay.Position = this.appScrollArea.Position; this.appMouseWheelOverlay.Size = this.appScrollArea.Size; this.appMouseWheelOverlay.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.appMouseWheelMoved)); this.mainBackgroundImage.addControl(this.appMouseWheelOverlay); int num2 = this.appScrollBar.Value; this.appScrollBar.Visible = false; this.appScrollBar.Position = new Point(0x2dd, 0x26 + this.blockYSize); this.appScrollBar.Size = new Size(0x18, this.blockYSize - 50); this.mainBackgroundImage.addControl(this.appScrollBar); this.appScrollBar.Value = 0; this.appScrollBar.Max = 100; this.appScrollBar.NumVisibleLines = 0x19; this.appScrollBar.Create(null, null, null, (Image) GFXLibrary._24wide_thumb_top, (Image) GFXLibrary._24wide_thumb_middle, (Image) GFXLibrary._24wide_thumb_bottom); this.appScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.appScrollBarMoved)); if (GameEngine.Instance.World.getRank() < 6) { this.rankLabel.Text = SK.Text("FACTION_INVITE_rank", "You don't currently have the required Rank (7) to join a Faction."); this.rankLabel.Color = ARGBColors.Black; this.rankLabel.Position = new Point(0, 50); this.rankLabel.Size = this.wallScrollArea.Size; this.rankLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.rankLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.mainBackgroundImage.addControl(this.rankLabel); } if (!resized) { CustomSelfDrawPanel.FactionPanelSideBar.downloadCurrentFactionInfo(); } this.addPlayers(); }
public void init(bool resized) { int height = base.Height; this.blockYSize = height / 2; instance = this; base.clearControls(); this.sidebar.addSideBar(0, 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.playerNameLabel.Text = SK.Text("FactionsPanel_Users", "Invites"); this.playerNameLabel.Color = ARGBColors.Black; this.playerNameLabel.Position = new Point(9, -2); this.playerNameLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.playerNameLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.playerNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage.addControl(this.playerNameLabel); this.headerLabelsImage2.Size = new Size(((base.Width - 0x19) - 0x17) - 200, 0x1c); this.headerLabelsImage2.Position = new Point(0x19, this.blockYSize); 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.applicationsNameLabel.Text = SK.Text("FactionInvites_Applications", "Applications"); this.applicationsNameLabel.Color = ARGBColors.Black; this.applicationsNameLabel.Position = new Point(9, -2); this.applicationsNameLabel.Size = new Size(0x143, this.headerLabelsImage.Height); this.applicationsNameLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.applicationsNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT; this.headerLabelsImage2.addControl(this.applicationsNameLabel); InterfaceMgr.Instance.setVillageHeading(SK.Text("FactionInvites_Faction_Invites", "Faction Invites")); this.wallScrollArea.Position = new Point(0x19, 0x26); this.wallScrollArea.Size = new Size(0x2c1, this.blockYSize - 50); this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x2c1, this.blockYSize - 50)); 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.Visible = false; this.wallScrollBar.Position = new Point(0x2dd, 0x26); this.wallScrollBar.Size = new Size(0x18, this.blockYSize - 50); 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)); this.appScrollArea.Position = new Point(0x19, 0x26 + this.blockYSize); this.appScrollArea.Size = new Size(0x2c1, this.blockYSize - 50); this.appScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x2c1, this.blockYSize - 50)); this.mainBackgroundImage.addControl(this.appScrollArea); this.appMouseWheelOverlay.Position = this.appScrollArea.Position; this.appMouseWheelOverlay.Size = this.appScrollArea.Size; this.appMouseWheelOverlay.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.appMouseWheelMoved)); this.mainBackgroundImage.addControl(this.appMouseWheelOverlay); int num2 = this.appScrollBar.Value; this.appScrollBar.Visible = false; this.appScrollBar.Position = new Point(0x2dd, 0x26 + this.blockYSize); this.appScrollBar.Size = new Size(0x18, this.blockYSize - 50); this.mainBackgroundImage.addControl(this.appScrollBar); this.appScrollBar.Value = 0; this.appScrollBar.Max = 100; this.appScrollBar.NumVisibleLines = 0x19; this.appScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom); this.appScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.appScrollBarMoved)); if (GameEngine.Instance.World.getRank() < 6) { this.rankLabel.Text = SK.Text("FACTION_INVITE_rank", "You don't currently have the required Rank (7) to join a Faction."); this.rankLabel.Color = ARGBColors.Black; this.rankLabel.Position = new Point(0, 50); this.rankLabel.Size = this.wallScrollArea.Size; this.rankLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.rankLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.mainBackgroundImage.addControl(this.rankLabel); } if (!resized) { CustomSelfDrawPanel.FactionPanelSideBar.downloadCurrentFactionInfo(); } this.addPlayers(); }