MsgBox.Show
public static void Show(int id, string message, DialogResultMethod method, bool modal = false, string btnText0 = "", string btnText1 = "", string btnText2 = "")
public static void Show(int id, string message, string caption, DialogResultMethod method, bool modal = false, string btnText0 = "", string btnText1 = "", string btnText2 = "")
public static void Show(int id, string message, string caption, MsgBoxButtons buttons, DialogResultMethod method, bool modal = false, string btnText0 = "", string btnText1 = "", string btnText2 = "")
public static void Show(int id, string message, string caption, MsgBoxButtons buttons, MsgBoxStyle style, DialogResultMethod method, bool modal = false, string btnText0 = "", string btnText1 = "", string btnText2 = "")
Parameters
id | Message Box ID (for inentification in your callback) |
message | Message text |
caption | Caption text |
buttons | Buttons in Message Box |
style | Style of Message Box |
method | Callback method |
modal | If true then other GUI elements will be blocked |
btnText0 | Text for "Yes/Ok" button (if empty then will be use default value) |
btnText1 | Text for "No" button (if empty then will be use default value) |
btnText2 | Text for "Cancel" button (if empty then will be use default value) |
Description
Show message box.
Example
using UnityEngine;
using PoqXert.MessageBox;
public class Example : MonoBehaviour {
void Start()
{
MsgBox.Show(0, "Your platform: " + Application.platform.ToString(), "Platform", Method);
}
public void Method(int id, DialogResult btn)
{
Debug.Log("Message ID: " + id + " Button: " + btn);
}
}