Windows, Android, Html5, and flash all can be used in devices with or without mouse. There should be away to detect that. Sure now it is not a big issue now but what happens when Windows tablet start getting popular?
I was working on a game with a world map and Showing TouchX() and TouchY() will be useful unless there is no mouse, then there will be no point of printing it.
mouseEnabled:Bool
mouseX:Int
mouseY:Int
Method new()
mouseEnabled=Flase
mouseX=TouchX()
mouseY=TouchY()
End
Method Update:Void()
If (mouseX<>TouchX() Or mouseY<>TouchY())And Not TouchDown() Then mouseEnabled=True
End
Method Draw:Void()
If mouseEnabled Then TextDraw(TouchX()+","+TouchY(),0,0)
End
|