public static bool AddButton(string text, float x = 20, float width = 180) { var result = GUI.Button(new Rect(x, RCM.Y, width, 20), text); RCM.IncreaseY(); return(result); }
public static float AddSlider(ref float updateValue, float minValue, float maxValue, string text, float x = 160, float width = 210, float height = 30) { AddLabel(text, 20, 150); RCM.IncreaseY(-30); updateValue = GUI.HorizontalSlider(new Rect(x, RCM.Y + 3f, width, height), updateValue, minValue, maxValue); RCM.IncreaseY(); return(updateValue); }
public static void AddLabel(string text, float x = 20, float width = 150) { GUI.Label(new Rect(x, RCM.Y, width, 20), text, RCM.labelStyle); RCM.IncreaseY(); }
public static bool AddCheckBox(ref bool updateValue, string label) { updateValue = GUI.Toggle(new Rect(20, RCM.Y, RCM.MenuRect.width - 50, 30), updateValue, label); RCM.IncreaseY(); return(updateValue); }