public UILiveMode(UILotControl lotController) { Small800 = (GlobalSettings.Default.GraphicsWidth < 1024) || FSOEnvironment.UIZoomFactor > 1f; var script = this.RenderScript("livepanel" + (Small800?"":"1024") + ".uis"); EODLayout = new UIEODLayout(script); 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.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(375, 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); DynamicOverlay.Add(MotiveDisplay); PersonGrid = new UIPersonGrid(LotController.vm); Add(PersonGrid); PersonGrid.Position = new Vector2(409, 51); if (Small800) { PersonGrid.Columns = 4; PersonGrid.DrawPage(); } EODPanel = new UIImage(EODPanelImg); EODPanelTall = new UIImage(EODPanelTallImg); EODDoublePanelTall = new UIImage(EODDoublePanelTallImg); Size = new Vector2(Background.Size.X, EODPanelTall.Size.Y); AddAt(0, EODDoublePanelTall); AddAt(0, EODPanel); AddAt(0, EODPanelTall); EODButtonLayout = new UIImage(); EODSub = new UIImage(); EODExpandBack = Script.Create <UIImage>("EODExpandBack"); Add(EODButtonLayout); Add(EODSub); Add(EODExpandBack); EODTopSub = new UIImage(); EODTopButtonLayout = new UIImage(); Add(EODTopButtonLayout); Add(EODTopSub); StatusBarMsgWinStraight = script.Create <UIImage>("StatusBarMsgWinStraight"); StatusBarTimerStraight = script.Create <UIImage>("StatusBarTimerStraight"); StatusBarTimerBreakIcon = script.Create <UIImage>("StatusBarTimerBreakIcon"); StatusBarTimerWorkIcon = script.Create <UIImage>("StatusBarTimerWorkIcon"); StatusBarTimerStraight.X -= 1; StatusBarTimerStraight.Y += 2; StatusBarTimerBreakIcon.Y += 2; StatusBarTimerWorkIcon.Y += 2; StatusBarTimerTextEntry.Y += 2; StatusBarTimerTextEntry.X += 3; StatusBarMsgWinStraight.Y += 2; AddAt(0, StatusBarTimerBreakIcon); AddAt(0, StatusBarTimerWorkIcon); AddAt(0, StatusBarTimerStraight); AddAt(0, StatusBarMsgWinStraight); StatusBarMsgWinStraight.Visible = false; StatusBarTimerStraight.Visible = false; StatusBarTimerBreakIcon.Visible = false; StatusBarTimerWorkIcon.Visible = false; StatusBarTimerTextEntry.Visible = false; StatusBarMsgWinTextEntry.Visible = false; EODMsgWin = new UIImage(); EODTimer = script.Create <UIImage>("EODTimer"); AddAt(0, EODTimer); AddAt(0, EODMsgWin); EODButton = new UIButton(EODButtonImg); Add(EODButton); EODButton.OnButtonClick += EODToggle; EODImage = script.Create <UIImage>("EODButtonImageSize"); Add(EODImage); Add(EODExpandButton); Add(EODContractButton); EODExpandButton.OnButtonClick += EODExpandToggle; EODContractButton.OnButtonClick += EODExpandToggle; NextPageButton.OnButtonClick += (UIElement btn) => { PersonGrid.NextPage(); }; DefaultNextPagePos = NextPageButton.Position; PreviousPageButton.OnButtonClick += (UIElement btn) => { PersonGrid.PreviousPage(); }; MsgWinTextEntry.Items.Add(new UIListBoxItem("", "")); SetInEOD(null, null); }