equal
deleted
inserted
replaced
468 with moveAnim do |
468 with moveAnim do |
469 if animate then |
469 if animate then |
470 if RealTicks > (startTime + MOVE_ANIM_TIME) then |
470 if RealTicks > (startTime + MOVE_ANIM_TIME) then |
471 begin |
471 begin |
472 startTime:= 0; |
472 startTime:= 0; |
473 x:= targetToX; |
473 frame.x:= target.x; |
474 y:= targetToY; |
474 frame.y:= target.y; |
475 end |
475 end |
476 else |
476 else |
477 begin |
477 begin |
478 x:= targetFromX + Round((targetToX - targetFromX) * ((RealTicks - startTime) / MOVE_ANIM_TIME)); |
478 frame.x:= source.x + Round((target.x - source.x) * ((RealTicks - startTime) / MOVE_ANIM_TIME)); |
479 y:= targetFromY + Round((targetToY - targetFromY) * ((RealTicks - startTime) / MOVE_ANIM_TIME)); |
479 frame.y:= source.y + Round((target.y - source.y) * ((RealTicks - startTime) / MOVE_ANIM_TIME)); |
480 end; |
480 end; |
481 |
481 |
482 if show or (fadeAnimStart <> 0) then |
482 if show or (fadeAnimStart <> 0) then |
483 begin |
483 begin |
484 Tint($FF, $FF, $FF, alpha); |
484 Tint($FF, $FF, $FF, alpha); |
485 DrawTexture(x, y, spritesData[sprite].Texture, buttonScale); |
485 DrawTexture(frame.x, frame.y, spritesData[sprite].Texture, buttonScale); |
486 Tint($FF, $FF, $FF, $FF); |
486 Tint($FF, $FF, $FF, $FF); |
487 end; |
487 end; |
488 end; |
488 end; |
489 {$ENDIF} |
489 {$ENDIF} |
490 end; |
490 end; |