Advertisement
mixster

Untitled

Aug 28th, 2010
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. var
  2. accel, move, senderTab, pan: integer;
  3. cons: array [IMG_TAB_NORM_1..IMG_TAB_NORM_1 + PANEL_NUM - 1] of integer;
  4.  
  5. procedure TimerTabClick(Sender: TObject);
  6. var
  7. i, e, d, top, bottom: Integer;
  8. begin
  9. d := integer(isLeftTab[senderTab])* 2 - 1;
  10. if isLeftTab[senderTab] then
  11. begin
  12. top := IMG_TAB_NORM_1 + PANEL_NUM - 1
  13. bottom := senderTab + 1;
  14. end else
  15. begin
  16. top := senderTab;
  17. bottom := IMG_TAB_NORM_1
  18. end;
  19.  
  20. if move = 0 then
  21. for e := bottom to top do
  22. cons[e] := tImages[e].Left;
  23. accel := accel + 2;
  24. move := move + accel;
  25. for i := bottom to top do
  26. if isLeftTab[i] = isLeftTab[senderTab] then
  27. tImages[i].Left := tImages[i].Left + accel * d;
  28. if move >= 377 then
  29. begin
  30. for e := bottom to top do
  31. if isLeftTab[e] = isLeftTab[senderTab] then
  32. begin
  33. tImages[e].Left := cons[e] + 377 * d;
  34. isLeftTab[e] := not isLeftTab[senderTab];
  35. end;
  36. time.ENABLED := false;
  37. end;
  38.  
  39. if pan < senderTab then
  40. begin
  41. panels[pan].width := panels[pan].width - accel;
  42. panels[senderTab].left := panels[senderTab].left - accel;
  43. panels[senderTab].width := panels[senderTab].width + accel;
  44. end;
  45. if pan > senderTab then
  46. begin
  47. panels[pan].left := panels[pan].left + accel;
  48. panels[pan].width := panels[pan].width - accel;
  49. panels[senderTab].width := panels[senderTab].width + accel;
  50. end;
  51. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement