Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- accel, move, senderTab, pan: integer;
- cons: array [IMG_TAB_NORM_1..IMG_TAB_NORM_1 + PANEL_NUM - 1] of integer;
- procedure TimerTabClick(Sender: TObject);
- var
- i, e, d, top, bottom: Integer;
- begin
- d := integer(isLeftTab[senderTab])* 2 - 1;
- if isLeftTab[senderTab] then
- begin
- top := IMG_TAB_NORM_1 + PANEL_NUM - 1
- bottom := senderTab + 1;
- end else
- begin
- top := senderTab;
- bottom := IMG_TAB_NORM_1
- end;
- if move = 0 then
- for e := bottom to top do
- cons[e] := tImages[e].Left;
- accel := accel + 2;
- move := move + accel;
- for i := bottom to top do
- if isLeftTab[i] = isLeftTab[senderTab] then
- tImages[i].Left := tImages[i].Left + accel * d;
- if move >= 377 then
- begin
- for e := bottom to top do
- if isLeftTab[e] = isLeftTab[senderTab] then
- begin
- tImages[e].Left := cons[e] + 377 * d;
- isLeftTab[e] := not isLeftTab[senderTab];
- end;
- time.ENABLED := false;
- end;
- if pan < senderTab then
- begin
- panels[pan].width := panels[pan].width - accel;
- panels[senderTab].left := panels[senderTab].left - accel;
- panels[senderTab].width := panels[senderTab].width + accel;
- end;
- if pan > senderTab then
- begin
- panels[pan].left := panels[pan].left + accel;
- panels[pan].width := panels[pan].width - accel;
- panels[senderTab].width := panels[senderTab].width + accel;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement