Advertisement
dominus

Untitled

May 10th, 2020
1,544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.50 KB | None | 0 0
  1. function NextButtonClick(CurPageID: Integer): Boolean;
  2. var
  3.   iBGVerified: Integer;
  4.   iSIVerified: Integer;
  5.   sDir : string;
  6. begin
  7.  
  8.   if CurPageID = DataDirPage.ID then begin
  9.  
  10.       sDir := BGEdit.Text;
  11.       if Length(sDir) > 0 then begin iBGVerified := VerifyBGDirectory ( sDir );
  12.       end else iBGVerified := 0;
  13.  
  14.       sDir := SIEdit.Text;
  15.       if Length(sDir) > 0 then begin iSIVerified := VerifySIDirectory ( sDir );
  16.       end else iSIVerified := 0;
  17.  
  18.       if (iBGVerified = 0) AND (iSIVerified = 0) then begin
  19.         if MsgBox ('Warning: No valid game installations found. Do you wish to continue?', mbError, MB_YESNO or MB_DEFBUTTON2) = IDYES then begin
  20.           Result := True;
  21.         end else
  22.           Result := False;
  23.       end else
  24.         Result := True;
  25.      
  26.       if (iBGVerified = 0)  AND (iSIVerified = 1) then begin
  27.         if MsgBox ('Warning: No valid installation of Ultima VII: The Black Gate. Do you wish to continue?', mbError, MB_YESNO or MB_DEFBUTTON2) = IDYES then begin
  28.           Result := True;
  29.         end else
  30.           Result := False;
  31.       end else
  32.         Result := True;
  33.      
  34.       if (iSIVerified = 0)  AND (iBGVerified = 1) then begin
  35.         if MsgBox ('Warning: No valid installation of Ultima VII Part 2: Serpent Isle. Do you wish to continue?', mbError, MB_YESNO or MB_DEFBUTTON2) = IDYES then begin
  36.           Result := True;
  37.         end else
  38.           Result := False;
  39.       end else
  40.         Result := True;
  41.   end else
  42.     Result := True;
  43. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement