mirror of
https://github.com/digital-jellyfish/Virtu.git
synced 2024-11-27 15:52:12 +00:00
21 lines
719 B
C#
21 lines
719 B
C#
|
using Microsoft.Xna.Framework;
|
|||
|
using Microsoft.Xna.Framework.Input.Touch;
|
|||
|
|
|||
|
namespace Jellyfish.Library
|
|||
|
{
|
|||
|
public class TouchRegion
|
|||
|
{
|
|||
|
public void SetBounds(float x, float y, float width, float height) // scaled
|
|||
|
{
|
|||
|
Bounds = new Rectangle((int)(x * TouchPanel.DisplayWidth), (int)(y * TouchPanel.DisplayHeight), (int)(width * TouchPanel.DisplayWidth), (int)(height * TouchPanel.DisplayHeight));
|
|||
|
}
|
|||
|
|
|||
|
public Rectangle Bounds { get; set; }
|
|||
|
public int Order { get; set; }
|
|||
|
|
|||
|
internal TouchLocation? Touch { get; set; }
|
|||
|
internal TouchLocation? FirstTouch { get; set; }
|
|||
|
internal TouchLocation? LastTouch { get; set; }
|
|||
|
}
|
|||
|
}
|