示例#1
0
        public SuccessMissionPopup(string missionName, string missionTime) : base()
        {
            // background
            this.background = new UIRectElement(0.5, 0.5, 0.3, 0.2, UIColor.BLACK, 200);
            this.add(this.background);

            // title
            this.title = new UITextElement("Mission réussie", 0.5, 0.3, 1.5, true, Font.Pricedown, UIColor.GTA_YELLOW);
            this.add(this.title);

            // mission name
            this.content = new UITextElement(missionName, 0.5, 0.42, 1.2, true, Font.HouseScript, UIColor.WHITE);
            this.add(this.content);

            // top separator
            this.add(new UIRectElement(0.5, 0.515, 0.25, 0.002, UIColor.WHITE, 255));

            // mission time
            this.content = new UITextElement(missionTime, 0.5, 0.525, 0.475, true, Font.ChaletLondon, UIColor.WHITE);
            this.add(this.content);

            // bottom separator
            this.add(new UIRectElement(0.5, 0.57, 0.25, 0.002, UIColor.WHITE, 255));

            // helper
            this.infos = new UITextElement(INFOS, 0.5, 0.9, 0.6, true, Font.HouseScript, UIColor.WHITE);
            this.add(this.infos);
        }
示例#2
0
        public ConfirmationPopup(string text_title, string text_content) : base(false)
        {
            // background
            this.background = new UIRectElement(0, 0, 2, 2, UIColor.BLACK, 230);
            this.add(this.background);

            // title
            this.title = new UITextElement(text_title, 0.5, 0.4, 2, true, Font.Pricedown, UIColor.GTA_YELLOW);
            this.add(this.title);

            // top separator
            this.add(new UIRectElement(0.5, 0.525, 0.9, 0.002, UIColor.WHITE, 255));

            // content
            this.content = new UITextElement(text_content, 0.5, 0.530, 0.475, true, Font.ChaletLondon, UIColor.WHITE);
            this.add(this.content);

            // bottom separator
            this.add(new UIRectElement(0.5, 0.58, 0.9, 0.002, UIColor.WHITE, 255));

            // helper
            this.infos = new UITextElement(INFOS, 0.5, 0.9, 0.6, true, Font.HouseScript, UIColor.WHITE);
            this.add(this.infos);

            GUIManager.Instance.menu.OnControlPressed += (GTA.Control control) =>
            {
                if (this.isVisible())
                {
                    if (control == GTA.Control.PhoneSelect)
                    {
                        this.accept();
                    }

                    if (control == GTA.Control.PhoneCancel)
                    {
                        this.refuse();
                    }
                }
            };

            GUIManager.Instance.menu.OnKeysPressedEvent += (Keys key) =>
            {
                if (this.isVisible())
                {
                    if (key == Keys.Enter)
                    {
                        this.accept();
                    }
                    if (key == Keys.Escape)
                    {
                        this.refuse();
                    }
                }
            };
        }
示例#3
0
        public LoadingPopup(string text_title, string text_content) : base()
        {
            // background
            this.background = new UIRectElement(0, 0, 2, 2, UIColor.BLACK, 230);
            this.add(this.background);

            // title
            this.title = new UITextElement(text_title, 0.5, 0.4, 2, true, Font.Pricedown, UIColor.GTA_YELLOW);
            this.add(this.title);

            // top separator
            this.add(new UIRectElement(0.5, 0.525, 0.9, 0.002, UIColor.WHITE, 255));

            // content
            this.content = new UITextElement(text_content, 0.5, 0.530, 0.475, true, Font.ChaletLondon, UIColor.WHITE);
            this.add(this.content);

            // bottom separator
            this.add(new UIRectElement(0.5, 0.58, 0.9, 0.002, UIColor.WHITE, 255));
        }