CEngineSharp_Client.Graphics.GameScreen.DisplayAlert C# (CSharp) Method

DisplayAlert() public method

public DisplayAlert ( string title, string alertMessage, int x, int y, Color color ) : void
title string
alertMessage string
x int
y int
color Color
return void
        public void DisplayAlert(string title, string alertMessage, int x, int y, Color color)
        {
            var messageBoxAlert = this.GUI.Get<MessageBox>("messageBoxAlert");

            messageBoxAlert.Title = title;
            messageBoxAlert.Position = new Vector2f(x, y);
            messageBoxAlert.TextColor = color;
            messageBoxAlert.Visible = true;
            messageBoxAlert.Get<Label>("labelAlert").Text = alertMessage;
            messageBoxAlert.Get<Label>("labelAlert").TextSize = 20;
            messageBoxAlert.Get<Label>("labelAlert").Position = new Vector2f(40, 50);
        }