Пример #1
0
 public static Action Button(string text, Action onClick, Func <bool> isValid, float width = 0f)
 {
     return(() => {
         if (isValid())
         {
             EditorWidgits.Button(GUI.skin.button, text, onClick, width);
             Logging.Log("valid!");
         }
         else
         {
             EditorWidgits.Background(Color.red, () => EditorWidgits.Text(GUI.skin.button, text));
             Logging.Log("Not valid");
         }
     });
 }
Пример #2
0
 public static Action Button(string text, Action onClick, float width = 0f)
 {
     return(() => EditorWidgits.Button(GUI.skin.button, text, onClick, width));
 }