Exemple #1
0
 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!");
     }
 }
Exemple #2
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");
         }
     });
 }
Exemple #3
0
 public static void Row(Color background, params Action[] widgets)
 {
     EditorWidgits.Background(background, () => EditorWidgits.ShowRow(NO_OPTIONS, style: null, widgets: widgets));
 }
Exemple #4
0
 //--- Layout ---
 public static void Row(params Action[] widgets)
 {
     EditorWidgits.ShowRow(NO_OPTIONS, style: null, widgets: widgets);
 }
Exemple #5
0
 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));
 }
Exemple #6
0
 public static Action TextField(string Label, string value, Action <string> onChange)
 {
     return(() => EditorWidgits.TextField(Label, value, onChange));
 }
Exemple #7
0
 public static Action Text(Color background, GUIStyle style, string value)
 {
     return(() => EditorWidgits.Background(background, () => EditorWidgits.Text(style, value)));
 }
Exemple #8
0
 public static Action Popup(string Label, int selectionIndex, string[] options, Action <int> onIndexChange)
 {
     return(() => EditorWidgits.Popup(Label, selectionIndex, options, onIndexChange));
 }
Exemple #9
0
 public static Action EnumField <Tenum>(string Label, Tenum value, Action <Tenum> onChange)
 {
     return(() => EditorWidgits.TextField(Label, value.ToString(), textVal => onChange(ParseTextEnum <Tenum>(value, textVal))));
 }
Exemple #10
0
 public static Action IntField(string Label, int value, Action <int> onChange)
 {
     return(() => EditorWidgits.TextField(Label, value.ToString(), textVal => onChange(ParseText(value, textVal))));
 }
Exemple #11
0
 public static Action Button(string text, Action onClick, float width = 0f)
 {
     return(() => EditorWidgits.Button(GUI.skin.button, text, onClick, width));
 }