| 738 | } |
| 739 | |
| 740 | bool UserEventStream::ProcessTouch(TouchEvent const & touch) |
| 741 | { |
| 742 | ASSERT(touch.GetFirstTouch().m_id != -1, ()); |
| 743 | |
| 744 | TouchEvent touchEvent = touch; |
| 745 | touchEvent.PrepareTouches(m_touches); |
| 746 | bool isMapTouch = false; |
| 747 | |
| 748 | switch (touchEvent.GetTouchType()) |
| 749 | { |
| 750 | case TouchEvent::TOUCH_DOWN: isMapTouch = TouchDown(touchEvent.GetTouches()); break; |
| 751 | case TouchEvent::TOUCH_MOVE: isMapTouch = TouchMove(touchEvent.GetTouches()); break; |
| 752 | case TouchEvent::TOUCH_CANCEL: isMapTouch = TouchCancel(touchEvent.GetTouches()); break; |
| 753 | case TouchEvent::TOUCH_UP: isMapTouch = TouchUp(touchEvent.GetTouches()); break; |
| 754 | default: ASSERT(false, ()); break; |
| 755 | } |
| 756 | |
| 757 | if (m_listener) |
| 758 | m_listener->OnTouchMapAction(touchEvent.GetTouchType(), isMapTouch); |
| 759 | |
| 760 | return isMapTouch; |
| 761 | } |
| 762 | |
| 763 | bool UserEventStream::TouchDown(std::array<Touch, 2> const & touches) |
| 764 | { |
nothing calls this directly
no test coverage detected