Example #1
0
File: GUI.cs Project: Joelone/FFWD
 public static bool Button(Rect rect, Texture texture, GUIStyle style)
 {
     if (isRendering)
     {
         Rectangle r = rect;
         if (Camera.FullScreen.Bounds.Contains(r))
         {
             spriteBatch.Draw((Texture2D)texture, r, color);
         }
         if (Input.GetMouseButtonDown(0) && rect.Contains(Input.mousePositionXna))
         {
             return true;
         }
         for (int i = 0; i < Input.touches.Length; i++)
         {
             if (Input.touches[i].phase == TouchPhase.Began && rect.Contains(Input.touches[i].cleanPosition))
             {
                 return true;
             }
         }
     }
     return false;
 }