public UIPersonalitySubpanel(TS1GameScreen game) : base(game) { Skills = new UISkillDisplay[5]; for (int i = 0; i < 5; i++) { Skills[i] = new UISkillDisplay(); Skills[i].Position = new Vector2(334 + (i % 3) * 140, 35 + 60 * (i / 3)); Add(Skills[i]); var name = new UILabel(); name.Caption = SkillNames[i]; name.Position = new Vector2(332 + (i % 3) * 140, 11 + 60 * (i / 3)); InitLabel(name); } }
public UIJobSubpanel(TS1GameScreen game) : base(game) { PerformanceTitle = new UILabel(); PerformanceTitle.Caption = "Performance"; PerformanceTitle.Position = new Vector2(79, 16); InitLabel(PerformanceTitle); PerformanceBar = new UIMotiveBar(); PerformanceBar.Position = new Vector2(79, 41); DynamicOverlay.Add(PerformanceBar); JobTitle = new UILabel(); JobTitle.Caption = "Subway Musician"; JobTitle.Position = new Vector2(18, 71); InitLabel(JobTitle); SalaryTitle = new UILabel(); SalaryTitle.Caption = "Salary: §90"; SalaryTitle.Position = new Vector2(18, 94); InitLabel(SalaryTitle); SalaryTitle.CaptionStyle.Color = UIStyle.Current.BtnActive; CareerButton = new UITwoStateButton(Content.Get().CustomUI.Get("blank_blue.png").Get(GameFacade.GraphicsDevice)); CareerButton.Position = new Vector2(20, 15); Add(CareerButton); Skills = new UISkillDisplay[6]; for (int i = 0; i < 6; i++) { Skills[i] = new UISkillDisplay(); Skills[i].Position = new Vector2(334 + (i % 3) * 140, 35 + 60 * (i / 3)); Add(Skills[i]); var name = new UILabel(); name.Caption = SkillNames[i]; name.Position = new Vector2(332 + (i % 3) * 140, 11 + 60 * (i / 3)); InitLabel(name); } }
public UILiveMode(UILotControl lotController) { var small800 = (GlobalSettings.Default.GraphicsWidth < 1024) || FSOEnvironment.UIZoomFactor > 1f; var script = this.RenderScript("livepanel" + (small800?"":"1024") + ".uis"); Script = script; LotController = lotController; DefaultBGImage = GetTexture(small800 ? (ulong)0x000000D800000002 : (ulong)0x0000018300000002); Background = new UIImage(DefaultBGImage); Background.Y = 35; this.AddAt(0, Background); EODCloseButton.OnButtonClick += EODCloseButton_OnButtonClick; MotivesLabel.Caption = "Character Data"; MotivesLabel.CaptionStyle = MotivesLabel.CaptionStyle.Clone(); MotivesLabel.CaptionStyle.Shadow = true; MotivesLabel.Alignment = TextAlignment.Left; MotivesLabel.Position -= new Vector2(0, 5); PeopleListBg = new UIImage(PeopleListBackgroundImg); PeopleListBg.Position = new Microsoft.Xna.Framework.Vector2(545, 38); this.AddAt(1, PeopleListBg); Divider = new UIImage(DividerImg); Divider.Position = new Microsoft.Xna.Framework.Vector2(140, 49); this.AddAt(1, Divider); MoodPanelButton = new UIButton(); MoodPanelButton.Texture = GetTexture((ulong)GameContent.FileIDs.UIFileIDs.lpanel_moodpanelbtn); MoodPanelButton.ImageStates = 4; MoodPanelButton.Position = new Vector2(31, 63); this.Add(MoodPanelButton); MotiveDisplay = new UIMotiveDisplay(); MotiveDisplay.Position = new Vector2(165, 56); this.Add(MotiveDisplay); PersonGrid = new UIPersonGrid(LotController.vm); Add(PersonGrid); PersonGrid.Position = new Vector2(609, 51); if (small800) { PersonGrid.Columns = 4; PersonGrid.DrawPage(); } EODPanel = new UIImage(EODPanelImg); EODPanel.Y = 20; EODPanelTall = new UIImage(EODPanelTallImg); //EODDoublePanelTall = new UIImage(EODDoublePanelTallImg); AddAt(0, EODPanel); AddAt(0, EODPanelTall); //Add(EODDoublePanelTall); EODButtonLayoutNone = script.Create <UIImage>("EODButtonLayoutNone"); EODButtonLayoutNoneTall = script.Create <UIImage>("EODButtonLayoutNoneTall"); EODButtonLayoutOne = script.Create <UIImage>("EODButtonLayoutOne"); EODButtonLayoutOneTall = script.Create <UIImage>("EODButtonLayoutOneTall"); EODButtonLayoutTwo = script.Create <UIImage>("EODButtonLayoutTwo"); EODButtonLayoutTwoTall = script.Create <UIImage>("EODButtonLayoutTwoTall"); EODSubFullLength = script.Create <UIImage>("EODSubFullLength"); EODSubFullLengthTall = script.Create <UIImage>("EODSubFullLengthTall"); EODSubMediumLength = script.Create <UIImage>("EODSubMediumLength"); EODSubMediumLengthTall = script.Create <UIImage>("EODSubMediumLengthTall"); EODSubShortLength = script.Create <UIImage>("EODSubShortLength"); EODSubShortLengthTall = script.Create <UIImage>("EODSubShortLengthTall"); Add(EODButtonLayoutNone); Add(EODButtonLayoutNoneTall); Add(EODButtonLayoutOne); Add(EODButtonLayoutOneTall); Add(EODButtonLayoutTwo); Add(EODButtonLayoutTwoTall); Add(EODSubFullLength); Add(EODSubFullLengthTall); Add(EODSubMediumLength); Add(EODSubMediumLengthTall); Add(EODSubShortLength); Add(EODSubShortLengthTall); EODMsgWinLong = script.Create <UIImage>("EODMsgWinLong"); EODMsgWinShort = script.Create <UIImage>("EODMsgWinShort"); EODTimer = script.Create <UIImage>("EODTimer"); AddAt(0, EODTimer); AddAt(0, EODMsgWinLong); AddAt(0, EODMsgWinShort); EODButton = new UIButton(EODButtonImg); Add(EODButton); EODButton.OnButtonClick += EODToggle; EODImage = script.Create <UIImage>("EODButtonImageSize"); Add(EODImage); NextPageButton.Position += new Vector2(170, 0); NextPageButton.OnButtonClick += (UIElement btn) => { PersonGrid.NextPage(); }; DefaultNextPagePos = NextPageButton.Position; PreviousPageButton.Position += new Vector2(170, 0); PreviousPageButton.OnButtonClick += (UIElement btn) => { PersonGrid.PreviousPage(); }; MsgWinTextEntry.Items.Add(new UIListBoxItem("", "")); Skills = new UISkillDisplay(); Skills.Position = new Vector2(334, 65); //Skills.Position = new Vector2(334 + (0 % 3) * 140, 65 + 60 * (0 / 3)); Add(Skills); EODCloseBase = EODCloseButton.Position; EODHelpBase = EODHelpButton.Position; SetInEOD(null, null); }