示例#1
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;
        }
示例#2
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);
        }