public static Rect Button(Rect pos, string label, Color colour, ButtonPushedDelegate action) { return(Button(pos, label, colour, pos.height, action)); }
public static Rect Button(Rect pos, string label, float height, ButtonPushedDelegate action) { return(Button(pos, label, Color.white, height, action)); }
public static Rect DefaultButton(Rect pos, string label, Color colour, ButtonPushedDelegate action) { return(Button(pos, label, colour, DEFAULT_HEIGHT, action)); }
public static Rect Button(Rect pos, string label, Color colour, float height, ButtonPushedDelegate action) { var c = GUI.color; GUI.color = colour; if (GUI.Button(WithHeight(pos, height), label)) { action(); } GUI.color = c; return(FromHeight(pos, height)); }