public void init(int pizzazzImage) { int num; Sound.playVillageEnvironmental(0x2e, false, false); Sound.forceFullPlayOfNextEnvironmental(); base.clearControls(); this.transparentBackground.Size = base.Size; this.transparentBackground.FillColor = Color.FromArgb(0xff, 0, 0xff); base.addControl(this.transparentBackground); this.background.Position = new Point(0, 0); this.background.Size = new Size(0x27e, 0x148); base.addControl(this.background); this.background.Create((Image)GFXLibrary._9sclice_fancy_top_left, (Image)GFXLibrary._9sclice_fancy_top_mid, (Image)GFXLibrary._9sclice_fancy_top_right, (Image)GFXLibrary._9sclice_fancy_mid_left, (Image)GFXLibrary._9sclice_fancy_mid_mid, (Image)GFXLibrary._9sclice_fancy_mid_right, (Image)GFXLibrary._9sclice_fancy_bottom_left, (Image)GFXLibrary._9sclice_fancy_bottom_mid, (Image)GFXLibrary._9sclice_fancy_bottom_right); this.background.ForceTiling(); this.rewardArea.Position = new Point(0xbf, 0x29); this.rewardArea.Size = new Size(0x100, 0x100); this.background.addControl(this.rewardArea); this.firework1.init(this.rewardArea, 0x24, 0); this.firework2.init(this.rewardArea, 0x20, 0); this.firework3.init(this.rewardArea, 0x1c, 0); this.firework4.init(this.rewardArea, 0x18, 0); this.firework5.init(this.rewardArea, 20, 0); this.firework6.init(this.rewardArea, 0x10, 0); this.firework7.init(this.rewardArea, 12, 0); this.firework8.init(this.rewardArea, 8, 0); this.firework9.init(this.rewardArea, 4, 0); this.firework10.init(this.rewardArea, 0, 0); this.firework1a.init(this.rewardArea, 0x24, 1); this.firework2a.init(this.rewardArea, 0x20, 1); this.firework3a.init(this.rewardArea, 0x1c, 1); this.firework4a.init(this.rewardArea, 0x18, 1); this.firework5a.init(this.rewardArea, 20, 1); this.firework6a.init(this.rewardArea, 0x10, 1); this.firework7a.init(this.rewardArea, 12, 1); this.firework8a.init(this.rewardArea, 8, 1); this.firework9a.init(this.rewardArea, 4, 1); this.firework10a.init(this.rewardArea, 0, 1); this.starImage.Image = (Image)GFXLibrary.wheel_star[0]; this.starImage.Position = new Point(0, 0); this.starImage.RotateCentre = new PointF(128f, 128f); this.starImage.Visible = false; this.starSpinMode = 1; this.rewardArea.addControl(this.starImage); switch (pizzazzImage) { case 1: this.rewardImage.Image = (Image)GFXLibrary.getCommodity64DSImage(13); this.rewardImage.Position = new Point(0x53, 0x4f); this.rewardArea.addControl(this.rewardImage); return; case 2: this.rewardImage.Image = (Image)GFXLibrary.getCommodity64DSImage(6); this.rewardImage.Position = new Point(0x4c, 0x4c); this.rewardArea.addControl(this.rewardImage); this.reward2Image.Image = (Image)GFXLibrary.getCommodity64DSImage(7); this.reward2Image.Position = new Point(0x60, 0x60); this.rewardArea.addControl(this.reward2Image); return; case 3: case 5: case 6: case 8: case 10: num = -1; switch (pizzazzImage) { case 3: num = 2; goto Label_0542; case 5: num = 15; goto Label_0542; case 6: num = 1; goto Label_0542; case 8: num = 5; goto Label_0542; case 10: num = 14; goto Label_0542; } break; case 4: this.rewardImage.Image = (Image)GFXLibrary.com_64_honour_DS; this.rewardImage.Position = new Point(0x54, 0x54); this.rewardArea.addControl(this.rewardImage); return; case 7: this.rewardImage.Image = GFXLibrary.PremiumTokens[0x1011][0]; this.rewardImage.Position = new Point(0x60, 0x60); this.rewardImage.Size = new Size(this.rewardImage.Image.Width / 2, this.rewardImage.Image.Height / 2); this.rewardArea.addControl(this.rewardImage); return; case 9: this.rewardImage.Image = (Image)GFXLibrary.getCommodity64DSImage(6); this.rewardImage.Position = new Point(0x53, 0x4f); this.rewardArea.addControl(this.rewardImage); return; default: return; } Label_0542: this.rewardImage.Image = (Image)GFXLibrary.wheel_icons[num]; this.rewardImage.Size = new Size(0x80, 0x80); this.rewardImage.Position = new Point(0x40, 0x40); this.rewardArea.addControl(this.rewardImage); }
public void init() { base.clearControls(); NumberFormatInfo nFI = GameEngine.NFI; this.mainBackgroundImage.Image = (Image)GFXLibrary.body_background_canvas; this.mainBackgroundImage.Position = new Point(0, 0); base.addControl(this.mainBackgroundImage); this.mainBackgroundArea.Position = new Point(0, 0); this.mainBackgroundArea.Size = new Size(0x3e0, 0x236); this.mainBackgroundImage.addControl(this.mainBackgroundArea); this.closeButton.ImageNorm = (Image)GFXLibrary.int_button_close_normal; this.closeButton.ImageOver = (Image)GFXLibrary.int_button_close_over; this.closeButton.ImageClick = (Image)GFXLibrary.int_button_close_in; this.closeButton.Position = new Point(0x3b4, 10); this.closeButton.CustomTooltipID = 900; this.closeButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "CapitalResourcesPanel2_close"); this.mainBackgroundArea.addControl(this.closeButton); CustomSelfDrawPanel.WikiLinkControl.init(this.mainBackgroundArea, 11, new Point(0x382, 10)); Color color = Color.FromArgb(0xe0, 0xcb, 0x92); Color color2 = Color.FromArgb(0x4a, 0x43, 0x30); this.lightPanel.Position = new Point(0x9d, 0x57); this.lightPanel.Size = new Size(0x157, 390); this.mainBackgroundArea.addControl(this.lightPanel); this.lightPanel.Create((Image)GFXLibrary.lite_9slice_panel_top_left, (Image)GFXLibrary.lite_9slice_panel_top_mid, (Image)GFXLibrary.lite_9slice_panel_top_right, (Image)GFXLibrary.lite_9slice_panel_mid_left, (Image)GFXLibrary.lite_9slice_panel_mid_mid, (Image)GFXLibrary.lite_9slice_panel_mid_right, (Image)GFXLibrary.lite_9slice_panel_bottom_left, (Image)GFXLibrary.lite_9slice_panel_bottom_mid, (Image)GFXLibrary.lite_9slice_panel_bottom_right); this.illustration.Image = (Image)GFXLibrary.donate_illustration; this.illustration.Position = new Point(0x201, 0x57); this.mainBackgroundArea.addControl(this.illustration); this.stockpileHeaderLabel.Text = SK.Text("ResourcesPanel_Parish_Resources", "Parish Resources"); this.stockpileHeaderLabel.Color = color; this.stockpileHeaderLabel.DropShadowColor = color2; this.stockpileHeaderLabel.Position = new Point(9, 9); this.stockpileHeaderLabel.Size = new Size(0x3e0, 50); this.stockpileHeaderLabel.Font = FontManager.GetFont("Arial", 20f, FontStyle.Bold); this.stockpileHeaderLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.mainBackgroundArea.addControl(this.stockpileHeaderLabel); this.stockpileLimitLabel.Text = SK.Text("ResourcesPanel_Parish_Capacity", "Capacity of the Warehouse") + ": " + 0x186a0.ToString("N", nFI); this.stockpileLimitLabel.Color = color; this.stockpileLimitLabel.DropShadowColor = color2; this.stockpileLimitLabel.Position = new Point(0x20b, 0x1a2); this.stockpileLimitLabel.Size = new Size(0x145, 50); this.stockpileLimitLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Bold); this.stockpileLimitLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.mainBackgroundArea.addControl(this.stockpileLimitLabel); this.woodLabel.Text = "0"; this.woodLabel.Color = color; this.woodLabel.DropShadowColor = color2; this.woodLabel.Position = new Point(120, 50); this.woodLabel.Size = new Size(200, 50); this.woodLabel.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); this.woodLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lightPanel.addControl(this.woodLabel); this.stoneLabel.Text = "0"; this.stoneLabel.Color = color; this.stoneLabel.DropShadowColor = color2; this.stoneLabel.Position = new Point(120, 0x87); this.stoneLabel.Size = new Size(200, 50); this.stoneLabel.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); this.stoneLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lightPanel.addControl(this.stoneLabel); this.ironLabel.Text = "0"; this.ironLabel.Color = color; this.ironLabel.DropShadowColor = color2; this.ironLabel.Position = new Point(120, 220); this.ironLabel.Size = new Size(200, 50); this.ironLabel.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); this.ironLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lightPanel.addControl(this.ironLabel); this.pitchLabel.Text = "0"; this.pitchLabel.Color = color; this.pitchLabel.DropShadowColor = color2; this.pitchLabel.Position = new Point(120, 0x131); this.pitchLabel.Size = new Size(200, 50); this.pitchLabel.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold); this.pitchLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT; this.lightPanel.addControl(this.pitchLabel); this.woodImage.Image = (Image)GFXLibrary.getCommodity64DSImage(6); this.woodImage.Position = new Point(0x12, 0x18); this.lightPanel.addControl(this.woodImage); this.stoneImage.Image = (Image)GFXLibrary.getCommodity64DSImage(7); this.stoneImage.Position = new Point(0x12, 0x6d); this.lightPanel.addControl(this.stoneImage); this.ironImage.Image = (Image)GFXLibrary.getCommodity64DSImage(8); this.ironImage.Position = new Point(0x12, 0xc2); this.lightPanel.addControl(this.ironImage); this.pitchImage.Image = (Image)GFXLibrary.getCommodity64DSImage(9); this.pitchImage.Position = new Point(0x12, 0x117); this.lightPanel.addControl(this.pitchImage); this.update(); }