Exemple #1
0
 public static Rect Button(Rect pos,
                           string label,
                           Color colour,
                           ButtonPushedDelegate action)
 {
     return(Button(pos, label, colour, pos.height, action));
 }
Exemple #2
0
 public static Rect Button(Rect pos,
                           string label,
                           float height,
                           ButtonPushedDelegate action)
 {
     return(Button(pos, label, Color.white, height, action));
 }
Exemple #3
0
 public static Rect DefaultButton(Rect pos,
                                  string label,
                                  Color colour,
                                  ButtonPushedDelegate action)
 {
     return(Button(pos, label, colour, DEFAULT_HEIGHT, action));
 }
Exemple #4
0
    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));
    }