187 begin |
187 begin |
188 cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth); |
188 cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth); |
189 cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight); |
189 cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight); |
190 cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF}; |
190 cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF}; |
191 end; |
191 end; |
192 |
192 {$IF 0} |
|
193 //TODO: touch has become relative to the window size and has different parameters |
193 SDL_FINGERMOTION: |
194 SDL_FINGERMOTION: |
194 onTouchMotion(event.tfinger.x, event.tfinger.y,event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId); |
195 onTouchMotion(event.tfinger.x, event.tfinger.y,event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId); |
195 |
196 |
196 SDL_FINGERDOWN: |
197 SDL_FINGERDOWN: |
197 onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId); |
198 onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId); |
198 |
199 |
199 SDL_FINGERUP: |
200 SDL_FINGERUP: |
200 onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId); |
201 onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId); |
|
202 {$ENDIF} |
201 {$ELSE} |
203 {$ELSE} |
202 SDL_KEYDOWN: |
204 SDL_KEYDOWN: |
203 if GameState = gsChat then |
205 if GameState = gsChat then |
204 KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym) |
206 KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym) |
205 else |
207 else |