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);
        }
Beispiel #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();
                    }
                }
            };
        }
Beispiel #3
0
        public void setObjective(string text)
        {
            if ( String.IsNullOrWhiteSpace( text ) ) {
                return;
            }

            this.objective = text;

            if (this.objectiveTextElement == null)
            {
                this.objectiveTextElement = new UITextElement(this.objective, 0.5, 0.2, 0.7f, true, GTA.Font.ChaletComprimeCologne, UIColor.WHITE);
                this.add(this.objectiveTextElement);
            }

            this.objectiveTextElement.setText(this.objective);
        }
Beispiel #4
0
        public void setMissionTime(string text)
        {
            if (String.IsNullOrWhiteSpace(text))
            {
                return;
            }

            this.missionTime = text;

            if (this.missionTimeTextElement == null)
            {
                this.missionTimeTextElement = new UITextElement(this.advice, 0.1, 0.1, 0.5f, true, GTA.Font.ChaletComprimeCologne, UIColor.WHITE);
                this.add(this.missionTimeTextElement);
            }

            this.missionTimeTextElement.setText(this.missionTime);
        }
Beispiel #5
0
        public void setAdvice(string text)
        {
            if (String.IsNullOrWhiteSpace(text))
            {
                return;
            }

            this.advice = text;

            if (this.adviceTextElement == null)
            {
                this.adviceTextElement = new UITextElement(this.advice, 0.5, 0.25, 0.7f, true, GTA.Font.ChaletComprimeCologne, UIColor.GREEN);
                this.add(this.adviceTextElement);
            }

            this.adviceTextElement.setText(this.advice);
        }
Beispiel #6
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 ) );
        }