Exemplo n.º 1
0
        private void SendLetter(UIElement button)
        {
            UIMessageController controller = (UIMessageController)Parent.Parent;
            UIMessageGroup      group      = (UIMessageGroup)Parent;

            controller.SendLetter(LetterTextEdit.CurrentText, LetterSubjectTextEdit.CurrentText, Author);
            group.Close(this);
        }
Exemplo n.º 2
0
        private void SendMessage(UIElement button)
        {
            SendMessageButton.Disabled = true;
            if (MessageTextEdit.CurrentText.Length == 0)
            {
                return;                                          //if they somehow get past the disabled button or press enter, don't send an empty message.
            }
            AddMessage("Current User", MessageTextEdit.CurrentText);

            UIMessageController controller = (UIMessageController)Parent.Parent;

            controller.SendMessage(MessageTextEdit.CurrentText, Author);
            MessageTextEdit.CurrentText = "";
        }
Exemplo n.º 3
0
        public UIMessageGroup(UIMessageType type, string name, UIMessageController parent)
        {
            this.parent = parent;
            this.name   = name;
            this.type   = type;

            window = new UIMessage(type, name);
            this.Add(window);
            window.X = GlobalSettings.Default.GraphicsWidth / 2 - 194;
            window.Y = GlobalSettings.Default.GraphicsHeight / 2 - 125;
            icon     = new UIMessageIcon(type);
            this.Add(icon);

            icon.button.OnButtonClick           += new ButtonClickDelegate(Show);
            window.MinimizeButton.OnButtonClick += new ButtonClickDelegate(Hide);
            window.CloseButton.OnButtonClick    += new ButtonClickDelegate(Close);
            this.AddUpdateHook(new UpdateHookDelegate(ButtonAnim));
            Ticks = 0;
            Alert = false;

            Hide(this);
        }
Exemplo n.º 4
0
        public UIMessageGroup(UIMessageType type, MessageAuthor author, UIMessageController parent)
        {
            this.parent = parent;
            this.name = author.Author;
            this.type = type;

            window = new UIMessage(type, author);
            this.Add(window);
            window.X = GlobalSettings.Default.GraphicsWidth / 2 - 194;
            window.Y = GlobalSettings.Default.GraphicsHeight / 2 - 125;
            icon = new UIMessageIcon(type);
            this.Add(icon);

            icon.button.OnButtonClick += new ButtonClickDelegate(Show);
            window.MinimizeButton.OnButtonClick += new ButtonClickDelegate(Hide);
            window.CloseButton.OnButtonClick += new ButtonClickDelegate(Close);
            this.AddUpdateHook(new UpdateHookDelegate(ButtonAnim));
            Ticks = 0;
            Alert = false;

            Hide(this);
        }
Exemplo n.º 5
0
        public CoreGameScreen()
        {
            /** City Scene **/
            ListenForMouse(new Rectangle(0, 0, ScreenWidth, ScreenHeight), new UIMouseEvent(MouseHandler));

            CityRenderer = new Terrain(GameFacade.Game.GraphicsDevice); //The Terrain class implements the ThreeDAbstract interface so that it can be treated as a scene but manage its own drawing and updates.

            String city = "Queen Margret's";
            if (PlayerAccount.CurrentlyActiveSim != null)
                city = PlayerAccount.CurrentlyActiveSim.ResidingCity.Name;

            CityRenderer.m_GraphicsDevice = GameFacade.GraphicsDevice;

            CityRenderer.Initialize(city, new CityDataRetriever());
            CityRenderer.RegenData = true;

            CityRenderer.LoadContent(GameFacade.GraphicsDevice);

            /**
            * Music
            */
            var tracks = new string[]{
                GlobalSettings.Default.StartupPath + "\\music\\modes\\map\\tsobuild1.mp3",
                GlobalSettings.Default.StartupPath + "\\music\\modes\\map\\tsobuild3.mp3",
                GlobalSettings.Default.StartupPath + "\\music\\modes\\map\\tsomap2_v2.mp3",
                GlobalSettings.Default.StartupPath + "\\music\\modes\\map\\tsomap3.mp3",
                GlobalSettings.Default.StartupPath + "\\music\\modes\\map\\tsomap4_v1.mp3"
            };
            PlayBackgroundMusic(
                tracks
            );

            ucp = new UIUCP();
            ucp.Y = ScreenHeight - 210;
            ucp.CityRenderer = CityRenderer;
            ucp.UpdateZoomButton();
            this.Add(ucp);

            gizmo = new UIGizmo();
            gizmo.X = ScreenWidth - 500;
            gizmo.Y = ScreenHeight - 300;
            this.Add(gizmo);

            Title = new UIGameTitle();
            Title.SetTitle(city);
            this.Add(Title);

            OpenInbox();

            MessageUI = new UIMessageController();
            this.Add(MessageUI);

            MessageUI.PassMessage("Whats His Face", "you suck");
            MessageUI.PassMessage("Whats His Face", "no rly");
            MessageUI.PassMessage("Whats His Face", "jk im just testing message recieving please love me");

            MessageUI.PassMessage("Yer maw", "dont let whats his face get to you");
            MessageUI.PassMessage("Yer maw", "i will always love you");

            MessageUI.PassEmail("M.O.M.I", "Ban Notice", "You have been banned for playing too well. \r\n\r\nWe don't know why you still have access to the game, but it's probably related to you playing the game pretty well. \r\n\r\nPlease stop immediately.\r\n\r\n - M.O.M.I. (this is just a test message btw, you're not actually banned)");

            GameFacade.Scenes.Add((_3DAbstract)CityRenderer);
        }