Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Code]
- type
- TPositionStorage = array of Integer;
- var
- LinkLabel: TLabel;
- CompPageModified: Boolean;
- CompPagePositions: TPositionStorage;
- procedure LinkClick(Sender: TObject);
- var
- ErrorCode: Integer;
- begin
- ShellExec('', 'https://www.facebook.com/groups/jyrka98sMods/', '', '', SW_SHOW, ewNoWait,
- ErrorCode);
- end;
- procedure SaveComponentsPage(out Storage: TPositionStorage);
- begin
- SetArrayLength(Storage, 10);
- Storage[0] := WizardForm.Height;
- Storage[1] := WizardForm.NextButton.Top;
- Storage[2] := WizardForm.BackButton.Top;
- Storage[3] := WizardForm.CancelButton.Top;
- Storage[4] := WizardForm.ComponentsList.Height;
- Storage[5] := WizardForm.OuterNotebook.Height;
- Storage[6] := WizardForm.InnerNotebook.Height;
- Storage[7] := WizardForm.Bevel.Top;
- Storage[8] := WizardForm.BeveledLabel.Top;
- Storage[9] := WizardForm.ComponentsDiskSpaceLabel.Top;
- end;
- procedure LoadComponentsPage(const Storage: TPositionStorage;
- HeightOffset: Integer);
- begin
- if GetArrayLength(Storage) <> 10 then
- RaiseException('Invalid storage array length.');
- WizardForm.Height := Storage[0] + HeightOffset;
- WizardForm.NextButton.Top := Storage[1] + HeightOffset;
- WizardForm.BackButton.Top := Storage[2] + HeightOffset;
- WizardForm.CancelButton.Top := Storage[3] + HeightOffset;
- WizardForm.ComponentsList.Height := Storage[4] + HeightOffset;
- WizardForm.OuterNotebook.Height := Storage[5] + HeightOffset;
- WizardForm.InnerNotebook.Height := Storage[6] + HeightOffset;
- WizardForm.Bevel.Top := Storage[7] + HeightOffset;
- WizardForm.BeveledLabel.Top := Storage[8] + HeightOffset;
- WizardForm.ComponentsDiskSpaceLabel.Top := Storage[9] + HeightOffset;
- end;
- procedure InitializeWizard;
- begin
- CompPageModified := False;
- LinkLabel := TLabel.Create(WizardForm);
- LinkLabel.Parent := WizardForm;
- LinkLabel.Left := 8;
- LinkLabel.Top := WizardForm.ClientHeight -
- LinkLabel.ClientHeight - 8;
- LinkLabel.Cursor := crHand;
- LinkLabel.Font.Color := clBlue;
- LinkLabel.Font.Style := [fsUnderline];
- LinkLabel.Caption := 'Visit jyrka98s mods facebook page';
- LinkLabel.OnClick := @LinkClick;
- end;
- procedure CurPageChanged(CurPageID: Integer);
- begin
- LinkLabel.Visible := CurPageID <> wpLicense;
- if CurpageID = wpSelectComponents then
- begin
- SaveComponentsPage(CompPagePositions);
- LoadComponentsPage(CompPagePositions, 200);
- CompPageModified := True;
- end
- else
- if CompPageModified then
- begin
- LoadComponentsPage(CompPagePositions, 0);
- CompPageModified := False;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment