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