MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / handle

Method handle

Source/Input/TouchDispather.cpp:106–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 : _target(target) { }
105
106bool NodeTouchHandler::handle(const SDL_Event& event) {
107 switch (event.type) {
108 case SDL_MOUSEBUTTONUP:
109 case SDL_FINGERUP:
110 return up(event) && isSwallowTouches();
111 case SDL_MOUSEBUTTONDOWN:
112 case SDL_FINGERDOWN:
113 return down(event) && isSwallowTouches();
114 case SDL_MOUSEMOTION:
115 case SDL_FINGERMOTION:
116 return move(event) && isSwallowTouches();
117 case SDL_MOUSEWHEEL:
118 return wheel(event) && isSwallowMouseWheel();
119 case SDL_MULTIGESTURE:
120 return gesture(event) && isSwallowTouches();
121 }
122 return false;
123}
124
125Touch* NodeTouchHandler::alloc(SDL_FingerID fingerId) {
126 auto it = _touchMap.find(fingerId);

Callers 1

dispatchMethod · 0.45

Calls 3

downFunction · 0.85
moveFunction · 0.85
upFunction · 0.50

Tested by

no test coverage detected