equal
deleted
inserted
replaced
252 finger := finger;//avoid compiler hint |
252 finger := finger;//avoid compiler hint |
253 end; |
253 end; |
254 |
254 |
255 procedure onTouchLongClick(finger: TTouch_Data); |
255 procedure onTouchLongClick(finger: TTouch_Data); |
256 begin |
256 begin |
|
257 {$IFDEF USE_TOUCH_INTERFACE} |
257 if isOnRect(jumpWidget.active, finger) then |
258 if isOnRect(jumpWidget.active, finger) then |
258 begin |
259 begin |
259 ParseCommand('ljump', (CurrentTeam <> nil) and not(CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel=0)); |
260 ParseCommand('ljump', (CurrentTeam <> nil) and not(CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel=0)); |
260 if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then |
261 if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then |
261 ParseCommand('gencmd R', true); |
262 ParseCommand('gencmd R', true); |
262 exit; |
263 exit; |
263 end; |
264 end; |
|
265 {$ENDIF} |
264 end; |
266 end; |
265 |
267 |
266 procedure onTouchClick(finger: TTouch_Data); |
268 procedure onTouchClick(finger: TTouch_Data); |
267 begin |
269 begin |
268 //if (RealTicks - timeSinceClick < 300) and (sqrt(sqr(finger.X-xTouchClick) + sqr(finger.Y-yTouchClick)) < 30) then |
270 //if (RealTicks - timeSinceClick < 300) and (sqrt(sqr(finger.X-xTouchClick) + sqr(finger.Y-yTouchClick)) < 30) then |
287 else |
289 else |
288 bShowAmmoMenu:= false; |
290 bShowAmmoMenu:= false; |
289 exit; |
291 exit; |
290 end; |
292 end; |
291 |
293 |
292 |
294 {$IFDEF USE_TOUCH_INTERFACE} |
293 if isOnCurrentHog(finger) or isOnRect(AMWidget.active, finger) then |
295 if isOnCurrentHog(finger) or isOnRect(AMWidget.active, finger) then |
294 begin |
296 begin |
295 bShowAmmoMenu := true; |
297 bShowAmmoMenu := true; |
296 exit; |
298 exit; |
297 end; |
299 end; |
301 ParseCommand('hjump', (CurrentTeam <> nil) and not(CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel=0)); |
303 ParseCommand('hjump', (CurrentTeam <> nil) and not(CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel=0)); |
302 if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then |
304 if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then |
303 ParseCommand('gencmd R', true); |
305 ParseCommand('gencmd R', true); |
304 exit; |
306 exit; |
305 end; |
307 end; |
|
308 {$ENDIF} |
306 end; |
309 end; |
307 |
310 |
308 function addFinger(x,y: Longword; id: TSDL_FingerId): PTouch_Data; |
311 function addFinger(x,y: Longword; id: TSDL_FingerId): PTouch_Data; |
309 var |
312 var |
310 xCursor, yCursor, index : LongInt; |
313 xCursor, yCursor, index : LongInt; |