示例#1
0
 internal static void ShowDialog(string title, string message, DialogButton buttonOk)
 {
     if (EditorUtility.DisplayDialog(title, message, buttonOk.title))
     {
         buttonOk.PerformAction();
     }
 }
示例#2
0
 internal static void ShowDialog(string title, string message, DialogButton buttonOk, DialogButton buttonCancel, DialogButton buttonAlt)
 {
     int choice = EditorUtility.DisplayDialogComplex(title, message, buttonOk.title, buttonCancel.title, buttonAlt.title);
     switch (choice)
     {
         case 0:
             buttonOk.PerformAction();
             break;
         case 1:
             buttonCancel.PerformAction();
             break;
         case 2:
             buttonAlt.PerformAction();
             break;
     }
 }
示例#3
0
        internal static void ShowDialog(string title, string message, DialogButton buttonOk, DialogButton buttonCancel, DialogButton buttonAlt)
        {
            int choice = EditorUtility.DisplayDialogComplex(title, message, buttonOk.title, buttonCancel.title, buttonAlt.title);

            switch (choice)
            {
            case 0:
                buttonOk.PerformAction();
                break;

            case 1:
                buttonCancel.PerformAction();
                break;

            case 2:
                buttonAlt.PerformAction();
                break;
            }
        }
示例#4
0
 internal static void ShowDialog(string title, string message, DialogButton buttonOk, DialogButton buttonCancel)
 {
     if (EditorUtility.DisplayDialog(title, message, buttonOk.title, buttonCancel.title))
     {
         buttonOk.PerformAction();
     }
     else
     {
         buttonCancel.PerformAction();
     }
 }