Example #1
0
	void OnGUI () {
		string Str;
		int NumTouch = 0;
		if (!m_Initialised)
		{
			Str = "TouchTest";
			if (Initialise(Str) < 0)
			{
				// ERROR STATE
			}
			m_Initialised = true;
		}
		
		NumTouch = GetTouchPointCount ();
		Str = "Number of Touch Points: " + NumTouch.ToString();
		GUI.Label (new Rect (10,10,150,40), Str);
		for (int p=0; p<NumTouch; p++)
		{
			tTouchData TouchData = new tTouchData();
			GetTouchPoint (p, TouchData);
			GUI.Label (new Rect (10,10 + (p+1) * 40, 200, 40), 
				"ID:" + TouchData.m_ID + 
				"Time:" + TouchData.m_Time.ToString() + 
				"(" + TouchData.m_x.ToString() + "," + TouchData.m_y.ToString() + ")");
			
		}
	}	
Example #2
0
	public static extern void GetTouchPoint(int i, tTouchData n);