iOS Touches Not Recognized

Monkey Targets Forums/iOS/iOS Touches Not Recognized

Marky Potatoes(Posted 2012) [#1]
Hi,

I just got Monkey last night, and so far I really like the languages and how it integrates pretty well with most targets - even to the point that most target build sizes are reasonable.

However, I was trying to get TouchDown() working with the iOS simulator when I clicked it, and it doesn't seem to be working. I know on the iOS simulator, a touch gesture is simulated through mouse drag and drops.

My code is as follows. Just a simple test:

Strict

Import mojo

Class GameApp Extends App
Field x:Int

Method OnCreate:Int()
x = 0
Return 0
End Method

Method OnUpdate:Int()
x = 0
For Local i:Int = 0 Until 32
x = x + TouchDown(i)
Next i
Return 0
End Method

Method OnRender:Int()
Cls
SetColor(255, 0, 255)
DrawText(String(x), 0, 0)
Return 0
End Method
End Class

Function Main:Int()
New GameApp()
Return 0
End Function


Neuro(Posted 2012) [#2]
I think if you add a "SetUpdateRate 60" to the OnCreate() method, you may see something.


Marky Potatoes(Posted 2012) [#3]
That did it, thanks.