public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image) GFXLibrary.cardpanel_panel_back_top_left, (Image) GFXLibrary.cardpanel_panel_back_top_mid, (Image) GFXLibrary.cardpanel_panel_back_top_right, (Image) GFXLibrary.cardpanel_panel_back_mid_left, (Image) GFXLibrary.cardpanel_panel_back_mid_mid, (Image) GFXLibrary.cardpanel_panel_back_mid_right, (Image) GFXLibrary.cardpanel_panel_back_bottom_left, (Image) GFXLibrary.cardpanel_panel_back_bottom_mid, (Image) GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 0x177); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 550); this.AvailablePanel.Alpha = 0.8f; this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); int width = base.Width; int borderPadding = BorderPadding; int num3 = this.AvailablePanel.Width; this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "Cards_Close"); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundImage, 0x27, new Point((((base.Width - 1) - 0x11) - 50) + 3, 5), true); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); this.greyout.FillColor = Color.FromArgb(0xd7, 0x19, 0x19, 0x19); this.greyout.Size = new Size(this.mainBackgroundImage.Width, this.AvailablePanel.Y + this.AvailablePanel.Height); this.greyout.Position = new Point(0, 0); this.greyout.setClickDelegate(delegate { }); CustomSelfDrawPanel.CSDImage closeGrey = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_button_close_normal, Size = this.closeImage.Image.Size }; closeGrey.setMouseOverDelegate(() => closeGrey.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => closeGrey.Image = (Image) GFXLibrary.cardpanel_button_close_normal); closeGrey.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.CloseGrey), "BuyCardsPanel_close_overlay"); closeGrey.Position = new Point((base.Width - 14) - 0x11, 10); this.greyout.addControl(closeGrey); CustomSelfDrawPanel.UICardsButtons buttons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow) base.ParentForm) { Position = new Point(0x328, 0x25) }; this.mainBackgroundImage.addControl(buttons); this.cardButtons = buttons; this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(0x3a7, 0x40); this.labelTitle.Text = SK.Text("BuyCardsPanel_Buy_and_Open_Packs", "Buy and Open Card Packs: Crowns in your treasury") + " : " + GameEngine.Instance.World.ProfileCrowns.ToString(); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); this.labelBottom.Position = new Point(0x1b, (this.AvailablePanel.Y + this.AvailablePanel.Height) + 4); this.labelBottom.Size = new Size(800, 0x40); this.labelBottom.Text = SK.Text("BuyCardsPanel_Click_To_Open", "Click on a pack to open it"); this.labelBottom.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelBottom.Font = FontManager.GetFont("Arial", 16f, FontStyle.Regular); this.labelBottom.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelBottom); this.packWidth = 100; this.packX = this.AvailablePanel.X + BorderPadding; this.offerX = (this.packX + this.packWidth) - 0x10; this.GetOffercontrolList(); this.AddOfferControls(); this.UpdatePacks(); }
public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image) GFXLibrary.cardpanel_panel_back_top_left, (Image) GFXLibrary.cardpanel_panel_back_top_mid, (Image) GFXLibrary.cardpanel_panel_back_top_right, (Image) GFXLibrary.cardpanel_panel_back_mid_left, (Image) GFXLibrary.cardpanel_panel_back_mid_mid, (Image) GFXLibrary.cardpanel_panel_back_mid_right, (Image) GFXLibrary.cardpanel_panel_back_bottom_left, (Image) GFXLibrary.cardpanel_panel_back_bottom_mid, (Image) GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 550); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 550); this.AvailablePanel.Alpha = 0.8f; this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); this.cardsInPlay.init(cardSection, 0x70, false, 14, 3, 0); this.cardsInPlay.Position = new Point(0, 5); this.AvailablePanel.addControl(this.cardsInPlay); int width = base.Width; int borderPadding = BorderPadding; int num3 = this.AvailablePanel.Width; this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick)); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); this.greyout.FillColor = Color.FromArgb(0xd7, 0x19, 0x19, 0x19); this.greyout.Size = new Size(this.mainBackgroundImage.Width, this.AvailablePanel.Y + this.AvailablePanel.Height); this.greyout.Position = new Point(0, 0); this.greyout.setClickDelegate(delegate { }); CustomSelfDrawPanel.CSDImage closeGrey = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_button_close_normal, Size = this.closeImage.Image.Size }; closeGrey.setMouseOverDelegate(() => closeGrey.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => closeGrey.Image = (Image) GFXLibrary.cardpanel_button_close_normal); closeGrey.Position = new Point((base.Width - 14) - 0x11, 10); this.greyout.addControl(closeGrey); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(0x3a7, 0x40); this.labelTitle.Text = SK.Text("ViewAllCardsPanel_Cards_In_Play", "Cards In Play"); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); CustomSelfDrawPanel.UICardsButtons buttons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow) base.ParentForm) { Position = new Point(0x328, 0x25) }; this.mainBackgroundImage.addControl(buttons); this.cardButtons = buttons; if (cardSection != 0) { CustomSelfDrawPanel.CSDButton button = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.button_cards_all_normal, ImageOver = (Image) GFXLibrary.button_cards_all_over, ImageClick = (Image) GFXLibrary.button_cards_all_over, Position = new Point(750, 0) }; button.Text.Text = SK.Text("PlayCardsPanel_All_Your_Cards", "All Your Cards"); button.TextYOffset = -3; button.Text.Color = ARGBColors.Black; button.Text.Size = new Size(button.Size.Width - 0x2d, button.Size.Height); button.Text.Position = new Point(0x2d, 0); button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.showAllCardsClick), "PlayCardsPanel_show_all_cards"); this.mainBackgroundImage.addControl(button); } CustomSelfDrawPanel.CSDButton button2 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.misc_button_blue_210wide_normal, ImageOver = (Image) GFXLibrary.misc_button_blue_210wide_over, ImageClick = (Image) GFXLibrary.misc_button_blue_210wide_pushed, Position = new Point(580, 0x203) }; button2.Text.Text = SK.Text("PlayCardsPanel_Return", "Back To Play Cards"); button2.TextYOffset = -2; button2.Text.Color = ARGBColors.Black; if ((Program.mySettings.LanguageIdent == "it") || (Program.mySettings.LanguageIdent == "tr")) { button2.Text.Font = FontManager.GetFont("Arial", 11f, FontStyle.Bold); } else { button2.Text.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); } button2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.returnClicked), "PlayCardsPanel_Back_To_PlayCards"); this.AvailablePanel.addControl(button2); CustomSelfDrawPanel.CSDLabel label = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0x1b, 0x233), Size = new Size(0x3a7, 0x40), Text = SK.Text("ViewAllCardsPanel_Cancel", "Click on a Card Circle to cancel that card."), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 14f, FontStyle.Regular), Color = ARGBColors.White }; this.mainBackgroundImage.addControl(label); this.mainBackgroundImage.invalidate(); }
public void init(int cardSection) { this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = (Image)GFXLibrary.body_background_001; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = (this.ContentWidth - 150) - 40; this.InplayPanelWidth = (this.ContentWidth - BorderPadding) - this.AvailablePanelWidth; this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, (base.Height - 0x10) - BorderPadding); this.AvailablePanel.Position = new Point(0x10, 0x10); this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image)GFXLibrary.int_insetpanel_a_top_left, (Image)GFXLibrary.int_insetpanel_a_middle_top, (Image)GFXLibrary.int_insetpanel_a_top_right, (Image)GFXLibrary.int_insetpanel_a_middle_left, (Image)GFXLibrary.int_insetpanel_a_middle, (Image)GFXLibrary.int_insetpanel_a_middle_right, (Image)GFXLibrary.int_insetpanel_a_bottom_left, (Image)GFXLibrary.int_insetpanel_a_middle_bottom, (Image)GFXLibrary.int_insetpanel_a_bottom_right); int width = (base.Width - (BorderPadding * 3)) - this.AvailablePanel.Width; int height = 100; if (buttonpic == null) { buttonpic = new Bitmap(width, height); using (Graphics graphics = Graphics.FromImage(buttonpic)) { Brush green = Brushes.Green; graphics.FillRectangle(green, new Rectangle(new Point(0, 0), buttonpic.Size)); } } this.closeButton.Size = new Size(width, 0x26); this.closeButton.Text.Text = SK.Text("GENERIC_Close", "Close"); this.closeButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.closeButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.closeButton.TextYOffset = -1; this.closeButton.Text.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.closeButton); this.closeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "Cards_Close"); this.closeButton.setNormalExtImage((Image)GFXLibrary.int_buttonbar_left_normal, (Image)GFXLibrary.int_buttonbar_middle_normal, (Image)GFXLibrary.int_buttonbar_right_normal); this.closeButton.setOverExtImage((Image)GFXLibrary.int_buttonbar_left_over, (Image)GFXLibrary.int_buttonbar_middle_over, (Image)GFXLibrary.int_buttonbar_right_over); this.closeButton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, BorderPadding); this.playbutton.Size = new Size(width, height); this.playbutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.closeButton.Y + this.closeButton.Height) + (BorderPadding / 2)); this.playbutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.playbutton); CustomSelfDrawPanel.CSDLabel control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Open_Cards", "Open Cards"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.playbutton.addControl(control); this.buybutton.Size = new Size(width, 100); this.buybutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.playbutton.Y + this.playbutton.Height) + (BorderPadding / 2)); this.buybutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.buybutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Buy_Cards", "Buy Cards"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.buybutton.addControl(control); this.premiumbutton.Size = new Size(width, 100); this.premiumbutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.buybutton.Y + this.buybutton.Height) + (BorderPadding / 2)); this.premiumbutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.premiumbutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Premium", "Premium"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.premiumbutton.addControl(control); this.managebutton.Size = new Size(width, 100); this.managebutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.premiumbutton.Y + this.premiumbutton.Height) + (BorderPadding / 2)); this.managebutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.managebutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Manage_Cards", "Manage Cards"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.managebutton.addControl(control); this.crownsbutton.Size = new Size(width, 100); this.crownsbutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.managebutton.Y + this.managebutton.Height) + (BorderPadding / 2)); this.crownsbutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.crownsbutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Get_Crowns", "Get Crowns"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.crownsbutton.addControl(control); this.labelTitle.Position = new Point(BorderPadding, 2); this.labelTitle.Size = new Size(300, 0x40); this.labelTitle.Text = SK.Text("OpenCardsPanel_Latest_Offers", "Latest Offers"); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.White; this.labelTitle.DropShadowColor = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); }
public void init(bool normalLogout, bool advertOnly) { CustomSelfDrawPanel.CSDImage image2; CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate newDelegate = null; CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate delegate3 = null; CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate delegate4 = null; CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate delegate5 = null; CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate delegate6 = null; CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate delegate7 = null; this.m_normalLogout = normalLogout; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image) GFXLibrary.cardpanel_panel_back_top_left, (Image) GFXLibrary.cardpanel_panel_back_top_mid, (Image) GFXLibrary.cardpanel_panel_back_top_right, (Image) GFXLibrary.cardpanel_panel_back_mid_left, (Image) GFXLibrary.cardpanel_panel_back_mid_mid, (Image) GFXLibrary.cardpanel_panel_back_mid_right, (Image) GFXLibrary.cardpanel_panel_back_bottom_left, (Image) GFXLibrary.cardpanel_panel_back_bottom_mid, (Image) GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); if (hrImage == null) { hrImage = new Bitmap(base.Width - 10, 1); using (Graphics graphics = Graphics.FromImage(hrImage)) { graphics.Clear(Color.FromArgb(0xff, 130, 0x81, 0x7e)); } } CustomSelfDrawPanel.CSDImage image3 = new CustomSelfDrawPanel.CSDImage { Image = hrImage, Size = hrImage.Size, Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(image3); this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "LogoutPanel_close"); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.closeImage.CustomTooltipID = 0x578; this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundImage, 0x29, new Point((((base.Width - 14) - 0x11) - 50) + 3, 5), true); CustomSelfDrawPanel.CSDImage image4 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_background_lhs, Position = new Point(4, 40) }; control.addControl(image4); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(600, 0x40); if (advertOnly) { this.labelTitle.Text = SK.Text("LogoutPanel_Expiration", "Premium Token Expired"); } else { this.labelTitle.Text = SK.Text("LogoutPanel_Logout", "Logout"); } this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); NumberFormatInfo nFI = GameEngine.NFI; this.labelCrowns.Position = new Point(0, 8); this.labelCrowns.Size = new Size(900, 0x40); this.labelCrowns.Text = SK.Text("LogoutPanel_Crowns_In_Treasury", "Crowns in your treasury") + " : " + GameEngine.Instance.World.ProfileCrowns.ToString("N", nFI); this.labelCrowns.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT; this.labelCrowns.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelCrowns.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelCrowns); CardData userCardData = GameEngine.Instance.World.UserCardData; if (userCardData.premiumCard == 0) { this.premium = false; CustomSelfDrawPanel.CSDButton button = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.logout_ad_1premfor30crown_01, ImageOver = (Image) GFXLibrary.logout_ad_1premfor30crown_01_over, Position = new Point(0x177, 50) }; button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.cardsClicked), "LogoutPanel_premium"); this.mainBackgroundImage.addControl(button); int num = 0x23; int y = 0x35; CustomSelfDrawPanel.CSDExtendingPanel panel2 = new CustomSelfDrawPanel.CSDExtendingPanel { Size = new Size(0x252, 0x164), Position = new Point(image4.Position.X + 0x174, (image4.Position.Y + 0x4c) + 0x13), Alpha = 0.1f }; this.mainBackgroundImage.addControl(panel2); panel2.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); CustomSelfDrawPanel.CSDLabel label = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Premium_1", "With premium you command"), Position = new Point(0, 5), Color = ARGBColors.Black, Size = new Size(panel2.Width, 50), Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER }; panel2.addControl(label); CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Premium_2", "even when you are offline!"), Position = new Point(0, 0x21), Color = ARGBColors.Black, Size = new Size(panel2.Width, 50), Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER }; panel2.addControl(label2); CustomSelfDrawPanel.CSDLabel label3 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_BuildQueue_1", "Build-queue, build up to 5 buildings in your village at one time."), Position = new Point(0x41, y), Color = ARGBColors.Black, Size = new Size(panel2.Width - 0x4b, 50), Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; panel2.addControl(label3); CustomSelfDrawPanel.CSDLabel label4 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_BuildQueue_2", "Research queue, 5 more items can be added to your research queue."), Position = new Point(0x41, y + num), Color = ARGBColors.Black, Size = new Size(panel2.Width - 0x4b, 50), Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; panel2.addControl(label4); CustomSelfDrawPanel.CSDLabel label5 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Scouting_1", "Use Auto scouting to forage for goods."), Position = new Point(0x41, y + (num * 2)), Color = ARGBColors.Black, Size = new Size(panel2.Width - 0x4b, 50), Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; panel2.addControl(label5); CustomSelfDrawPanel.CSDLabel label6 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Scouting_2", "Auto Trade - lets you set and trade the surplus of one goods type."), Position = new Point(0x41, y + (num * 3)), Color = ARGBColors.Black, Size = new Size(panel2.Width - 0x4b, 50), Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; panel2.addControl(label6); CustomSelfDrawPanel.CSDLabel label7 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Attacks_1", "Specify targets and Auto Attack will dispatch your armies."), Position = new Point(0x41, y + (num * 4)), Color = ARGBColors.Black, Size = new Size(panel2.Width - 0x4b, 50), Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; panel2.addControl(label7); CustomSelfDrawPanel.CSDLabel label8 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Attacks_2", "Keep your army topped up with Auto Recruit."), Position = new Point(0x41, y + (num * 5)), Color = ARGBColors.Black, Size = new Size(panel2.Width - 0x4b, 50), Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; panel2.addControl(label8); CustomSelfDrawPanel.CSDLabel label9 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Overview", "Keep track of key stats across all your villages with the Village Overview."), Position = new Point(0x41, y + (num * 6)), Color = ARGBColors.Black, Size = new Size(panel2.Width - 0x4b, 50), Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; panel2.addControl(label9); CustomSelfDrawPanel.CSDImage image5 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.icon_building, Position = new Point(0x12, y + 7) }; panel2.addControl(image5); CustomSelfDrawPanel.CSDImage image6 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.icon_research, Position = new Point(0x12, (y + 7) + num) }; panel2.addControl(image6); CustomSelfDrawPanel.CSDImage image7 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[2], Position = new Point(15, (y + 5) + (num * 2)) }; panel2.addControl(image7); CustomSelfDrawPanel.CSDImage image8 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[1], Position = new Point(15, (y + 5) + (num * 3)) }; panel2.addControl(image8); CustomSelfDrawPanel.CSDImage image9 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[0], Position = new Point(15, (y + 5) + (num * 4)) }; panel2.addControl(image9); CustomSelfDrawPanel.CSDImage image10 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[0], Position = new Point(15, (y + 5) + (num * 5)) }; panel2.addControl(image10); CustomSelfDrawPanel.CSDImage image11 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[4], Position = new Point(15, (y + 5) + (num * 6)) }; panel2.addControl(image11); } else { this.premium = true; CustomSelfDrawPanel.CSDExtendingPanel panel3 = new CustomSelfDrawPanel.CSDExtendingPanel { Size = new Size(0x252, 0x1b0), Alpha = 0.1f, Position = new Point(image4.Position.X + 0x174, image4.Position.Y + 20) }; this.mainBackgroundImage.addControl(panel3); panel3.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); CustomSelfDrawPanel.CSDImage image12 = new CustomSelfDrawPanel.CSDImage(); if (userCardData.premiumCard == 0x1012) { image12.Image = (Image) GFXLibrary.logout_premium_token_30; } else if (userCardData.premiumCard == 0x1011) { image12.Image = (Image) GFXLibrary.logout_premium_token_2; } else if (userCardData.premiumCard == 0x1014) { image12.Image = (Image) GFXLibrary.logout_premium_token_extendable; } else { image12.Image = (Image) GFXLibrary.logout_premium_token; } image12.Position = new Point(-8, -8); image12.CustomTooltipID = 0x58d; image4.addControl(image12); CustomSelfDrawPanel.CSDImage image13 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_gradation_band, Position = new Point(0x26, 30) }; panel3.addControl(image13); CustomSelfDrawPanel.CSDImage image14 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[1], Position = new Point(-4, -4) }; if (newDelegate == null) { newDelegate = delegate { this.tradingCheck.Checked = !this.tradingCheck.Checked; this.tradingToggled(); }; } image14.setClickDelegate(newDelegate, "Generic_check_box_toggled"); image14.CustomTooltipID = 0x579; image13.addControl(image14); this.tradingCheck.Position = new Point(-30, 2); this.tradingCheck.CheckedImage = (Image) GFXLibrary.checkbox_checked; this.tradingCheck.UncheckedImage = (Image) GFXLibrary.checkbox_unchecked; this.tradingCheck.Checked = RemoteServices.Instance.UserOptions.autoTrade; this.tradingCheck.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.tradingToggled)); this.tradingCheck.CustomTooltipID = 0x579; image13.addControl(this.tradingCheck); CustomSelfDrawPanel.CSDLabel label10 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Auto_Trading", "Auto Trading"), Position = new Point(40, 0), Color = ARGBColors.Black, Size = new Size(140, image13.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; image13.addControl(label10); this.tradingArea.Position = new Point(0x87, -20); this.tradingArea.Size = new Size(0x1ac, image13.Height + 0x29); this.tradingArea.Visible = this.tradingCheck.Checked; image13.addControl(this.tradingArea); int autoTradeResource = RemoteServices.Instance.UserOptions.autoTradeResource; if (autoTradeResource == -1) { autoTradeResource = 6; } this.tradingCircleButton.ImageNorm = (Image) GFXLibrary.logout_bits[7]; this.tradingCircleButton.ImageOver = (Image) GFXLibrary.logout_bits[8]; this.tradingCircleButton.Position = new Point(0, 1); this.tradingCircleButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.tradingResourceClicked), "LogoutPanel_resources"); this.tradingCircleButton.CustomTooltipID = 0x57f; this.tradingCircleButton.CustomTooltipData = autoTradeResource; this.tradingArea.addControl(this.tradingCircleButton); this.tradingResourceImage.Image = (Image) GFXLibrary.getCommodity64DSImage(autoTradeResource); this.tradingResourceImage.Size = new Size(0x45, 0x45); this.tradingResourceImage.Data = autoTradeResource; this.tradingResourceImage.Position = new Point(0, 0); this.tradingCircleButton.addControl(this.tradingResourceImage); this.tradingTrackBar.Position = new Point(0xd7, 0x19); this.tradingTrackBar.Margin = new Rectangle(0x49, -4, 0, 0); this.tradingTrackBar.Max = 100; this.tradingTrackBar.Value = RemoteServices.Instance.UserOptions.autoTradePercent; this.tradingTrackBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.tracksMoved)); this.tradingArea.addControl(this.tradingTrackBar); this.tradingTrackBar.CustomTooltipID = 0x580; this.tradingTrackBar.Create((Image) GFXLibrary.logout_slider_back, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb); this.tradingPercentLabel.Text = "0%"; this.tradingPercentLabel.Position = new Point(0, 0); this.tradingPercentLabel.Color = ARGBColors.Black; this.tradingPercentLabel.Size = new Size(0x3a, 0x17); this.tradingPercentLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.tradingPercentLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.tradingTrackBar.addControl(this.tradingPercentLabel); CustomSelfDrawPanel.CSDLabel label11 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Trade_Over", "Trade Over"), Position = new Point(0, 0), Color = ARGBColors.Black, Size = new Size(210, this.tradingArea.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT }; this.tradingArea.addControl(label11); this.tracksMoved(); CustomSelfDrawPanel.CSDImage image15 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_gradation_band, Position = new Point(0x26, 100) }; panel3.addControl(image15); CustomSelfDrawPanel.CSDImage image16 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[2], Position = new Point(-4, -4) }; if (delegate3 == null) { delegate3 = delegate { this.scoutingCheck.Checked = !this.scoutingCheck.Checked; this.scoutingToggled(); }; } image16.setClickDelegate(delegate3, "Generic_check_box_toggled"); image16.CustomTooltipID = 0x57a; image15.addControl(image16); this.scoutingCheck.Position = new Point(-30, 2); this.scoutingCheck.CheckedImage = (Image) GFXLibrary.checkbox_checked; this.scoutingCheck.UncheckedImage = (Image) GFXLibrary.checkbox_unchecked; this.scoutingCheck.Checked = RemoteServices.Instance.UserOptions.autoScout; this.scoutingCheck.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.scoutingToggled)); this.scoutingCheck.CustomTooltipID = 0x57a; image15.addControl(this.scoutingCheck); CustomSelfDrawPanel.CSDLabel label12 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Auto_Scouting", "Auto Scouting"), Position = new Point(40, 0), Color = ARGBColors.Black, Size = new Size(140, image15.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; image15.addControl(label12); this.scoutingArea.Position = new Point(0x87, -20); this.scoutingArea.Size = new Size(0x1ac, image15.Height + 0x29); this.scoutingArea.Visible = this.scoutingCheck.Checked; image15.addControl(this.scoutingArea); CustomSelfDrawPanel.CSDLabel label13 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Auto_Scouting2", "Scout within your Parishes"), Position = new Point(0, 0), Color = ARGBColors.Black, Size = new Size(0x18e, this.scoutingArea.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT }; this.scoutingArea.addControl(label13); CustomSelfDrawPanel.CSDImage image17 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_bits[14], Position = new Point(0, 1) }; this.scoutingArea.addControl(image17); CustomSelfDrawPanel.CSDImage image18 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_gradation_band, Position = new Point(0x26, 170) }; panel3.addControl(image18); CustomSelfDrawPanel.CSDImage image19 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[0x18], Position = new Point(-4, -4) }; if (delegate4 == null) { delegate4 = delegate { this.attackCheck.Checked = !this.attackCheck.Checked; this.attackToggled(); }; } image19.setClickDelegate(delegate4, "Generic_check_box_toggled"); image19.CustomTooltipID = 0x57b; image18.addControl(image19); this.attackCheck.Position = new Point(-30, 2); this.attackCheck.CheckedImage = (Image) GFXLibrary.checkbox_checked; this.attackCheck.UncheckedImage = (Image) GFXLibrary.checkbox_unchecked; this.attackCheck.Checked = RemoteServices.Instance.UserOptions.autoAttack; this.attackCheck.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.attackToggled)); this.attackCheck.CustomTooltipID = 0x57b; image18.addControl(this.attackCheck); CustomSelfDrawPanel.CSDLabel label14 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Auto_Attack", "Auto Attack"), Position = new Point(40, 0), Color = ARGBColors.Black, Size = new Size(140, image18.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; image18.addControl(label14); this.attackArea.Position = new Point(0x87, -20); this.attackArea.Size = new Size(0x1ac, image18.Height + 40); this.attackArea.Visible = this.attackCheck.Checked; image18.addControl(this.attackArea); this.attackCheck_Bandits.Position = new Point(0, 1); this.attackCheck_Bandits.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.attackCheck_Bandits.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.attackCheck_Bandits.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.attackCheck_Bandits.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.attackCheck_Bandits.Checked = RemoteServices.Instance.UserOptions.autoAttackBandit; this.attackCheck_Bandits.CustomTooltipID = 0x581; this.attackArea.addControl(this.attackCheck_Bandits); CustomSelfDrawPanel.CSDImage image20 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.scout_screen_icons[0x18], Position = new Point(-20, -11) }; this.attackCheck_Bandits.addControl(image20); this.attackCheck_Wolves.Position = new Point(0x55, 1); this.attackCheck_Wolves.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.attackCheck_Wolves.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.attackCheck_Wolves.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.attackCheck_Wolves.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.attackCheck_Wolves.Checked = RemoteServices.Instance.UserOptions.autoAttackWolf; this.attackCheck_Wolves.CustomTooltipID = 0x582; this.attackArea.addControl(this.attackCheck_Wolves); CustomSelfDrawPanel.CSDImage image21 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.scout_screen_icons[0x19], Position = new Point(-8, -14) }; this.attackCheck_Wolves.addControl(image21); this.attackCheck_AI.Position = new Point(170, 1); this.attackCheck_AI.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.attackCheck_AI.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.attackCheck_AI.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.attackCheck_AI.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.attackCheck_AI.Checked = RemoteServices.Instance.UserOptions.autoAttackAI; this.attackCheck_AI.CustomTooltipID = 0x583; this.attackArea.addControl(this.attackCheck_AI); CustomSelfDrawPanel.CSDImage image22 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.scout_screen_icons[0x1c], Position = new Point(-17, -11) }; this.attackCheck_AI.addControl(image22); CustomSelfDrawPanel.CSDImage image23 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_gradation_band, Position = new Point(0x26, 240) }; panel3.addControl(image23); CustomSelfDrawPanel.CSDImage image24 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[0], Position = new Point(-4, -4) }; if (delegate5 == null) { delegate5 = delegate { this.recruitCheck.Checked = !this.recruitCheck.Checked; this.recruitToggled(); }; } image24.setClickDelegate(delegate5, "Generic_check_box_toggled"); image24.CustomTooltipID = 0x57c; image23.addControl(image24); this.recruitCheck.Position = new Point(-30, 2); this.recruitCheck.CheckedImage = (Image) GFXLibrary.checkbox_checked; this.recruitCheck.UncheckedImage = (Image) GFXLibrary.checkbox_unchecked; this.recruitCheck.Checked = RemoteServices.Instance.UserOptions.autoRecruit; this.recruitCheck.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.recruitToggled)); this.recruitCheck.CustomTooltipID = 0x57c; image23.addControl(this.recruitCheck); CustomSelfDrawPanel.CSDLabel label15 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Auto_Recruit", "Auto Recruit"), Position = new Point(40, 0), Color = ARGBColors.Black, Size = new Size(140, image23.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; image23.addControl(label15); this.recruitArea.Position = new Point(0x87, -20); this.recruitArea.Size = new Size(0x1ac, ((image23.Height + 40) + 40) + 30); this.recruitArea.Visible = this.recruitCheck.Checked; image23.addControl(this.recruitArea); this.recruitCheck_Peasants.Position = new Point(0, 1); this.recruitCheck_Peasants.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.recruitCheck_Peasants.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.recruitCheck_Peasants.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.recruitCheck_Peasants.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.recruitCheck_Peasants.Checked = RemoteServices.Instance.UserOptions.autoRecruitPeasants; this.recruitCheck_Peasants.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.recruitToggledUnit)); this.recruitCheck_Peasants.CustomTooltipID = 0x584; this.recruitArea.addControl(this.recruitCheck_Peasants); this.recruitTrackBar_Peasants.Position = new Point(this.recruitCheck_Peasants.Position.X + 3, 0x4b); this.recruitTrackBar_Peasants.Margin = new Rectangle(0, -4, 0, 0); this.recruitTrackBar_Peasants.Max = 50; this.recruitTrackBar_Peasants.Value = RemoteServices.Instance.UserOptions.autoRecruitPeasants_Caps / 10; this.recruitTrackBar_Peasants.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.recruitTracksMoved)); this.recruitArea.addControl(this.recruitTrackBar_Peasants); this.recruitTrackBar_Peasants.Create((Image) GFXLibrary.logout_slider_back2, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb); this.recruitNumber_Peasants.Text = "0"; this.recruitNumber_Peasants.Position = new Point(this.recruitCheck_Peasants.Position.X, 0x69); this.recruitNumber_Peasants.Color = ARGBColors.Black; this.recruitNumber_Peasants.Size = new Size(this.recruitCheck_Peasants.Width, 20); this.recruitNumber_Peasants.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.recruitNumber_Peasants.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.recruitArea.addControl(this.recruitNumber_Peasants); CustomSelfDrawPanel.CSDImage image25 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_bits[9], Position = new Point(0, 0) }; this.recruitCheck_Peasants.addControl(image25); this.recruitCheck_Archers.Position = new Point(0x55, 1); this.recruitCheck_Archers.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.recruitCheck_Archers.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.recruitCheck_Archers.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.recruitCheck_Archers.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.recruitCheck_Archers.Checked = RemoteServices.Instance.UserOptions.autoRecruitArchers; this.recruitCheck_Archers.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.recruitToggledUnit)); this.recruitCheck_Archers.CustomTooltipID = 0x585; this.recruitArea.addControl(this.recruitCheck_Archers); this.recruitTrackBar_Archers.Position = new Point(this.recruitCheck_Archers.Position.X + 3, 0x4b); this.recruitTrackBar_Archers.Margin = new Rectangle(0, -4, 0, 0); this.recruitTrackBar_Archers.Max = 50; this.recruitTrackBar_Archers.Value = RemoteServices.Instance.UserOptions.autoRecruitArchers_Caps / 10; this.recruitTrackBar_Archers.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.recruitTracksMoved)); this.recruitArea.addControl(this.recruitTrackBar_Archers); this.recruitTrackBar_Archers.Create((Image) GFXLibrary.logout_slider_back2, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb); this.recruitNumber_Archers.Text = "0"; this.recruitNumber_Archers.Position = new Point(this.recruitCheck_Archers.Position.X, 0x69); this.recruitNumber_Archers.Color = ARGBColors.Black; this.recruitNumber_Archers.Size = new Size(this.recruitCheck_Archers.Width, 20); this.recruitNumber_Archers.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.recruitNumber_Archers.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.recruitArea.addControl(this.recruitNumber_Archers); CustomSelfDrawPanel.CSDImage image26 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_bits[10], Position = new Point(0, 0) }; this.recruitCheck_Archers.addControl(image26); this.recruitCheck_Pikemen.Position = new Point(170, 1); this.recruitCheck_Pikemen.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.recruitCheck_Pikemen.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.recruitCheck_Pikemen.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.recruitCheck_Pikemen.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.recruitCheck_Pikemen.Checked = RemoteServices.Instance.UserOptions.autoRecruitPikemen; this.recruitCheck_Pikemen.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.recruitToggledUnit)); this.recruitCheck_Pikemen.CustomTooltipID = 0x586; this.recruitArea.addControl(this.recruitCheck_Pikemen); this.recruitTrackBar_Pikemen.Position = new Point(this.recruitCheck_Pikemen.Position.X + 3, 0x4b); this.recruitTrackBar_Pikemen.Margin = new Rectangle(0, -4, 0, 0); this.recruitTrackBar_Pikemen.Max = 50; this.recruitTrackBar_Pikemen.Value = RemoteServices.Instance.UserOptions.autoRecruitPikemen_Caps / 10; this.recruitTrackBar_Pikemen.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.recruitTracksMoved)); this.recruitArea.addControl(this.recruitTrackBar_Pikemen); this.recruitTrackBar_Pikemen.Create((Image) GFXLibrary.logout_slider_back2, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb); this.recruitNumber_Pikemen.Text = "0"; this.recruitNumber_Pikemen.Position = new Point(this.recruitCheck_Pikemen.Position.X, 0x69); this.recruitNumber_Pikemen.Color = ARGBColors.Black; this.recruitNumber_Pikemen.Size = new Size(this.recruitCheck_Pikemen.Width, 20); this.recruitNumber_Pikemen.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.recruitNumber_Pikemen.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.recruitArea.addControl(this.recruitNumber_Pikemen); CustomSelfDrawPanel.CSDImage image27 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_bits[11], Position = new Point(0, 0) }; this.recruitCheck_Pikemen.addControl(image27); this.recruitCheck_Swordsmen.Position = new Point(0xff, 1); this.recruitCheck_Swordsmen.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.recruitCheck_Swordsmen.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.recruitCheck_Swordsmen.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.recruitCheck_Swordsmen.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.recruitCheck_Swordsmen.Checked = RemoteServices.Instance.UserOptions.autoRecruitSwordsmen; this.recruitCheck_Swordsmen.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.recruitToggledUnit)); this.recruitCheck_Swordsmen.CustomTooltipID = 0x587; this.recruitArea.addControl(this.recruitCheck_Swordsmen); this.recruitTrackBar_Swordsmen.Position = new Point(this.recruitCheck_Swordsmen.Position.X + 3, 0x4b); this.recruitTrackBar_Swordsmen.Margin = new Rectangle(0, -4, 0, 0); this.recruitTrackBar_Swordsmen.Max = 50; this.recruitTrackBar_Swordsmen.Value = RemoteServices.Instance.UserOptions.autoRecruitSwordsmen_Caps / 10; this.recruitTrackBar_Swordsmen.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.recruitTracksMoved)); this.recruitArea.addControl(this.recruitTrackBar_Swordsmen); this.recruitTrackBar_Swordsmen.Create((Image) GFXLibrary.logout_slider_back2, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb); this.recruitNumber_Swordsmen.Text = "0"; this.recruitNumber_Swordsmen.Position = new Point(this.recruitCheck_Swordsmen.Position.X, 0x69); this.recruitNumber_Swordsmen.Color = ARGBColors.Black; this.recruitNumber_Swordsmen.Size = new Size(this.recruitCheck_Swordsmen.Width, 20); this.recruitNumber_Swordsmen.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.recruitNumber_Swordsmen.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.recruitArea.addControl(this.recruitNumber_Swordsmen); CustomSelfDrawPanel.CSDImage image28 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_bits[12], Position = new Point(0, 0) }; this.recruitCheck_Swordsmen.addControl(image28); this.recruitCheck_Catapults.Position = new Point(340, 1); this.recruitCheck_Catapults.CheckedImage = (Image) GFXLibrary.logout_bits[2]; this.recruitCheck_Catapults.UncheckedImage = (Image) GFXLibrary.logout_bits[0]; this.recruitCheck_Catapults.CheckedOverImage = (Image) GFXLibrary.logout_bits[3]; this.recruitCheck_Catapults.UncheckedOverImage = (Image) GFXLibrary.logout_bits[1]; this.recruitCheck_Catapults.Checked = RemoteServices.Instance.UserOptions.autoRecruitCatapults; this.recruitCheck_Catapults.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.recruitToggledUnit)); this.recruitCheck_Catapults.CustomTooltipID = 0x588; this.recruitArea.addControl(this.recruitCheck_Catapults); this.recruitTrackBar_Catapults.Position = new Point(this.recruitCheck_Catapults.Position.X + 3, 0x4b); this.recruitTrackBar_Catapults.Margin = new Rectangle(0, -4, 0, 0); this.recruitTrackBar_Catapults.Max = 50; this.recruitTrackBar_Catapults.Value = RemoteServices.Instance.UserOptions.autoRecruitCatapults_Caps / 5; this.recruitTrackBar_Catapults.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.recruitTracksMoved)); this.recruitArea.addControl(this.recruitTrackBar_Catapults); this.recruitTrackBar_Catapults.Create((Image) GFXLibrary.logout_slider_back2, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb, (Image) GFXLibrary.logout_slider_thumb); this.recruitNumber_Catapults.Text = "0"; this.recruitNumber_Catapults.Position = new Point(this.recruitCheck_Catapults.Position.X, 0x69); this.recruitNumber_Catapults.Color = ARGBColors.Black; this.recruitNumber_Catapults.Size = new Size(this.recruitCheck_Catapults.Width, 20); this.recruitNumber_Catapults.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.recruitNumber_Catapults.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.recruitArea.addControl(this.recruitNumber_Catapults); CustomSelfDrawPanel.CSDImage image29 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_bits[13], Position = new Point(0, 0) }; this.recruitCheck_Catapults.addControl(image29); this.recruitmentInfoLabel.Text = SK.Text("Logout_Recruitment_Cap", "Set Recruitment Cap"); this.recruitmentInfoLabel.Position = new Point(-7, 0x7d); this.recruitmentInfoLabel.Color = ARGBColors.Black; this.recruitmentInfoLabel.Size = new Size(this.recruitArea.Width, 0x17); this.recruitmentInfoLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.recruitmentInfoLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.recruitArea.addControl(this.recruitmentInfoLabel); this.recruitTracksMoved(); this.updateRecruitVisibility(); CustomSelfDrawPanel.CSDImage image30 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_gradation_band, Position = new Point(0x26, 310), Visible = false }; panel3.addControl(image30); CustomSelfDrawPanel.CSDImage image31 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[1], Position = new Point(-4, -4) }; if (delegate6 == null) { delegate6 = delegate { this.transferCheck.Checked = !this.transferCheck.Checked; this.transferToggled(); }; } image31.setClickDelegate(delegate6, "Generic_check_box_toggled"); image31.CustomTooltipID = 0x57e; image30.addControl(image31); this.transferCheck.Position = new Point(-30, 2); this.transferCheck.CheckedImage = (Image) GFXLibrary.checkbox_checked; this.transferCheck.UncheckedImage = (Image) GFXLibrary.checkbox_unchecked; this.transferCheck.Checked = false; this.transferCheck.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.transferToggled)); this.transferCheck.CustomTooltipID = 0x57e; image30.addControl(this.transferCheck); CustomSelfDrawPanel.CSDLabel label16 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Auto_transfer", "Auto Transfer"), Position = new Point(40, 0), Color = ARGBColors.Black, Size = new Size(140, image30.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; image30.addControl(label16); this.transferArea.Position = new Point(0x87, -20); this.transferArea.Size = new Size(0x1ac, image30.Height + 40); this.transferArea.Visible = this.transferCheck.Checked; image30.addControl(this.transferArea); CustomSelfDrawPanel.CSDImage image32 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_gradation_band, Position = new Point(0x26, 380), Visible = false }; panel3.addControl(image32); CustomSelfDrawPanel.CSDImage image33 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.wl_moving_unit_icons[0x19], Position = new Point(-4, -4) }; if (delegate7 == null) { delegate7 = delegate { this.repairCheck.Checked = !this.repairCheck.Checked; this.repairToggled(); }; } image33.setClickDelegate(delegate7, "Generic_check_box_toggled"); image33.CustomTooltipID = 0x57d; image32.addControl(image33); this.repairCheck.Position = new Point(-30, 2); this.repairCheck.CheckedImage = (Image) GFXLibrary.checkbox_checked; this.repairCheck.UncheckedImage = (Image) GFXLibrary.checkbox_unchecked; this.repairCheck.Checked = false; this.repairCheck.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.repairToggled)); this.repairCheck.CustomTooltipID = 0x57d; image32.addControl(this.repairCheck); CustomSelfDrawPanel.CSDLabel label17 = new CustomSelfDrawPanel.CSDLabel { Text = SK.Text("LogoutPanel_Auto_Rebuild", "Auto Rebuild"), Position = new Point(40, 0), Color = ARGBColors.Black, Size = new Size(140, image32.Height), Font = FontManager.GetFont("Arial", 8f, FontStyle.Regular), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT }; image32.addControl(label17); this.repairArea.Position = new Point(0x87, -20); this.repairArea.Size = new Size(0x1ac, image32.Height + 40); this.repairArea.Visible = this.repairCheck.Checked; image32.addControl(this.repairArea); CustomSelfDrawPanel.CSDImage image34 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.logout_bits[4], Position = new Point(0, 0) }; this.repairArea.addControl(image34); } if ((!GameEngine.Instance.World.isBigpointAccount && !Program.bigpointInstall) && (!Program.aeriaInstall && !Program.bigpointPartnerInstall)) { CustomSelfDrawPanel.CSDButton button2 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.banner_ad_friend, OverBrighten = true, Position = new Point(0x177, 0x1f0) }; button2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.friendClicked), "LogoutPanel_invite_a_friend"); this.mainBackgroundImage.addControl(button2); } if (normalLogout && !advertOnly) { CustomSelfDrawPanel.CSDButton button3 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.mail2_button_blue_141wide_normal, ImageOver = (Image) GFXLibrary.mail2_button_blue_141wide_over, ImageClick = (Image) GFXLibrary.mail2_button_blue_141wide_pushed, Position = new Point(0x1a7, 0x1c5) }; button3.Text.Text = SK.Text("LogoutPanel_Swap_Worlds", "Swap Worlds"); button3.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; button3.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); button3.TextYOffset = -2; button3.Text.Color = ARGBColors.Black; button3.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.doLogout), "LogoutPanel_swap_worlds"); button3.CustomTooltipID = 0x58c; control.addControl(button3); this.logoutPressed = false; } if (!advertOnly) { CustomSelfDrawPanel.CSDButton button4 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.mail2_button_blue_141wide_normal, ImageOver = (Image) GFXLibrary.mail2_button_blue_141wide_over, ImageClick = (Image) GFXLibrary.mail2_button_blue_141wide_pushed, Position = new Point(0x313, 0x1c5) }; button4.Text.Text = SK.Text("GENERIC_Exit", "Exit"); button4.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; button4.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); button4.TextYOffset = -2; button4.Text.Color = ARGBColors.Black; button4.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.doQuit), "LogoutPanel_exit"); button4.CustomTooltipID = 0x58a; control.addControl(button4); } if (normalLogout && !advertOnly) { CustomSelfDrawPanel.CSDButton button5 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.mail2_button_blue_141wide_normal, ImageOver = (Image) GFXLibrary.mail2_button_blue_141wide_over, ImageClick = (Image) GFXLibrary.mail2_button_blue_141wide_pushed, Position = new Point(0x25d, 0x1c5) }; button5.Text.Text = SK.Text("GENERIC_Cancel", "Cancel"); button5.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; button5.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); button5.TextYOffset = -2; button5.Text.Color = ARGBColors.Black; button5.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "LogoutPanel_cancel"); button5.CustomTooltipID = 0x58b; control.addControl(button5); } else if (advertOnly) { CustomSelfDrawPanel.CSDButton button6 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.mail2_button_blue_141wide_normal, ImageOver = (Image) GFXLibrary.mail2_button_blue_141wide_over, ImageClick = (Image) GFXLibrary.mail2_button_blue_141wide_pushed, Position = new Point(0x25d, 0x1c5) }; button6.Text.Text = SK.Text("GENERIC_OK", "OK"); button6.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; button6.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold); button6.TextYOffset = -2; button6.Text.Color = ARGBColors.Black; button6.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "LogoutPanel_cancel"); control.addControl(button6); } this.update(); }
public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; this.InplayPanelWidth = (this.ContentWidth - BorderPadding) - this.AvailablePanelWidth; CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image) GFXLibrary.cardpanel_panel_back_top_left, (Image) GFXLibrary.cardpanel_panel_back_top_mid, (Image) GFXLibrary.cardpanel_panel_back_top_right, (Image) GFXLibrary.cardpanel_panel_back_mid_left, (Image) GFXLibrary.cardpanel_panel_back_mid_mid, (Image) GFXLibrary.cardpanel_panel_back_mid_right, (Image) GFXLibrary.cardpanel_panel_back_bottom_left, (Image) GFXLibrary.cardpanel_panel_back_bottom_mid, (Image) GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 550); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 550); this.AvailablePanel.Alpha = 0.8f; this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); this.sortBack.Image = (Image) GFXLibrary.sort_back; this.sortBack.Position = new Point(12, this.AvailablePanel.Height - 0x25); this.sortBack.Visible = true; this.AvailablePanel.addControl(this.sortBack); this.sortByName.ImageNorm = (Image) GFXLibrary.sort_normal; this.sortByName.ImageOver = (Image) GFXLibrary.sort_over; this.sortByName.ImageClick = (Image) GFXLibrary.sort_in; this.sortByName.Position = new Point(7, 4); this.sortByName.Text.Text = SK.Text("Card_Sorting_Name", "Sort By Name"); this.sortByName.Text.Color = ARGBColors.White; this.sortByName.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.sortByName.TextYOffset = -1; this.sortByName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortByNameClicked), "PlayCardsPanel_sort_by_name"); this.sortBack.addControl(this.sortByName); this.sortByType.ImageNorm = (Image) GFXLibrary.sort_normal; this.sortByType.ImageOver = (Image) GFXLibrary.sort_over; this.sortByType.ImageClick = (Image) GFXLibrary.sort_in; this.sortByType.Position = new Point(0xe4, 4); this.sortByType.Text.Text = SK.Text("Card_Sorting_Type", "Sort By Type"); this.sortByType.Text.Color = ARGBColors.White; this.sortByType.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.sortByType.TextYOffset = -1; this.sortByType.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortByTypeClicked), "PlayCardsPanel_sort_by_type"); this.sortBack.addControl(this.sortByType); this.sortByQuantity.ImageNorm = (Image) GFXLibrary.sort_normal; this.sortByQuantity.ImageOver = (Image) GFXLibrary.sort_over; this.sortByQuantity.ImageClick = (Image) GFXLibrary.sort_in; this.sortByQuantity.Position = new Point(0x1c1, 4); this.sortByQuantity.Text.Text = SK.Text("Card_Sorting_Quantity", "Sort By Quantity"); this.sortByQuantity.Text.Color = ARGBColors.White; this.sortByQuantity.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.sortByQuantity.TextYOffset = -1; this.sortByQuantity.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortByQuantityClicked), "PlayCardsPanel_sort_by_type"); this.sortBack.addControl(this.sortByQuantity); this.sortByRarity.ImageNorm = (Image) GFXLibrary.sort_normal; this.sortByRarity.ImageOver = (Image) GFXLibrary.sort_over; this.sortByRarity.ImageClick = (Image) GFXLibrary.sort_in; this.sortByRarity.Position = new Point(0x170, 4); this.sortByRarity.Text.Text = SK.Text("Card_Sorting_Rarity", "Sort By Rarity"); this.sortByRarity.Text.Color = ARGBColors.White; this.sortByRarity.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.sortByRarity.TextYOffset = -1; this.sortByRarity.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortByRarityClicked), "PlayCardsPanel_sort_by_rarity"); this.compressButton.ImageNorm = (Image) GFXLibrary.r_popularity_panel_but_minus_norm; this.compressButton.ImageOver = (Image) GFXLibrary.r_popularity_panel_but_minus_over; this.compressButton.ImageClick = (Image) GFXLibrary.r_popularity_panel_but_minus_in; this.compressButton.Position = new Point(0x2a5, 0x10); this.compressButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.compressClicked), "PlayCardsPanel_compress_cards"); this.sortBack.addControl(this.compressButton); this.expandButton.ImageNorm = (Image) GFXLibrary.r_popularity_panel_but_plus_norm; this.expandButton.ImageOver = (Image) GFXLibrary.r_popularity_panel_but_plus_over; this.expandButton.ImageClick = (Image) GFXLibrary.r_popularity_panel_but_plus_in; this.expandButton.Position = new Point(0x2a5, -2); this.expandButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.expandClicked), "PlayCardsPanel_expand_cards"); this.sortBack.addControl(this.expandButton); if ((this.sortByMode == 0) || (this.sortByMode == 2)) { this.sortByName.Alpha = 0.5f; this.sortByType.Alpha = 1f; this.sortByQuantity.Alpha = 0.5f; } else if ((this.sortByMode == 1) || (this.sortByMode == 3)) { this.sortByName.Alpha = 1f; this.sortByType.Alpha = 0.5f; this.sortByQuantity.Alpha = 0.5f; } else if ((this.sortByMode == 7) || (this.sortByMode == 8)) { this.sortByName.Alpha = 0.5f; this.sortByType.Alpha = 0.5f; this.sortByQuantity.Alpha = 1f; } else { this.sortByName.Alpha = 1f; this.sortByType.Alpha = 1f; this.sortByQuantity.Alpha = 1f; } int width = base.Width; int borderPadding = BorderPadding; int num3 = this.AvailablePanel.Width; this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "Cards_Close"); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.closeImage.CustomTooltipID = 0x2774; this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundImage, 0x19, new Point((((base.Width - 1) - 0x11) - 50) + 3, 5), true); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); CustomSelfDrawPanel.UICardsButtons buttons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow) base.ParentForm) { Position = new Point(0x328, 0x25) }; this.mainBackgroundImage.addControl(buttons); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(600, 0x40); this.labelTitle.Text = ""; this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); if (cardSection != 0) { CustomSelfDrawPanel.CSDButton button = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.button_cards_all_normal, ImageOver = (Image) GFXLibrary.button_cards_all_over, ImageClick = (Image) GFXLibrary.button_cards_all_over, Position = new Point(390, 0) }; button.Text.Text = SK.Text("PlayCardsPanel_All_Your_Cards", "All Your Cards"); button.TextYOffset = -3; button.Text.Color = ARGBColors.Black; button.Text.Size = new Size(button.Size.Width - 0x2d, button.Size.Height); button.Text.Position = new Point(0x2d, 0); button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.showAllCardsClick), "PlayCardsPanel_show_all_cards"); this.mainBackgroundImage.addControl(button); } CustomSelfDrawPanel.CSDButton button2 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image) GFXLibrary.button_cards_in_play_normal, ImageOver = (Image) GFXLibrary.button_cards_in_play_over, ImageClick = (Image) GFXLibrary.button_cards_in_play_over, Position = new Point(570, 0) }; button2.Text.Text = SK.Text("PlayCardsPanel_Cards_In_Play", "Cards In Play"); button2.TextYOffset = -3; button2.Text.Color = ARGBColors.Black; button2.Text.Size = new Size(button2.Size.Width - 30, button2.Size.Height); button2.Text.Position = new Point(30, 0); button2.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); button2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.showCardsInPlay), "PlayCardsPanel_cards_in_play"); this.mainBackgroundImage.addControl(button2); this.searchButton.ImageNorm = (Image) GFXLibrary.int_statsscreen_search_button_normal; this.searchButton.ImageOver = (Image) GFXLibrary.int_statsscreen_search_button_over; this.searchButton.ImageClick = (Image) GFXLibrary.int_statsscreen_search_button_pushed; this.searchButton.Position = new Point(0x32b, 7); this.searchButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.searchClicked), "StatsPanel_search"); this.searchButton.CustomTooltipID = 0x284f; this.searchButton.Visible = true; this.mainBackgroundImage.addControl(this.searchButton); this.clearSearchButton.ImageNorm = (Image) GFXLibrary.int_statsscreen_search_clear_button_normal; this.clearSearchButton.ImageOver = (Image) GFXLibrary.int_statsscreen_search_clear_button_over; this.clearSearchButton.ImageClick = (Image) GFXLibrary.int_statsscreen_search_clear_button_pushed; this.clearSearchButton.Position = new Point(740, 7); this.clearSearchButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clearSearchClicked), "StatsPanel_clear_search"); this.clearSearchButton.Visible = false; this.clearSearchButton.CustomTooltipID = 0x2850; this.mainBackgroundImage.addControl(this.clearSearchButton); CardTypes.CardDefinition filter = new CardTypes.CardDefinition { cardCategory = cardSection }; if ((GameEngine.Instance.World.getTutorialStage() == 8) || (GameEngine.Instance.World.getTutorialStage() == 12)) { filter.rewardcard = true; } filter.rewardcard = true; GameEngine.Instance.World.searchProfileCards(filter, "", ((PlayCardsWindow) base.ParentForm).getNameSearchText()); if (cardSection < 15) { this.sectionName = CardSections.getName(cardSection); } else { this.sectionName = Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(CardFilters.getName2(cardSection).ToLower()); } this.labelTitle.Text = this.sectionName + " : " + GameEngine.Instance.World.ProfileCardsSearch.Count.ToString(); this.GetCardsAvailable(false); this.RenderCards(); this.mainBackgroundImage.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.mouseWheelHandler)); if (cardSection == 0) { this.InitFilters(); } if (cardSection == 0) { ((PlayCardsWindow) base.ParentForm).tbSearchBox.Visible = !this.searchButton.Visible; } else { ((PlayCardsWindow) base.ParentForm).tbSearchBox.Visible = false; } base.Invalidate(); }
public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image) GFXLibrary.cardpanel_panel_back_top_left, (Image) GFXLibrary.cardpanel_panel_back_top_mid, (Image) GFXLibrary.cardpanel_panel_back_top_right, (Image) GFXLibrary.cardpanel_panel_back_mid_left, (Image) GFXLibrary.cardpanel_panel_back_mid_mid, (Image) GFXLibrary.cardpanel_panel_back_mid_right, (Image) GFXLibrary.cardpanel_panel_back_bottom_left, (Image) GFXLibrary.cardpanel_panel_back_bottom_mid, (Image) GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 550); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 550); this.AvailablePanel.Alpha = 0.8f; int width = base.Width; int borderPadding = BorderPadding; int num9 = this.AvailablePanel.Width; this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick)); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundImage, 0x26, new Point((((base.Width - 1) - 0x11) - 50) + 3, 5), true); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); this.greyout.FillColor = Color.FromArgb(0xd7, 0x19, 0x19, 0x19); this.greyout.Size = new Size(this.mainBackgroundImage.Width, this.AvailablePanel.Y + this.AvailablePanel.Height); this.greyout.Position = new Point(0, 0); this.greyout.setClickDelegate(delegate { }); CustomSelfDrawPanel.CSDImage closeGrey = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_button_close_normal, Size = this.closeImage.Image.Size }; closeGrey.setMouseOverDelegate(() => closeGrey.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => closeGrey.Image = (Image) GFXLibrary.cardpanel_button_close_normal); closeGrey.Position = new Point((base.Width - 14) - 0x11, 10); this.greyout.addControl(closeGrey); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(0x3a7, 0x40); this.labelTitle.Text = SK.Text("BuyCrownsPanel_Buy_Crowns", "Buy Crowns"); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); CustomSelfDrawPanel.UICardsButtons buttons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow) base.ParentForm) { Position = new Point(0x328, 0x25) }; this.mainBackgroundImage.addControl(buttons); this.cardButtons = buttons; List<ProductInfo> productList = new List<ProductInfo>(); if (Program.steamActive) { this.PlayerCountry = "UK"; this.PlayerCurrency = "GBP"; this.PlayerLanguage = MySettings.load().LanguageIdent; XmlRpcAuthProvider provider = XmlRpcAuthProvider.CreateForEndpoint(URLs.ProfileProtocol, URLs.ProfileServerAddressLogin, URLs.ProfileServerPort, URLs.ProfilePath); XmlRpcAuthRequest req = new XmlRpcAuthRequest(RemoteServices.Instance.UserGuid.ToString().Replace("-", ""), "", "", "", null, null, null, null) { SteamID = Program.steamID, SessionID = RemoteServices.Instance.SessionGuid.ToString().Replace("-", ""), Culture = this.PlayerLanguage, Currency = this.PlayerCurrency, Country = this.PlayerCountry }; productList = provider.SteamGetProductList(req, null, this, 0x3a98).ProductList; } else if (Program.aeriaInstall) { XmlRpcAuthProvider provider2 = XmlRpcAuthProvider.CreateForEndpoint(URLs.ProfileProtocol, URLs.ProfileServerAddressLogin, URLs.ProfileServerPort, URLs.ProfilePath); XmlRpcAuthRequest request2 = new XmlRpcAuthRequest(RemoteServices.Instance.UserGuid.ToString().Replace("-", ""), "", "", "", null, null, null, null); XmlRpcAuthResponse response = null; this.storedAeriaPoints = provider2.AeriaGetBalance(request2, null, this, 0x3a98, ref response); productList = response.ProductList; this.buyAPButton.ImageNorm = (Image) GFXLibrary.misc_button_blue_210wide_normal; this.buyAPButton.ImageOver = (Image) GFXLibrary.misc_button_blue_210wide_over; this.buyAPButton.ImageClick = (Image) GFXLibrary.misc_button_blue_210wide_pushed; this.buyAPButton.Position = new Point(0x13d, 0x49); this.buyAPButton.Text.Text = this.storedAeriaPoints.ToString(); this.buyAPButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT; this.buyAPButton.Text.Size = new Size((this.buyAPButton.Width / 2) - 3, this.buyAPButton.Height); this.buyAPButton.TextYOffset = -2; this.buyAPButton.Text.Color = ARGBColors.Black; this.buyAPButton.ImageIcon = (Image) GFXLibrary.aeriaPoints; this.buyAPButton.ImageIconPosition = new Point((this.buyAPButton.Width / 2) + 3, 1); this.buyAPButton.Text.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.buyAPButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.purchaseAP)); this.buyAPButton.CustomTooltipID = 0x286e; this.mainBackgroundImage.addControl(this.buyAPButton); } int y = 0x42; int num2 = 0x5e; int num3 = -1; if (Program.aeriaInstall) { y = 0x84; } NumberFormatInfo nFI = GameEngine.NFI; NumberFormatInfo info2 = GameEngine.NFI_D2; foreach (ProductInfo info3 in productList) { num3++; int x = num2; if (Program.steamActive) { if (num3 > 3) { if (num3 == 4) { y = 0x84; } x += 350; } } else if (Program.aeriaInstall && (num3 > 2)) { if (num3 == 3) { y = 0x84; } x += 350; } CustomSelfDrawPanel.CSDLabel label = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label3 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label4 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label5 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDImage image3 = new CustomSelfDrawPanel.CSDImage(); CustomSelfDrawPanel.CSDImage crownsbutton = new CustomSelfDrawPanel.CSDImage(); CustomSelfDrawPanel.CSDImage orderbutton = new CustomSelfDrawPanel.CSDImage(); crownsbutton.Image = (Image) GFXLibrary.cardpanel_payment_button_crowns_normal; crownsbutton.Position = new Point(x, y); crownsbutton.Height = crownsbutton.Image.Height; crownsbutton.Width = crownsbutton.Image.Width; crownsbutton.setMouseOverDelegate(() => crownsbutton.Image = (Image) GFXLibrary.cardpanel_payment_button_crowns_over, () => crownsbutton.Image = (Image) GFXLibrary.cardpanel_payment_button_crowns_normal); crownsbutton.Tag = info3; crownsbutton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); this.mainBackgroundImage.addControl(crownsbutton); x += crownsbutton.Width + 0x20; orderbutton.Image = (Image) GFXLibrary.cardpanel_payment_button_greywhite_normal; orderbutton.Position = new Point(x, (y + 0x12) + 3); orderbutton.Height = orderbutton.Image.Height; orderbutton.Width = orderbutton.Image.Width; orderbutton.setMouseOverDelegate(() => orderbutton.Image = (Image) GFXLibrary.cardpanel_payment_button_greywhite_over, () => orderbutton.Image = (Image) GFXLibrary.cardpanel_payment_button_greywhite_normal); orderbutton.Tag = info3; orderbutton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label5.Text = this.strOrderNow; label5.Position = new Point(0, 0); label5.Width = orderbutton.Width; label5.Height = orderbutton.Height; label5.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; label5.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); orderbutton.addControl(label5); label5.Tag = info3; label5.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); int num5 = 14; int num6 = 0; if (Program.mySettings.LanguageIdent == "fr") { num5 = 13; num6 = -5; } label.Text = info3.Strikethrough.ToString(); label.Position = new Point(0x74 + num6, 0x15); label.Width = 300; label.Height = 0x18; label.Font = FontManager.GetFont("Arial", (float) num5, FontStyle.Strikeout); label.Color = ARGBColors.Black; crownsbutton.addControl(label); label.Tag = info3; label.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label.Size = label.TextSizeX; label2.Text = info3.Crowns.ToString(); label2.Position = new Point(label.X + label.Width, label.Y); label2.Font = FontManager.GetFont("Arial", (float) num5, FontStyle.Bold); label2.Color = ARGBColors.Purple; label2.Width = 300; label2.Height = 0x18; crownsbutton.addControl(label2); label2.Tag = info3; label2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label2.Size = label2.TextSizeX; label3.Text = this.strCrowns; label3.Position = new Point((label2.X + label2.Width) + num6, label2.Y); label3.Font = FontManager.GetFont("Arial", (float) num5, FontStyle.Bold); label3.Color = ARGBColors.Black; label3.Size = new Size(300, 0x18); crownsbutton.addControl(label3); label3.Tag = info3; label3.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label3.Size = label3.TextSizeX; if (Program.aeriaInstall) { label4.Text = " " + ((int) info3.Cost).ToString("F", nFI); } else { label4.Text = info3.Currency + " " + info3.Cost.ToString("F", info2); } label4.Position = new Point(label.X, (label.Y + label.Height) + 4); label4.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); label4.Color = ARGBColors.Black; label4.Size = new Size(300, 0x18); crownsbutton.addControl(label4); label4.Tag = info3; label4.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label4.Size = label4.TextSizeX; if (Program.aeriaInstall) { image3.Image = (Image) GFXLibrary.aeriaPoints; label4.Position = new Point(label.X + 20, label.Y + label.Height); image3.Position = new Point(label.X, (((label.Y + label.Height) + 4) - 2) - 3); image3.Tag = info3; crownsbutton.addControl(image3); } y += crownsbutton.Height + 40; } this.mainBackgroundImage.invalidate(); }
public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image)GFXLibrary.cardpanel_panel_back_top_left, (Image)GFXLibrary.cardpanel_panel_back_top_mid, (Image)GFXLibrary.cardpanel_panel_back_top_right, (Image)GFXLibrary.cardpanel_panel_back_mid_left, (Image)GFXLibrary.cardpanel_panel_back_mid_mid, (Image)GFXLibrary.cardpanel_panel_back_mid_right, (Image)GFXLibrary.cardpanel_panel_back_bottom_left, (Image)GFXLibrary.cardpanel_panel_back_bottom_mid, (Image)GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image)GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image)GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 550); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 550); this.AvailablePanel.Alpha = 0.8f; this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image)GFXLibrary.cardpanel_panel_black_top_left, (Image)GFXLibrary.cardpanel_panel_black_top_mid, (Image)GFXLibrary.cardpanel_panel_black_top_right, (Image)GFXLibrary.cardpanel_panel_black_mid_left, (Image)GFXLibrary.cardpanel_panel_black_mid_mid, (Image)GFXLibrary.cardpanel_panel_black_mid_right, (Image)GFXLibrary.cardpanel_panel_black_bottom_left, (Image)GFXLibrary.cardpanel_panel_black_bottom_mid, (Image)GFXLibrary.cardpanel_panel_black_bottom_right); this.cardsInPlay.init(cardSection, 0x70, false, 14, 3, 0); this.cardsInPlay.Position = new Point(0, 5); this.AvailablePanel.addControl(this.cardsInPlay); int width = base.Width; int borderPadding = BorderPadding; int num3 = this.AvailablePanel.Width; this.closeImage.Image = (Image)GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image)GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image)GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick)); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); this.greyout.FillColor = Color.FromArgb(0xd7, 0x19, 0x19, 0x19); this.greyout.Size = new Size(this.mainBackgroundImage.Width, this.AvailablePanel.Y + this.AvailablePanel.Height); this.greyout.Position = new Point(0, 0); this.greyout.setClickDelegate(delegate { }); CustomSelfDrawPanel.CSDImage closeGrey = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.cardpanel_button_close_normal, Size = this.closeImage.Image.Size }; closeGrey.setMouseOverDelegate(() => closeGrey.Image = (Image)GFXLibrary.cardpanel_button_close_over, () => closeGrey.Image = (Image)GFXLibrary.cardpanel_button_close_normal); closeGrey.Position = new Point((base.Width - 14) - 0x11, 10); this.greyout.addControl(closeGrey); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(0x3a7, 0x40); this.labelTitle.Text = SK.Text("ViewAllCardsPanel_Cards_In_Play", "Cards In Play"); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); CustomSelfDrawPanel.UICardsButtons buttons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow)base.ParentForm) { Position = new Point(0x328, 0x25) }; this.mainBackgroundImage.addControl(buttons); this.cardButtons = buttons; if (cardSection != 0) { CustomSelfDrawPanel.CSDButton button = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image)GFXLibrary.button_cards_all_normal, ImageOver = (Image)GFXLibrary.button_cards_all_over, ImageClick = (Image)GFXLibrary.button_cards_all_over, Position = new Point(750, 0) }; button.Text.Text = SK.Text("PlayCardsPanel_All_Your_Cards", "All Your Cards"); button.TextYOffset = -3; button.Text.Color = ARGBColors.Black; button.Text.Size = new Size(button.Size.Width - 0x2d, button.Size.Height); button.Text.Position = new Point(0x2d, 0); button.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); button.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.showAllCardsClick), "PlayCardsPanel_show_all_cards"); this.mainBackgroundImage.addControl(button); } CustomSelfDrawPanel.CSDButton button2 = new CustomSelfDrawPanel.CSDButton { ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal, ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over, ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed, Position = new Point(580, 0x203) }; button2.Text.Text = SK.Text("PlayCardsPanel_Return", "Back To Play Cards"); button2.TextYOffset = -2; button2.Text.Color = ARGBColors.Black; if ((Program.mySettings.LanguageIdent == "it") || (Program.mySettings.LanguageIdent == "tr")) { button2.Text.Font = FontManager.GetFont("Arial", 11f, FontStyle.Bold); } else { button2.Text.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); } button2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.returnClicked), "PlayCardsPanel_Back_To_PlayCards"); this.AvailablePanel.addControl(button2); CustomSelfDrawPanel.CSDLabel label = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0x1b, 0x233), Size = new Size(0x3a7, 0x40), Text = SK.Text("ViewAllCardsPanel_Cancel", "Click on a Card Circle to cancel that card."), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 14f, FontStyle.Regular), Color = ARGBColors.White }; this.mainBackgroundImage.addControl(label); this.mainBackgroundImage.invalidate(); }
private void ResizeAvailable(int height) { this.mainBackgroundImage.removeControl(this.scrollbarAvailable); this.mainBackgroundImage.removeControl(this.AvailablePanel); this.AvailablePanel.clearDirectControlsOnly(); this.AvailablePanelContent.clearDirectControlsOnly(); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.scrollbarAvailable = new CustomSelfDrawPanel.CSDVertScrollBar(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, height); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - height); this.AvailablePanel.Alpha = 0.8f; this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); this.mainBackgroundImage.invalidate(); this.sortBack.clearControls(); this.sortBack.Image = (Image) GFXLibrary.sort_back; this.sortBack.Position = new Point(8, this.AvailablePanel.Height - 0x25); this.sortBack.Visible = true; this.AvailablePanel.addControl(this.sortBack); this.sortByName.ImageNorm = (Image) GFXLibrary.sort_normal; this.sortByName.ImageOver = (Image) GFXLibrary.sort_over; this.sortByName.ImageClick = (Image) GFXLibrary.sort_in; this.sortByName.Position = new Point(7, 4); this.sortByName.Text.Text = SK.Text("Card_Sorting_Name", "Sort By Name"); this.sortByName.Text.Color = ARGBColors.White; this.sortByName.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.sortByName.TextYOffset = -1; this.sortByName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortByNameClicked), "ManageCardsPanel_sort_by_name"); this.sortBack.addControl(this.sortByName); this.sortByType.ImageNorm = (Image) GFXLibrary.sort_normal; this.sortByType.ImageOver = (Image) GFXLibrary.sort_over; this.sortByType.ImageClick = (Image) GFXLibrary.sort_in; this.sortByType.Position = new Point(0xe4, 4); this.sortByType.Text.Text = SK.Text("Card_Sorting_Type", "Sort By Type"); this.sortByType.Text.Color = ARGBColors.White; this.sortByType.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.sortByType.TextYOffset = -1; this.sortByType.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortByTypeClicked), "ManageCardsPanel_sort_by_type"); this.sortBack.addControl(this.sortByType); this.sortByQuantity.ImageNorm = (Image) GFXLibrary.sort_normal; this.sortByQuantity.ImageOver = (Image) GFXLibrary.sort_over; this.sortByQuantity.ImageClick = (Image) GFXLibrary.sort_in; this.sortByQuantity.Position = new Point(0x1c1, 4); this.sortByQuantity.Text.Text = SK.Text("Card_Sorting_Quantity", "Sort By Quantity"); this.sortByQuantity.Text.Color = ARGBColors.White; this.sortByQuantity.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.sortByQuantity.TextYOffset = -1; this.sortByQuantity.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sortByQuantityClicked), "PlayCardsPanel_sort_by_type"); this.sortBack.addControl(this.sortByQuantity); this.compressButton.ImageNorm = (Image) GFXLibrary.r_popularity_panel_but_minus_norm; this.compressButton.ImageOver = (Image) GFXLibrary.r_popularity_panel_but_minus_over; this.compressButton.ImageClick = (Image) GFXLibrary.r_popularity_panel_but_minus_in; this.compressButton.Position = new Point(0x2a1, 0x10); this.compressButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.compressClicked), "ManageCardsPanel_compressed_cards"); this.sortBack.addControl(this.compressButton); this.expandButton.ImageNorm = (Image) GFXLibrary.r_popularity_panel_but_plus_norm; this.expandButton.ImageOver = (Image) GFXLibrary.r_popularity_panel_but_plus_over; this.expandButton.ImageClick = (Image) GFXLibrary.r_popularity_panel_but_plus_in; this.expandButton.Position = new Point(0x2a1, -2); this.expandButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.expandClicked), "ManageCardsPanel_expand_cards"); this.sortBack.addControl(this.expandButton); if ((this.sortByMode == 0) || (this.sortByMode == 2)) { this.sortByName.Alpha = 0.5f; this.sortByType.Alpha = 1f; this.sortByQuantity.Alpha = 0.5f; } else if ((this.sortByMode == 1) || (this.sortByMode == 3)) { this.sortByName.Alpha = 1f; this.sortByType.Alpha = 0.5f; this.sortByQuantity.Alpha = 0.5f; } else if ((this.sortByMode == 7) || (this.sortByMode == 8)) { this.sortByName.Alpha = 0.5f; this.sortByType.Alpha = 0.5f; this.sortByQuantity.Alpha = 1f; } else { this.sortByName.Alpha = 1f; this.sortByType.Alpha = 1f; this.sortByQuantity.Alpha = 1f; } }
public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; CustomSelfDrawPanel.CSDControl.CSD_MouseOverDelegate overDelegate = null; CustomSelfDrawPanel.CSDControl.CSD_MouseOverDelegate leaveDelegate = null; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; this.InplayPanelWidth = (this.ContentWidth - BorderPadding) - this.AvailablePanelWidth; CustomSelfDrawPanel.CSDExtendingPanel panel = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(panel); panel.Create((Image) GFXLibrary.cardpanel_panel_back_top_left, (Image) GFXLibrary.cardpanel_panel_back_top_mid, (Image) GFXLibrary.cardpanel_panel_back_top_right, (Image) GFXLibrary.cardpanel_panel_back_mid_left, (Image) GFXLibrary.cardpanel_panel_back_mid_mid, (Image) GFXLibrary.cardpanel_panel_back_mid_right, (Image) GFXLibrary.cardpanel_panel_back_bottom_left, (Image) GFXLibrary.cardpanel_panel_back_bottom_mid, (Image) GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; panel.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((panel.Width - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (panel.Height - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; panel.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 0x177); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 0x177); this.AvailablePanel.Alpha = 0.8f; this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); int width = base.Width; int borderPadding = BorderPadding; int num3 = this.AvailablePanel.Width; this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "Cards_Close"); this.closeImage.CustomTooltipID = 0x2774; this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundImage, 40, new Point((((base.Width - 1) - 0x11) - 50) + 3, 5), true); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); this.cardsButtons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow) base.ParentForm); this.cardsButtons.Position = new Point(0x328, 0x25); this.mainBackgroundImage.addControl(this.cardsButtons); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(600, 0x40); this.labelTitle.Text = ""; this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); this.labelTitlePoints.Position = new Point(0x1b, 8); this.labelTitlePoints.Size = new Size(600, 0x40); this.labelTitlePoints.Text = ""; this.labelTitlePoints.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitlePoints.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitlePoints.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitlePoints); this.imageTitlePoints.Image = (Image) GFXLibrary.cardpanel_manage_card_points_icon; this.imageTitlePoints.Position = new Point(400, 5); this.mainBackgroundImage.addControl(this.imageTitlePoints); this.searchButton.ImageNorm = (Image) GFXLibrary.int_statsscreen_search_button_normal; this.searchButton.ImageOver = (Image) GFXLibrary.int_statsscreen_search_button_over; this.searchButton.ImageClick = (Image) GFXLibrary.int_statsscreen_search_button_pushed; this.searchButton.Position = new Point(0x32b, 7); this.searchButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.searchClicked), "StatsPanel_search"); this.searchButton.CustomTooltipID = 0x284f; this.searchButton.Visible = true; this.mainBackgroundImage.addControl(this.searchButton); this.clearSearchButton.ImageNorm = (Image) GFXLibrary.int_statsscreen_search_clear_button_normal; this.clearSearchButton.ImageOver = (Image) GFXLibrary.int_statsscreen_search_clear_button_over; this.clearSearchButton.ImageClick = (Image) GFXLibrary.int_statsscreen_search_clear_button_pushed; this.clearSearchButton.Position = new Point(740, 7); this.clearSearchButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clearSearchClicked), "StatsPanel_clear_search"); this.clearSearchButton.Visible = false; this.clearSearchButton.CustomTooltipID = 0x2850; this.mainBackgroundImage.addControl(this.clearSearchButton); this.addPointsData(); CustomSelfDrawPanel.CSDLabel label = new CustomSelfDrawPanel.CSDLabel { Position = new Point((2 * BorderPadding) + this.AvailablePanelWidth, BorderPadding), Size = new Size(300, 0x40), Text = SK.Text("ManageCandsPanel_Cards_In_Play", "Cards In Play"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.cardTitle = new CustomSelfDrawPanel.CSDLabel(); this.cardTitle.Position = new Point(0x10, 40); this.cardTitle.Size = new Size(600, 0x40); this.cardTitle.Text = string.Empty; this.cardTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.cardTitle.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.cardTitle.Color = ARGBColors.White; this.cardTitle.DropShadowColor = ARGBColors.Black; this.mainBackgroundImage.addControl(this.cardTitle); this.labelFeedback = new CustomSelfDrawPanel.CSDLabel(); this.labelFeedback.Position = new Point(0x10, 500); this.labelFeedback.Size = new Size(600, 0x40); this.labelFeedback.Text = ""; this.labelFeedback.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelFeedback.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.labelFeedback.Color = ARGBColors.White; this.labelFeedback.DropShadowColor = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelFeedback); this.buttonCash = new CustomSelfDrawPanel.CSDImage(); this.buttonBonus = new CustomSelfDrawPanel.CSDImage(); this.buttonCatalog = new CustomSelfDrawPanel.CSDImage(); this.buttonCash.Image = (Image) GFXLibrary.cardpanel_button_blue_normal; this.buttonCash.Size = this.buttonCash.Image.Size; this.buttonBonus.Image = (Image) GFXLibrary.cardpanel_button_blue_normal; this.buttonBonus.Size = this.buttonBonus.Image.Size; this.buttonCatalog.Image = (Image) GFXLibrary.cardpanel_button_blue_normal; this.buttonCatalog.Size = this.buttonCash.Image.Size; this.buttonCash.Position = new Point((this.AvailablePanel.X + (this.AvailablePanel.Width / 2)) - this.buttonCash.Width, this.cardsButtons.Y + 4); this.buttonBonus.Position = new Point(this.buttonCash.X, this.buttonCash.Y); this.buttonCatalog.Position = new Point(this.buttonCash.X - this.buttonCash.Width, this.buttonCash.Y); this.buttonBonus.setMouseOverDelegate(() => this.buttonBonus.Image = (Image) GFXLibrary.cardpanel_button_blue_over, () => this.buttonBonus.Image = (Image) GFXLibrary.cardpanel_button_blue_normal); this.buttonCash.setMouseOverDelegate(() => this.buttonCash.Image = (Image) GFXLibrary.cardpanel_button_blue_over, () => this.buttonCash.Image = (Image) GFXLibrary.cardpanel_button_blue_normal); this.buttonCatalog.setMouseOverDelegate(() => this.buttonCatalog.Image = (Image) GFXLibrary.cardpanel_button_blue_over, () => this.buttonCatalog.Image = (Image) GFXLibrary.cardpanel_button_blue_normal); this.buttonBonus.Visible = false; this.buttonCash.Visible = true; this.fastCashIn = Program.mySettings.fastCashIn; this.fastCashInCheckBox = new CustomSelfDrawPanel.CSDCheckBox(); this.fastCashInCheckBox.CheckedImage = (Image) GFXLibrary.reports_checkbox_checked; this.fastCashInCheckBox.UncheckedImage = (Image) GFXLibrary.reports_checkbox_empty; this.fastCashInCheckBox.Position = new Point(this.AvailablePanel.X + 590, this.cardsButtons.Y + 160); this.fastCashInCheckBox.Checked = this.fastCashIn; this.fastCashInCheckBox.CBLabel.Text = SK.Text("ManageCards_multicashin", "Multi-Cash In"); this.fastCashInCheckBox.CBLabel.Color = ARGBColors.Black; this.fastCashInCheckBox.CBLabel.Position = new Point(20, -1); this.fastCashInCheckBox.CBLabel.Size = new Size(250, 0x19); this.fastCashInCheckBox.CBLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.fastCashInCheckBox.setCheckChangedDelegate(delegate { Program.mySettings.fastCashIn = this.fastCashIn = this.fastCashInCheckBox.Checked; this.RefreshSet(); }); this.mainBackgroundImage.addControl(this.fastCashInCheckBox); this.buyAndPlayCheckBox = new CustomSelfDrawPanel.CSDCheckBox(); this.buyAndPlayCheckBox.CheckedImage = (Image) GFXLibrary.reports_checkbox_checked; this.buyAndPlayCheckBox.UncheckedImage = (Image) GFXLibrary.reports_checkbox_empty; this.buyAndPlayCheckBox.Position = new Point(this.AvailablePanel.X + 100, this.cardsButtons.Y + 0x5c); this.buyAndPlayCheckBox.Checked = false; this.buyAndPlayCheckBox.Visible = false; this.buyAndPlayCheckBox.CBLabel.Text = SK.Text("ManageCards_buyAndPlay", "Play Card Immediately"); this.buyAndPlayCheckBox.CBLabel.Color = ARGBColors.Black; this.buyAndPlayCheckBox.CBLabel.Position = new Point(20, -1); this.buyAndPlayCheckBox.CBLabel.Size = new Size(250, 0x19); this.buyAndPlayCheckBox.CBLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.buyAndPlayCheckBox.setCheckChangedDelegate(new CustomSelfDrawPanel.CSDCheckBox.CSD_CheckChangedDelegate(this.buyAndPlayCheckChanged)); this.mainBackgroundImage.addControl(this.buyAndPlayCheckBox); CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, -2), Size = this.buttonCash.Size, Text = SK.Text("ManageCandsPanel_Cash_In", "Cash In"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.Black }; this.buttonCash.addControl(label2); CustomSelfDrawPanel.CSDLabel label3 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, -2), Size = this.buttonCash.Size, Text = SK.Text("ManageCandsPanel_Cash_In", "Cash In"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.Black }; this.buttonBonus.addControl(label3); this.labelBuyCash = new CustomSelfDrawPanel.CSDLabel(); this.labelBuyCash.Position = new Point(0, -2); this.labelBuyCash.Size = this.buttonCash.Size; this.labelBuyCash.Text = SK.Text("ManageCandsPanel_Get_Cards", "Get Cards"); this.labelBuyCash.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.labelBuyCash.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.labelBuyCash.Color = ARGBColors.Black; this.LabelClickToRemove = new CustomSelfDrawPanel.CSDLabel(); this.LabelClickToRemove.Position = new Point(this.AvailablePanel.X, this.cardsButtons.Y); this.LabelClickToRemove.Size = new Size(600, 0x12); this.LabelClickToRemove.Text = ""; this.LabelClickToRemove.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.LabelClickToRemove.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.LabelClickToRemove.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.LabelClickToRemove); this.buttonCatalog.addControl(this.labelBuyCash); this.buttonCatalog.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.SwitchToBuy), "ManageCardsPanel_switch_to_buy_cards"); if (GameEngine.Instance.World.ProfileCardsSet.Count < 5) { this.buttonCash.Colorise = ARGBColors.Gray; this.buttonCash.setMouseOverDelegate(null, null); this.buttonCash.setClickDelegate(null); } else { this.buttonCash.Colorise = ARGBColors.White; if (overDelegate == null) { overDelegate = () => this.buttonCash.Image = (Image) GFXLibrary.cardpanel_button_blue_over; } if (leaveDelegate == null) { leaveDelegate = () => this.buttonCash.Image = (Image) GFXLibrary.cardpanel_button_blue_normal; } this.buttonCash.setMouseOverDelegate(overDelegate, leaveDelegate); this.buttonCash.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.CashClick), "ManageCardsPanel_switch_to_cash_in"); } this.LayoutPanelMode = this.PanelMode = PANEL_MODE_CASH; CardTypes.CardDefinition filter = new CardTypes.CardDefinition(); GameEngine.Instance.World.searchProfileCards(filter, "", ((PlayCardsWindow) base.ParentForm).getNameSearchText()); ((PlayCardsWindow) base.ParentForm).tbSearchBox.Visible = false; this.ResizeAvailable(0x177); this.GetCardsAvailable(false); this.RenderCards(this.UICardList); this.InitEmptyCards(); this.RefreshSet(); this.InitDynamicPanel(); this.CatalogFilterDefinition.cardCategory = 0; this.CatalogFilterDefinition.cardColour = 0; this.InitCatalog(); CustomSelfDrawPanel.CSDControl control = new CustomSelfDrawPanel.CSDControl { Position = new Point(0, 0), Size = base.Size }; this.mainBackgroundImage.addControl(control); this.mainBackgroundImage.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.mouseWheelHandler)); this.InitFilters(); this.InitTabs(); this.mainBackgroundImage.invalidate(); GameEngine.shiftPressedAlways = false; }
public void init(int cardSection) { this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = (Image) GFXLibrary.body_background_001; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = (this.ContentWidth - 150) - 40; this.InplayPanelWidth = (this.ContentWidth - BorderPadding) - this.AvailablePanelWidth; this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, (base.Height - 0x10) - BorderPadding); this.AvailablePanel.Position = new Point(0x10, 0x10); this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image) GFXLibrary.int_insetpanel_a_top_left, (Image) GFXLibrary.int_insetpanel_a_middle_top, (Image) GFXLibrary.int_insetpanel_a_top_right, (Image) GFXLibrary.int_insetpanel_a_middle_left, (Image) GFXLibrary.int_insetpanel_a_middle, (Image) GFXLibrary.int_insetpanel_a_middle_right, (Image) GFXLibrary.int_insetpanel_a_bottom_left, (Image) GFXLibrary.int_insetpanel_a_middle_bottom, (Image) GFXLibrary.int_insetpanel_a_bottom_right); int width = (base.Width - (BorderPadding * 3)) - this.AvailablePanel.Width; int height = 100; if (buttonpic == null) { buttonpic = new Bitmap(width, height); using (Graphics graphics = Graphics.FromImage(buttonpic)) { Brush green = Brushes.Green; graphics.FillRectangle(green, new Rectangle(new Point(0, 0), buttonpic.Size)); } } this.closeButton.Size = new Size(width, 0x26); this.closeButton.Text.Text = SK.Text("GENERIC_Close", "Close"); this.closeButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; this.closeButton.Text.Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold); this.closeButton.TextYOffset = -1; this.closeButton.Text.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.closeButton); this.closeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "Cards_Close"); this.closeButton.setNormalExtImage((Image) GFXLibrary.int_buttonbar_left_normal, (Image) GFXLibrary.int_buttonbar_middle_normal, (Image) GFXLibrary.int_buttonbar_right_normal); this.closeButton.setOverExtImage((Image) GFXLibrary.int_buttonbar_left_over, (Image) GFXLibrary.int_buttonbar_middle_over, (Image) GFXLibrary.int_buttonbar_right_over); this.closeButton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, BorderPadding); this.playbutton.Size = new Size(width, height); this.playbutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.closeButton.Y + this.closeButton.Height) + (BorderPadding / 2)); this.playbutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.playbutton); CustomSelfDrawPanel.CSDLabel control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Open_Cards", "Open Cards"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.playbutton.addControl(control); this.buybutton.Size = new Size(width, 100); this.buybutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.playbutton.Y + this.playbutton.Height) + (BorderPadding / 2)); this.buybutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.buybutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Buy_Cards", "Buy Cards"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.buybutton.addControl(control); this.premiumbutton.Size = new Size(width, 100); this.premiumbutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.buybutton.Y + this.buybutton.Height) + (BorderPadding / 2)); this.premiumbutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.premiumbutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Premium", "Premium"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.premiumbutton.addControl(control); this.managebutton.Size = new Size(width, 100); this.managebutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.premiumbutton.Y + this.premiumbutton.Height) + (BorderPadding / 2)); this.managebutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.managebutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Manage_Cards", "Manage Cards"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.managebutton.addControl(control); this.crownsbutton.Size = new Size(width, 100); this.crownsbutton.Position = new Point((base.Width - this.closeButton.Width) - BorderPadding, (this.managebutton.Y + this.managebutton.Height) + (BorderPadding / 2)); this.crownsbutton.Image = buttonpic; this.mainBackgroundImage.addControl(this.crownsbutton); control = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, 0), Size = new Size(width, height), Text = SK.Text("OpenCardsPanel_Get_Crowns", "Get Crowns"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.White, DropShadowColor = ARGBColors.Black }; this.crownsbutton.addControl(control); this.labelTitle.Position = new Point(BorderPadding, 2); this.labelTitle.Size = new Size(300, 0x40); this.labelTitle.Text = SK.Text("OpenCardsPanel_Latest_Offers", "Latest Offers"); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.White; this.labelTitle.DropShadowColor = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); }
public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image)GFXLibrary.cardpanel_panel_back_top_left, (Image)GFXLibrary.cardpanel_panel_back_top_mid, (Image)GFXLibrary.cardpanel_panel_back_top_right, (Image)GFXLibrary.cardpanel_panel_back_mid_left, (Image)GFXLibrary.cardpanel_panel_back_mid_mid, (Image)GFXLibrary.cardpanel_panel_back_mid_right, (Image)GFXLibrary.cardpanel_panel_back_bottom_left, (Image)GFXLibrary.cardpanel_panel_back_bottom_mid, (Image)GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image)GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image)GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 550); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 550); this.AvailablePanel.Alpha = 0.8f; int width = base.Width; int borderPadding = BorderPadding; int num9 = this.AvailablePanel.Width; this.closeImage.Image = (Image)GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image)GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image)GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick)); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundImage, 0x26, new Point((((base.Width - 1) - 0x11) - 50) + 3, 5), true); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); this.greyout.FillColor = Color.FromArgb(0xd7, 0x19, 0x19, 0x19); this.greyout.Size = new Size(this.mainBackgroundImage.Width, this.AvailablePanel.Y + this.AvailablePanel.Height); this.greyout.Position = new Point(0, 0); this.greyout.setClickDelegate(delegate { }); CustomSelfDrawPanel.CSDImage closeGrey = new CustomSelfDrawPanel.CSDImage { Image = (Image)GFXLibrary.cardpanel_button_close_normal, Size = this.closeImage.Image.Size }; closeGrey.setMouseOverDelegate(() => closeGrey.Image = (Image)GFXLibrary.cardpanel_button_close_over, () => closeGrey.Image = (Image)GFXLibrary.cardpanel_button_close_normal); closeGrey.Position = new Point((base.Width - 14) - 0x11, 10); this.greyout.addControl(closeGrey); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(0x3a7, 0x40); this.labelTitle.Text = SK.Text("BuyCrownsPanel_Buy_Crowns", "Buy Crowns"); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); CustomSelfDrawPanel.UICardsButtons buttons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow)base.ParentForm) { Position = new Point(0x328, 0x25) }; this.mainBackgroundImage.addControl(buttons); this.cardButtons = buttons; List <ProductInfo> productList = new List <ProductInfo>(); if (Program.steamActive) { this.PlayerCountry = "UK"; this.PlayerCurrency = "GBP"; this.PlayerLanguage = MySettings.load().LanguageIdent; XmlRpcAuthProvider provider = XmlRpcAuthProvider.CreateForEndpoint(URLs.ProfileProtocol, URLs.ProfileServerAddressLogin, URLs.ProfileServerPort, URLs.ProfilePath); XmlRpcAuthRequest req = new XmlRpcAuthRequest(RemoteServices.Instance.UserGuid.ToString().Replace("-", ""), "", "", "", null, null, null, null) { SteamID = Program.steamID, SessionID = RemoteServices.Instance.SessionGuid.ToString().Replace("-", ""), Culture = this.PlayerLanguage, Currency = this.PlayerCurrency, Country = this.PlayerCountry }; productList = provider.SteamGetProductList(req, null, this, 0x3a98).ProductList; } else if (Program.aeriaInstall) { XmlRpcAuthProvider provider2 = XmlRpcAuthProvider.CreateForEndpoint(URLs.ProfileProtocol, URLs.ProfileServerAddressLogin, URLs.ProfileServerPort, URLs.ProfilePath); XmlRpcAuthRequest request2 = new XmlRpcAuthRequest(RemoteServices.Instance.UserGuid.ToString().Replace("-", ""), "", "", "", null, null, null, null); XmlRpcAuthResponse response = null; this.storedAeriaPoints = provider2.AeriaGetBalance(request2, null, this, 0x3a98, ref response); productList = response.ProductList; this.buyAPButton.ImageNorm = (Image)GFXLibrary.misc_button_blue_210wide_normal; this.buyAPButton.ImageOver = (Image)GFXLibrary.misc_button_blue_210wide_over; this.buyAPButton.ImageClick = (Image)GFXLibrary.misc_button_blue_210wide_pushed; this.buyAPButton.Position = new Point(0x13d, 0x49); this.buyAPButton.Text.Text = this.storedAeriaPoints.ToString(); this.buyAPButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT; this.buyAPButton.Text.Size = new Size((this.buyAPButton.Width / 2) - 3, this.buyAPButton.Height); this.buyAPButton.TextYOffset = -2; this.buyAPButton.Text.Color = ARGBColors.Black; this.buyAPButton.ImageIcon = (Image)GFXLibrary.aeriaPoints; this.buyAPButton.ImageIconPosition = new Point((this.buyAPButton.Width / 2) + 3, 1); this.buyAPButton.Text.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.buyAPButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.purchaseAP)); this.buyAPButton.CustomTooltipID = 0x286e; this.mainBackgroundImage.addControl(this.buyAPButton); } int y = 0x42; int num2 = 0x5e; int num3 = -1; if (Program.aeriaInstall) { y = 0x84; } NumberFormatInfo nFI = GameEngine.NFI; NumberFormatInfo info2 = GameEngine.NFI_D2; foreach (ProductInfo info3 in productList) { num3++; int x = num2; if (Program.steamActive) { if (num3 > 3) { if (num3 == 4) { y = 0x84; } x += 350; } } else if (Program.aeriaInstall && (num3 > 2)) { if (num3 == 3) { y = 0x84; } x += 350; } CustomSelfDrawPanel.CSDLabel label = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label3 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label4 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDLabel label5 = new CustomSelfDrawPanel.CSDLabel(); CustomSelfDrawPanel.CSDImage image3 = new CustomSelfDrawPanel.CSDImage(); CustomSelfDrawPanel.CSDImage crownsbutton = new CustomSelfDrawPanel.CSDImage(); CustomSelfDrawPanel.CSDImage orderbutton = new CustomSelfDrawPanel.CSDImage(); crownsbutton.Image = (Image)GFXLibrary.cardpanel_payment_button_crowns_normal; crownsbutton.Position = new Point(x, y); crownsbutton.Height = crownsbutton.Image.Height; crownsbutton.Width = crownsbutton.Image.Width; crownsbutton.setMouseOverDelegate(() => crownsbutton.Image = (Image)GFXLibrary.cardpanel_payment_button_crowns_over, () => crownsbutton.Image = (Image)GFXLibrary.cardpanel_payment_button_crowns_normal); crownsbutton.Tag = info3; crownsbutton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); this.mainBackgroundImage.addControl(crownsbutton); x += crownsbutton.Width + 0x20; orderbutton.Image = (Image)GFXLibrary.cardpanel_payment_button_greywhite_normal; orderbutton.Position = new Point(x, (y + 0x12) + 3); orderbutton.Height = orderbutton.Image.Height; orderbutton.Width = orderbutton.Image.Width; orderbutton.setMouseOverDelegate(() => orderbutton.Image = (Image)GFXLibrary.cardpanel_payment_button_greywhite_over, () => orderbutton.Image = (Image)GFXLibrary.cardpanel_payment_button_greywhite_normal); orderbutton.Tag = info3; orderbutton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label5.Text = this.strOrderNow; label5.Position = new Point(0, 0); label5.Width = orderbutton.Width; label5.Height = orderbutton.Height; label5.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER; label5.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); orderbutton.addControl(label5); label5.Tag = info3; label5.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); int num5 = 14; int num6 = 0; if (Program.mySettings.LanguageIdent == "fr") { num5 = 13; num6 = -5; } label.Text = info3.Strikethrough.ToString(); label.Position = new Point(0x74 + num6, 0x15); label.Width = 300; label.Height = 0x18; label.Font = FontManager.GetFont("Arial", (float)num5, FontStyle.Strikeout); label.Color = ARGBColors.Black; crownsbutton.addControl(label); label.Tag = info3; label.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label.Size = label.TextSizeX; label2.Text = info3.Crowns.ToString(); label2.Position = new Point(label.X + label.Width, label.Y); label2.Font = FontManager.GetFont("Arial", (float)num5, FontStyle.Bold); label2.Color = ARGBColors.Purple; label2.Width = 300; label2.Height = 0x18; crownsbutton.addControl(label2); label2.Tag = info3; label2.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label2.Size = label2.TextSizeX; label3.Text = this.strCrowns; label3.Position = new Point((label2.X + label2.Width) + num6, label2.Y); label3.Font = FontManager.GetFont("Arial", (float)num5, FontStyle.Bold); label3.Color = ARGBColors.Black; label3.Size = new Size(300, 0x18); crownsbutton.addControl(label3); label3.Tag = info3; label3.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label3.Size = label3.TextSizeX; if (Program.aeriaInstall) { label4.Text = " " + ((int)info3.Cost).ToString("F", nFI); } else { label4.Text = info3.Currency + " " + info3.Cost.ToString("F", info2); } label4.Position = new Point(label.X, (label.Y + label.Height) + 4); label4.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); label4.Color = ARGBColors.Black; label4.Size = new Size(300, 0x18); crownsbutton.addControl(label4); label4.Tag = info3; label4.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.productclick)); label4.Size = label4.TextSizeX; if (Program.aeriaInstall) { image3.Image = (Image)GFXLibrary.aeriaPoints; label4.Position = new Point(label.X + 20, label.Y + label.Height); image3.Position = new Point(label.X, (((label.Y + label.Height) + 4) - 2) - 3); image3.Tag = info3; crownsbutton.addControl(image3); } y += crownsbutton.Height + 40; } this.mainBackgroundImage.invalidate(); }
public void init(int cardSection) { CustomSelfDrawPanel.CSDImage image2; this.inSend = false; this.currentCardSection = cardSection; base.clearControls(); this.mainBackgroundImage.Image = GFXLibrary.dummy; this.mainBackgroundImage.Position = new Point(0, 0); this.mainBackgroundImage.Size = base.Size; this.mainBackgroundImage.Tile = true; base.addControl(this.mainBackgroundImage); this.ContentWidth = base.Width - (2 * BorderPadding); this.AvailablePanelWidth = 800; CustomSelfDrawPanel.CSDExtendingPanel control = new CustomSelfDrawPanel.CSDExtendingPanel { Size = base.Size, Position = new Point(0, 0) }; this.mainBackgroundImage.addControl(control); control.Create((Image) GFXLibrary.cardpanel_panel_back_top_left, (Image) GFXLibrary.cardpanel_panel_back_top_mid, (Image) GFXLibrary.cardpanel_panel_back_top_right, (Image) GFXLibrary.cardpanel_panel_back_mid_left, (Image) GFXLibrary.cardpanel_panel_back_mid_mid, (Image) GFXLibrary.cardpanel_panel_back_mid_right, (Image) GFXLibrary.cardpanel_panel_back_bottom_left, (Image) GFXLibrary.cardpanel_panel_back_bottom_mid, (Image) GFXLibrary.cardpanel_panel_back_bottom_right); CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_top_left, Size = GFXLibrary.cardpanel_panel_gradient_top_left.Size, Position = new Point(0, 0) }; control.addControl(image); image2 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.cardpanel_panel_gradient_bottom_right, Size = GFXLibrary.cardpanel_panel_gradient_bottom_right.Size, Position = new Point((control.Width - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Width) - 6, (control.Height - ((Image) GFXLibrary.cardpanel_panel_gradient_bottom_right).Height) - 6) }; control.addControl(image2); this.AvailablePanel = new CustomSelfDrawPanel.CSDExtendingPanel(); this.AvailablePanel.Size = new Size(this.AvailablePanelWidth, 0x181); this.AvailablePanel.Position = new Point(8, (base.Height - 8) - 0x181); this.AvailablePanel.Alpha = 0.8f; this.mainBackgroundImage.addControl(this.AvailablePanel); this.AvailablePanel.Create((Image) GFXLibrary.cardpanel_panel_black_top_left, (Image) GFXLibrary.cardpanel_panel_black_top_mid, (Image) GFXLibrary.cardpanel_panel_black_top_right, (Image) GFXLibrary.cardpanel_panel_black_mid_left, (Image) GFXLibrary.cardpanel_panel_black_mid_mid, (Image) GFXLibrary.cardpanel_panel_black_mid_right, (Image) GFXLibrary.cardpanel_panel_black_bottom_left, (Image) GFXLibrary.cardpanel_panel_black_bottom_mid, (Image) GFXLibrary.cardpanel_panel_black_bottom_right); int width = base.Width; int borderPadding = BorderPadding; int num8 = this.AvailablePanel.Width; this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal; this.closeImage.Size = this.closeImage.Image.Size; this.closeImage.setMouseOverDelegate(() => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_over, () => this.closeImage.Image = (Image) GFXLibrary.cardpanel_button_close_normal); this.closeImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "Cards_Close"); this.closeImage.Position = new Point((base.Width - 14) - 0x11, 10); this.closeImage.CustomTooltipID = 0x2774; this.mainBackgroundImage.addControl(this.closeImage); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundImage, 0x25, new Point((((base.Width - 1) - 0x11) - 50) + 3, 5), true); CustomSelfDrawPanel.CSDFill fill = new CustomSelfDrawPanel.CSDFill { FillColor = Color.FromArgb(0xff, 130, 0x81, 0x7e), Size = new Size(base.Width - 10, 1), Position = new Point(5, 0x22) }; this.mainBackgroundImage.addControl(fill); this.greyout.FillColor = Color.FromArgb(0xd7, 0x19, 0x19, 0x19); this.greyout.Size = new Size(this.mainBackgroundImage.Width, this.mainBackgroundImage.Height); this.greyout.Position = new Point(0, 0); this.cardsButtons = new CustomSelfDrawPanel.UICardsButtons((PlayCardsWindow) base.ParentForm); this.cardsButtons.Position = new Point(0x328, 0x25); this.mainBackgroundImage.addControl(this.cardsButtons); this.labelTitle.Position = new Point(0x1b, 8); this.labelTitle.Size = new Size(0x3a7, 0x40); this.labelTitle.Text = SK.Text("PremiumCardsPanel_Buy_and_Open_Packs", "Buy and Play Premium Tokens: Crowns in your treasury") + " : " + GameEngine.Instance.World.ProfileCrowns.ToString(); this.labelTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.labelTitle.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold); this.labelTitle.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.labelTitle); this.premiumInPlay = GameEngine.Instance.World.UserCardData.premiumCard > 0; if (GameEngine.Instance.World.UserCardData.premiumCard == 0x1010) { this.maxExpirySeconds = 604800.0; } else if (GameEngine.Instance.World.UserCardData.premiumCard == 0x1012) { this.maxExpirySeconds = 2592000.0; } else if (GameEngine.Instance.World.UserCardData.premiumCard == 0x1011) { this.maxExpirySeconds = 172800.0; } else if (GameEngine.Instance.World.UserCardData.premiumCard == 0x1014) { this.maxExpirySeconds = 0.0; } this.currentExpirySeconds = GameEngine.Instance.World.UserCardData.premiumCardExpiry.Subtract(VillageMap.getCurrentServerTime()).TotalSeconds; this.expiryDays = this.currentExpirySeconds / 86400.0; this.expiryHours = (this.currentExpirySeconds % 86400.0) / 3600.0; this.expiryMinutes = (this.currentExpirySeconds % 3600.0) / 60.0; if (this.maxExpirySeconds > 0.0) { double num = this.currentExpirySeconds / this.maxExpirySeconds; this.expiryBarCurrent = Convert.ToInt32(Math.Floor((double) (num * expiryBarMax))); } else { this.expiryBarCurrent = -1; } if (GameEngine.Instance.World.UserCardData.premiumCard > 0) { this.premiumTokenImage = GFXLibrary.PremiumTokens[GameEngine.Instance.World.UserCardData.premiumCard][0]; } else { this.premiumTokenImage = GFXLibrary.PremiumTokens[0x1010][0]; } this.PremiumInplayImage.Visible = false; this.PremiumInplayImage.Image = this.premiumTokenImage; this.PremiumInplayImage.Size = this.premiumTokenImage.Size; this.PremiumInplayImage.Position = new Point(((this.AvailablePanel.X + this.AvailablePanel.Width) - 0x20) - this.PremiumInplayImage.Width, this.cardsButtons.Y + 8); this.PremiumInplayImage.setMouseOverDelegate(delegate { if (GameEngine.Instance.World.UserCardData.premiumCard > 0) { this.PremiumInplayImage.Image = GFXLibrary.PremiumTokens[GameEngine.Instance.World.UserCardData.premiumCard][1]; } }, delegate { if (GameEngine.Instance.World.UserCardData.premiumCard > 0) { this.PremiumInplayImage.Image = GFXLibrary.PremiumTokens[GameEngine.Instance.World.UserCardData.premiumCard][0]; } }); this.mainBackgroundImage.addControl(this.PremiumInplayImage); if (this.expiryBarCurrent >= 0) { this.TimerOuter = new CustomSelfDrawPanel.CSDFill(); this.TimerInner = new CustomSelfDrawPanel.CSDFill(); } else { this.TimerInner = null; this.TimerOuter = null; } this.PremiumTokensLabel = new CustomSelfDrawPanel.CSDLabel(); this.PremiumTokensLabel.Position = new Point(this.AvailablePanel.X + 0x20, this.AvailablePanel.Y - 0x18); this.PremiumTokensLabel.Size = new Size(450, 0x20); this.PremiumTokensLabel.Text = SK.Text("PremiumCardsPanel_Current_Tokens", "Current Premium Tokens") + " : " + GameEngine.Instance.World.ProfilePremiumTokens.Count.ToString() + ((GameEngine.Instance.World.ProfilePremiumTokens.Count > 0) ? (" (" + SK.Text("PremiumCardsPanel_Click_To_Play", "click one to play") + ")") : ""); this.PremiumTokensLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.PremiumTokensLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.PremiumTokensLabel.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.PremiumTokensLabel); CustomSelfDrawPanel.CSDImage image3 = new CustomSelfDrawPanel.CSDImage(); BaseImage image4 = GFXLibrary.cardpanel_premium_ad; image3.Image = (Image) image4; image3.Size = image4.Size; image3.Position = new Point(0, 0); CustomSelfDrawPanel.CSDImage PremiumAdvert7 = new CustomSelfDrawPanel.CSDImage(); CustomSelfDrawPanel.CSDImage PremiumAdvert30 = new CustomSelfDrawPanel.CSDImage(); BaseImage AdImage7 = GFXLibrary.premiumAdvert7; BaseImage AdImage7_over = GFXLibrary.premiumAdvert7_over; BaseImage AdImage30 = GFXLibrary.premiumAdvert30; BaseImage AdImage30_over = GFXLibrary.premiumAdvert30_over; PremiumAdvert7.Image = (Image) AdImage7; PremiumAdvert7.Size = AdImage7.Size; PremiumAdvert7.Position = new Point(0, 0); this.AvailablePanelContent.addControl(PremiumAdvert7); PremiumAdvert30.Image = (Image) AdImage30; PremiumAdvert30.Size = AdImage30.Size; PremiumAdvert30.Position = new Point(0x16b, 0); this.AvailablePanelContent.addControl(PremiumAdvert30); PremiumAdvert7.Data = 0x1010; PremiumAdvert30.Data = 0x1012; PremiumAdvert7.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.ClickedOffer), "PremiumCardsPanel_buy_premium"); PremiumAdvert30.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.ClickedOffer), "PremiumCardsPanel_buy_premium"); PremiumAdvert7.setMouseOverDelegate(() => PremiumAdvert7.Image = (Image) AdImage7_over, () => PremiumAdvert7.Image = (Image) AdImage7); PremiumAdvert30.setMouseOverDelegate(() => PremiumAdvert30.Image = (Image) AdImage30_over, () => PremiumAdvert30.Image = (Image) AdImage30); image3.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.ClickedOffer), "PremiumCardsPanel_buy_premium"); image3.Data = 0x1010; CustomSelfDrawPanel.CSDLabel label = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, image3.Height + 8), Size = new Size(600, 0x20), Text = SK.Text("PremiumCardsPanel_Benefits", "Premium Benefits"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold), Color = ARGBColors.Gold }; this.AvailablePanelContent.addControl(label); CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, ((image3.Height + 8) + label.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Building_Queue", "Building Queue"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label2); CustomSelfDrawPanel.CSDLabel label3 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label2.Y + label2.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Buildings_Queue_Info", "This allows up to 5 buildings to be queued for construction in the village. You can also move all buildings within your village screen."), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label3); CustomSelfDrawPanel.CSDImage image5 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[0], Position = new Point(4, ((label2.Y + label2.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image5); CustomSelfDrawPanel.CSDLabel label4 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label3.Y + label3.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Research_Queue", "Research Queue"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label4); CustomSelfDrawPanel.CSDLabel label5 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label4.Y + label4.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Research_Queue_Info", "This allows up to 5 researches to be queued in the research screen."), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label5); CustomSelfDrawPanel.CSDImage image6 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[1], Position = new Point(4, ((label4.Y + label4.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image6); CustomSelfDrawPanel.CSDLabel label6 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label5.Y + label5.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Auto_Trading", "Auto Trading"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label6); CustomSelfDrawPanel.CSDLabel label7 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label6.Y + label6.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Auto_Trading_Info", "This allows the trade one type of good to the parish capitals market automatically while you are logged out.") + " (" + SK.Text("PremiumCardsPanel_Auto_Extra", "Activates once every 2 to 4 hours.") + ")", Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label7); CustomSelfDrawPanel.CSDImage image7 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[2], Position = new Point(4, ((label6.Y + label6.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image7); CustomSelfDrawPanel.CSDLabel label8 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label7.Y + label7.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Auto_Scouting", "Auto Scouting"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label8); CustomSelfDrawPanel.CSDLabel label9 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label8.Y + label8.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Auto_Scouting_Info", "This will send out all available scouts to stashes within the parish the village is located, automatically while you are logged out.") + " (" + SK.Text("PremiumCardsPanel_Auto_Extra", "Activates once every 2 to 4 hours.") + ")", Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label9); CustomSelfDrawPanel.CSDImage image8 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[3], Position = new Point(4, ((label8.Y + label8.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image8); CustomSelfDrawPanel.CSDLabel label10 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label9.Y + label9.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Auto_Attacking", "Auto Attacking"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label10); CustomSelfDrawPanel.CSDLabel label11 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label10.Y + label10.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Auto_Attacking_Info", "This will send out attacks to chosen targets automatically while you are logged out.") + " (" + SK.Text("PremiumCardsPanel_Auto_Extra", "Activates once every 2 to 4 hours.") + ")", Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label11); CustomSelfDrawPanel.CSDImage image9 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[4], Position = new Point(4, ((label10.Y + label10.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image9); CustomSelfDrawPanel.CSDLabel label12 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label11.Y + label11.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Auto_Recruit", "Auto Recruit"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label12); CustomSelfDrawPanel.CSDLabel label13 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label12.Y + label12.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Auto_Recruit_Info", "This will automatically conscript idle peasants to your army.") + " (" + SK.Text("PremiumCardsPanel_Auto_Extra", "Activates once every 2 to 4 hours.") + ")", Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label13); CustomSelfDrawPanel.CSDImage image10 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[5], Position = new Point(4, ((label12.Y + label12.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image10); CustomSelfDrawPanel.CSDLabel label14 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label13.Y + label13.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Village_Overview", "Village Overview"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label14); CustomSelfDrawPanel.CSDLabel label15 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label14.Y + label14.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Village_Overview_Info", "This allows players to keep track of essential information on all their villages, such as income from taxes, housing capacity, popularity and more."), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label15); CustomSelfDrawPanel.CSDImage image11 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[6], Position = new Point(4, ((label14.Y + label14.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image11); CustomSelfDrawPanel.CSDLabel label16 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label15.Y + label15.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_Vacation_Mode", "Vacation Mode"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label16); CustomSelfDrawPanel.CSDLabel label17 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label16.Y + label16.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_Vacation_Mode_Info", "This allows players to protect their villages from attack for up to 15 days."), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label17); CustomSelfDrawPanel.CSDImage image12 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[7], Position = new Point(4, ((label16.Y + label16.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image12); CustomSelfDrawPanel.CSDLabel label18 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(0, (label17.Y + label17.Height) + 4), Size = new Size(600, 30), Text = SK.Text("PremiumCardsPanel_AdvancedTrading", "Advanced Trading Option"), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT, Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold), Color = ARGBColors.Goldenrod }; this.AvailablePanelContent.addControl(label18); CustomSelfDrawPanel.CSDLabel label19 = new CustomSelfDrawPanel.CSDLabel { Position = new Point(110, ((label18.Y + label18.Height) + 4) - 11), Size = new Size(590, 50), Text = SK.Text("PremiumCardsPanel_AdvancedTrading_Info", "This allows players to find the best prices for goods in nearby Markets."), Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT, Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular), Color = ARGBColors.White }; this.AvailablePanelContent.addControl(label19); CustomSelfDrawPanel.CSDImage image13 = new CustomSelfDrawPanel.CSDImage { Image = (Image) GFXLibrary.premiumIcons[8], Position = new Point(4, ((label18.Y + label18.Height) + 4) - 10) }; this.AvailablePanelContent.addControl(image13); int height = (label19.Y + label19.Height) + 6; this.AvailablePanelContent.Position = new Point(BorderPadding, BorderPadding); this.AvailablePanelContent.Size = new Size(this.AvailablePanel.Width, height); this.AvailablePanelContent.ClipRect = new Rectangle(0, 0, this.AvailablePanel.Width - BorderPadding, this.AvailablePanel.Height - (BorderPadding * 2)); this.AvailablePanel.addControl(this.AvailablePanelContent); if (height < this.AvailablePanelContent.ClipRect.Height) { height = this.AvailablePanelContent.ClipRect.Height; } this.scrollbarAvailable.Position = new Point((this.AvailablePanel.Width - BorderPadding) - (BorderPadding / 2), this.AvailablePanel.Y + (BorderPadding / 2)); this.scrollbarAvailable.Size = new Size(BorderPadding, this.AvailablePanel.Height - BorderPadding); this.mainBackgroundImage.addControl(this.scrollbarAvailable); this.scrollbarAvailable.Value = 0; this.scrollbarAvailable.StepSize = 200; this.scrollbarAvailable.Max = this.AvailablePanelContent.Height - this.AvailablePanelContent.ClipRect.Height; this.scrollbarAvailable.NumVisibleLines = this.AvailablePanelContent.ClipRect.Height; this.scrollbarAvailable.OffsetTL = new Point(1, 5); this.scrollbarAvailable.OffsetBR = new Point(0, -10); this.scrollbarAvailable.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.AvailableContentScroll)); this.scrollbarAvailable.Create(null, null, null, (Image) GFXLibrary.cardpanel_scroll_thumb_top, (Image) GFXLibrary.cardpanel_scroll_thumb_mid, (Image) GFXLibrary.cardpanel_scroll_thumb_botom); if (height <= this.AvailablePanelContent.ClipRect.Height) { this.scrollbarAvailable.Visible = false; } this.expiryLabel = new CustomSelfDrawPanel.CSDLabel(); if (this.TimerInner != null) { this.ExpiryBar = new CustomSelfDrawPanel.CSDHorzProgressBar(); this.ExpiryBar.Size = new Size(170, 0); this.ExpiryBar.Position = new Point(this.PremiumInplayImage.X - 13, this.PremiumInplayImage.Y + this.PremiumInplayImage.Height); this.ExpiryBar.Create((Image) GFXLibrary.cardpanel_prem_timer_back_left, (Image) GFXLibrary.cardpanel_prem_timer_back_mid, (Image) GFXLibrary.cardpanel_prem_timer_back_right, (Image) GFXLibrary.cardpanel_prem_timer_fill_left, (Image) GFXLibrary.cardpanel_prem_timer_fill_mid, (Image) GFXLibrary.cardpanel_prem_timer_fill_right); this.ExpiryBar.setValues(this.currentExpirySeconds, this.maxExpirySeconds); this.mainBackgroundImage.addControl(this.ExpiryBar); this.expiryLabel.Position = new Point(this.ExpiryBar.X, this.ExpiryBar.Y + this.ExpiryBar.Height); this.expiryLabel.Size = new Size(this.ExpiryBar.Width, 0x10); } else { this.expiryLabel.Position = new Point(this.PremiumInplayImage.X - 13, this.PremiumInplayImage.Y + this.PremiumInplayImage.Height); this.expiryLabel.Size = new Size(170, 0x10); } this.expiryLabel.Visible = false; this.expiryLabel.Text = Math.Floor(this.expiryDays).ToString().PadLeft(2, '0') + ":" + Math.Floor(this.expiryHours).ToString().PadLeft(2, '0') + ":" + Math.Floor(this.expiryMinutes).ToString().PadLeft(2, '0') + " (" + SK.Text("PremiumCardsPanel_Day_Hour_Minute", "dd:hh:mm") + ")"; this.expiryLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.expiryLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular); this.expiryLabel.Color = ARGBColors.Black; this.mainBackgroundImage.addControl(this.expiryLabel); this.UpdatePremiumTokens(); this.UpdateExpiry(); }