public static void Row(GUIStyle style, params Action[] widgets) { if (style != null) { EditorWidgits.ShowRow(NO_OPTIONS, style, widgets); } else { Logging.Warning("Given style parameter but was NULL!"); } }
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)); }
//--- Layout --- public static void Row(params Action[] widgets) { EditorWidgits.ShowRow(NO_OPTIONS, style: null, widgets: widgets); }
public static Action ValidatedTextField(string Label, string value, Action <string> onChange, Action onClick, Func <string, bool> isValid) { return(() => EditorWidgits.ValidatedField(Label, value, onChange, onClick, isValid)); }
public static Action TextField(string Label, string value, Action <string> onChange) { return(() => EditorWidgits.TextField(Label, value, onChange)); }
public static Action Text(Color background, GUIStyle style, string value) { return(() => EditorWidgits.Background(background, () => EditorWidgits.Text(style, value))); }
public static Action Popup(string Label, int selectionIndex, string[] options, Action <int> onIndexChange) { return(() => EditorWidgits.Popup(Label, selectionIndex, options, onIndexChange)); }
public static Action EnumField <Tenum>(string Label, Tenum value, Action <Tenum> onChange) { return(() => EditorWidgits.TextField(Label, value.ToString(), textVal => onChange(ParseTextEnum <Tenum>(value, textVal)))); }
public static Action IntField(string Label, int value, Action <int> onChange) { return(() => EditorWidgits.TextField(Label, value.ToString(), textVal => onChange(ParseText(value, textVal)))); }
public static Action Button(string text, Action onClick, float width = 0f) { return(() => EditorWidgits.Button(GUI.skin.button, text, onClick, width)); }