示例#1
0
    void OnGUI()
    {
        if (Time.timeScale == 0)
        {
            return;
        }

        if (fingerDown)
        {
            GUI.color = buttonColor;
            GUI.DrawTexture(r_button_ring, t2d_button_ring);
            GUI.DrawTexture(r_button_finger, t2d_button_ring);
        }
        else
        {
            if (label != null)
            {
                GUI.color = labelColor;
                GUI.Label(r_label, label, OurStyles.LABELCJ(10));
            }
        }

// uncomment these lines to see the touchable rectangle
//		GUI.color = new Color (1, 1, 1, 0.2f);
//		GUI.DrawTexture (r_downable, LAZY.t2d_white32x32);
    }
示例#2
0
 void OnGUI()
 {
     foreach (ProximityButton pb in pbses)
     {
         GUI.color = new Color(0.7f, 0.7f, 0.7f, 0.7f);
         Rect r = new Rect(0, 0, Screen.width * 0.10f, Screen.height * 0.05f);
         r.center = pb.position;
         GUI.Label(r, pb.label, OurStyles.LABELCJ(10));
     }
 }