public UILiveMode()
        {
            var script = this.RenderScript("livepanel" + ((GlobalSettings.Default.GraphicsWidth < 1024)?"":"1024") + ".uis");

            Background   = new UIImage(GetTexture((GlobalSettings.Default.GraphicsWidth < 1024) ? (ulong)0x000000D800000002 : (ulong)0x0000018300000002));
            Background.Y = 33;
            this.AddAt(0, Background);

            var 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);

            MotiveDisplay          = new UIMotiveDisplay();
            MotiveDisplay.Position = new Vector2(165, 59);
            this.Add(MotiveDisplay);

            EODHelpButton.Visible     = false;
            EODCloseButton.Visible    = false;
            EODExpandButton.Visible   = false;
            EODContractButton.Visible = false;
        }
示例#2
0
        public UILiveMode(UILotControl lotController)
        {
            var script = this.RenderScript("livepanel" + ((GlobalSettings.Default.GraphicsWidth < 1024)?"":"1024") + ".uis");

            LotController = lotController;

            Background   = new UIImage(GetTexture((GlobalSettings.Default.GraphicsWidth < 1024) ? (ulong)0x000000D800000002 : (ulong)0x0000018300000002));
            Background.Y = 33;
            this.AddAt(0, Background);

            var 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);

            Thumbnail          = new UIImage();
            Thumbnail.Size     = new Point(32, 32);
            Thumbnail.Position = new Vector2(65, 74);
            this.Add(Thumbnail);

            MotiveDisplay          = new UIMotiveDisplay();
            MotiveDisplay.Position = new Vector2(165, 59);
            this.Add(MotiveDisplay);

            EODHelpButton.Visible     = false;
            EODCloseButton.Visible    = false;
            EODExpandButton.Visible   = false;
            EODContractButton.Visible = false;
        }
示例#3
0
        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.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);

            PersonGrid = new UIPersonGrid(LotController.vm);
            Add(PersonGrid);
            PersonGrid.Position = new Vector2(409, 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.OnButtonClick     += (UIElement btn) => { PersonGrid.NextPage(); };
            DefaultNextPagePos                = NextPageButton.Position;
            PreviousPageButton.OnButtonClick += (UIElement btn) => { PersonGrid.PreviousPage(); };

            MsgWinTextEntry.Items.Add(new UIListBoxItem("", ""));

            EODCloseBase = EODCloseButton.Position;
            EODHelpBase  = EODHelpButton.Position;
            SetInEOD(null, null);
        }
示例#4
0
        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);
        }