Пример #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 void Row(Color background, params Action[] widgets)
 {
     EditorWidgits.Background(background, () => EditorWidgits.ShowRow(NO_OPTIONS, style: null, widgets: widgets));
 }
Пример #3
0
 public static Action Text(Color background, GUIStyle style, string value)
 {
     return(() => EditorWidgits.Background(background, () => EditorWidgits.Text(style, value)));
 }