TouchEventOverflow ( )

Parameters

None.

Description

Returns 1 if touch buffering overflowed since the preceding snapshot. Reading does not clear it. Capacity is 32 active contacts and 256 pending events. Adjacent moves may coalesce; on overflow, exposed contacts are cancelled and touch mouse input is released. Fingers still down must lift before starting again.

iOS and Android provide native touch and acceleration, and web pages on phones and tablets provide touch. Other backends return neutral data. Read the mobile input guide for lifecycle and snapshot rules.

See also: UpdateMobileInput, GetTouchEvent, AccelerometerStatus.

Example

; TouchEventOverflow Example
; --------------------------

Graphics 640,480,0,2
SetBuffer BackBuffer()
value$="No event yet"
running=True
count=0
mode=1
While running
    UpdateMobileInput
    id=TouchID(1)
    phase=GetTouchEvent()
    toggle=KeyHit(57)
    While phase
        If phase=1
            count=count+1
            If TouchEventX()>530 And TouchEventY()<60 Then running=False
            If TouchEventY()>400 Then toggle=True
        EndIf
        phase=GetTouchEvent()
    Wend
    If KeyHit(1) Then running=False
    If MouseHit(1)
        If MouseX()>530 And MouseY()<60 Then running=False
        If MouseY()>400 Then toggle=True
    EndIf
    value$=Str(TouchEventOverflow())
    Cls
    Color 70,100,150
    Rect 535,10,95,45
    Color 255,255,255
    Text 553,23,"Exit"
    Text 20,80,"TouchEventOverflow: "+value$
    Text 20,115,"Touch/drag the screen. Escape exits on desktop."
    If Not TouchAvailable() Then Text 20,145,"No direct touch source on this target."
    If TouchDown(id) Then Oval TouchX(id)-15,TouchY(id)-15,30,30,False
    Text 20,425,"Touch values update once per game update"
    Flip
Wend
End

Index