public UIJobInfo(JobInformation jobInformation) : base(new UIAlertOptions() { Title = "Job Details", Width = 400, Height = jobInformation.MaxLevel ? 200 : 348, Message = "", Buttons = new UIAlertButton[] { new UIAlertButton(UIAlertButtonType.OK, (btn) => { }), }, AllowBB = true }) { this.jobInformation = jobInformation; int standardVerticalSpace = 10; int verticalSpace = 40; int sectionHeight = 54; OKButton = ButtonMap[UIAlertButtonType.OK]; OKButton.OnButtonClick += (btn) => Destroy(); Type = new UILabel { Position = new Vector2(30, verticalSpace), Size = new Vector2(200, 16), CaptionStyle = TextStyle.DefaultTitle }; Type.CaptionStyle = Type.CaptionStyle.Clone(); Type.CaptionStyle.Color = Color.White; Type.CaptionStyle.Size = 16; Type.CaptionStyle.Shadow = true; Type.Alignment = TextAlignment.Left | TextAlignment.Middle; this.Add(Type); verticalSpace += 16 + standardVerticalSpace; UIImage HoursSectionImage = new UIImage(GetTexture((ulong)0x7A400000001)).With9Slice(13, 13, 13, 13); HoursSectionImage.SetSize(360, sectionHeight); HoursSectionImage.Position = new Vector2(20, verticalSpace); Add(HoursSectionImage); this.Add(HoursSectionImage); verticalSpace += standardVerticalSpace; int hoursTitleSectionHeight = (sectionHeight / 2) - 12 - 6; HoursTitle = new UILabel { Position = new Vector2(40, verticalSpace + hoursTitleSectionHeight), Size = new Vector2(200, 12), CaptionStyle = TextStyle.DefaultTitle }; HoursTitle.CaptionStyle = HoursTitle.CaptionStyle.Clone(); HoursTitle.CaptionStyle.Size = 14; HoursTitle.Alignment = TextAlignment.Left | TextAlignment.Middle; HoursTitle.Caption = "Hours"; this.Add(HoursTitle); Hours = new UILabel { Position = new Vector2(40, verticalSpace), Size = new Vector2(320, 12), CaptionStyle = TextStyle.DefaultTitle }; Hours.CaptionStyle = Hours.CaptionStyle.Clone(); Hours.CaptionStyle.Color = new Color(238, 247, 169); Hours.CaptionStyle.Size = 12; Hours.CaptionStyle.Shadow = false; Hours.Alignment = TextAlignment.Right | TextAlignment.Middle; this.Add(Hours); verticalSpace += 12 + standardVerticalSpace; CarPoolHours = new UILabel { Position = new Vector2(40, verticalSpace), Size = new Vector2(320, 12), CaptionStyle = TextStyle.DefaultTitle }; CarPoolHours.CaptionStyle = CarPoolHours.CaptionStyle.Clone(); CarPoolHours.CaptionStyle.Color = new Color(238, 247, 169); CarPoolHours.CaptionStyle.Size = 12; CarPoolHours.CaptionStyle.Shadow = false; CarPoolHours.Alignment = TextAlignment.Right | TextAlignment.Middle; this.Add(CarPoolHours); verticalSpace += 12 + standardVerticalSpace + standardVerticalSpace; UIImage PositionSectionImage = new UIImage(GetTexture((ulong)0x7A400000001)).With9Slice(13, 13, 13, 13); PositionSectionImage.SetSize(360, sectionHeight); PositionSectionImage.Position = new Vector2(20, verticalSpace); Add(PositionSectionImage); this.Add(PositionSectionImage); verticalSpace += standardVerticalSpace; int positionTitleSectionHeight = (sectionHeight / 2) - 12 - 6; PositionTitle = new UILabel { Position = new Vector2(40, verticalSpace + positionTitleSectionHeight), Size = new Vector2(200, 12), CaptionStyle = TextStyle.DefaultTitle }; PositionTitle.CaptionStyle = PositionTitle.CaptionStyle.Clone(); PositionTitle.CaptionStyle.Color = new Color(238, 247, 169); PositionTitle.CaptionStyle.Size = 14; PositionTitle.CaptionStyle.Shadow = false; PositionTitle.Alignment = TextAlignment.Left | TextAlignment.Middle; PositionTitle.Caption = "Position"; this.Add(PositionTitle); Title = new UILabel { Position = new Vector2(40, verticalSpace), Size = new Vector2(320, 12), CaptionStyle = TextStyle.DefaultTitle }; Title.CaptionStyle = Title.CaptionStyle.Clone(); Title.CaptionStyle.Color = new Color(238, 247, 169); Title.CaptionStyle.Size = 12; Title.CaptionStyle.Shadow = false; Title.Alignment = TextAlignment.Right | TextAlignment.Middle; this.Add(Title); verticalSpace += 12 + standardVerticalSpace; Level = new UILabel { Position = new Vector2(40, verticalSpace), Size = new Vector2(320, 12), CaptionStyle = TextStyle.DefaultTitle }; Level.CaptionStyle = Level.CaptionStyle.Clone(); Level.CaptionStyle.Color = new Color(238, 247, 169); Level.CaptionStyle.Size = 12; Level.CaptionStyle.Shadow = false; Level.Alignment = TextAlignment.Right | TextAlignment.Middle; this.Add(Level); verticalSpace += 12 + standardVerticalSpace + standardVerticalSpace; if (!jobInformation.MaxLevel) { PromotionRequirements = new UILabel { Position = new Vector2(30, verticalSpace), Size = new Vector2(200, 16), CaptionStyle = TextStyle.DefaultTitle }; PromotionRequirements.CaptionStyle = PromotionRequirements.CaptionStyle.Clone(); PromotionRequirements.CaptionStyle.Color = Color.White; PromotionRequirements.CaptionStyle.Size = 16; PromotionRequirements.CaptionStyle.Shadow = true; PromotionRequirements.Alignment = TextAlignment.Left | TextAlignment.Middle; PromotionRequirements.Caption = "Promotion Requirements:"; this.Add(PromotionRequirements); verticalSpace += 16 + standardVerticalSpace; UIImage PerformanceSectionImage = new UIImage(GetTexture((ulong)0x7A400000001)).With9Slice(13, 13, 13, 13); PerformanceSectionImage.SetSize(360, sectionHeight); PerformanceSectionImage.Position = new Vector2(20, verticalSpace); Add(PerformanceSectionImage); this.Add(PerformanceSectionImage); int performanceTitleSectionHeight = (sectionHeight / 2) - 8; PerformanceTitle = new UILabel { Position = new Vector2(40, verticalSpace + performanceTitleSectionHeight), Size = new Vector2(200, 12), CaptionStyle = TextStyle.DefaultTitle }; PerformanceTitle.CaptionStyle = PerformanceTitle.CaptionStyle.Clone(); PerformanceTitle.CaptionStyle.Color = new Color(238, 247, 169); PerformanceTitle.CaptionStyle.Size = 14; PerformanceTitle.CaptionStyle.Shadow = false; PerformanceTitle.Alignment = TextAlignment.Left | TextAlignment.Middle; PerformanceTitle.Caption = "Performance"; this.Add(PerformanceTitle); int progressBarWidth = 145; ProgressBar = new UIProgressBar() { X = 360 - progressBarWidth, Y = verticalSpace + performanceTitleSectionHeight - 5, Value = 0 }; ProgressBar.SetSize(progressBarWidth, 27); ProgressBar.Caption = ""; ProgressBar.Background = TextureGenerator.GenerateRoundedRectangle(GameFacade.GraphicsDevice, new Color(37, 58, 77), progressBarWidth, 27, 9); this.Add(ProgressBar); verticalSpace += sectionHeight + standardVerticalSpace; UIImage NextPositionSectionImage = new UIImage(GetTexture((ulong)0x7A400000001)).With9Slice(13, 13, 13, 13); NextPositionSectionImage.SetSize(360, sectionHeight); NextPositionSectionImage.Position = new Vector2(20, verticalSpace); Add(NextPositionSectionImage); this.Add(NextPositionSectionImage); int nextPositionTitleSectionHeight = (sectionHeight / 2) - 8; NextPositionTitle = new UILabel { Position = new Vector2(40, verticalSpace + nextPositionTitleSectionHeight), Size = new Vector2(200, 12), CaptionStyle = TextStyle.DefaultTitle }; NextPositionTitle.CaptionStyle = NextPositionTitle.CaptionStyle.Clone(); NextPositionTitle.CaptionStyle.Color = new Color(238, 247, 169); NextPositionTitle.CaptionStyle.Size = 14; NextPositionTitle.CaptionStyle.Shadow = false; NextPositionTitle.Alignment = TextAlignment.Left | TextAlignment.Middle; NextPositionTitle.Caption = "Next Position"; this.Add(NextPositionTitle); NextPosition = new UILabel { Position = new Vector2(40, verticalSpace + nextPositionTitleSectionHeight), Size = new Vector2(320, 12), CaptionStyle = TextStyle.DefaultTitle }; NextPosition.CaptionStyle = NextPosition.CaptionStyle.Clone(); NextPosition.CaptionStyle.Color = new Color(238, 247, 169); NextPosition.CaptionStyle.Size = 12; NextPosition.CaptionStyle.Shadow = false; NextPosition.Alignment = TextAlignment.Right | TextAlignment.Middle; this.Add(NextPosition); } }