Setup: prevent clicking next when no rom file is selected.

This commit is contained in:
Fabian Dill 2021-11-14 23:14:52 +01:00
parent 3658c9f8e3
commit bd8e1f6531
2 changed files with 22 additions and 4 deletions

View File

@ -327,7 +327,16 @@ begin
MinecraftDownloadPage.Hide; MinecraftDownloadPage.Hide;
end; end;
Result := True; Result := True;
end else end
else if (assigned(LttPROMFilePage)) and (CurPageID = LttPROMFilePage.ID) then
Result := not (LttPROMFilePage.Values[0] = '')
else if (assigned(SMROMFilePage)) and (CurPageID = SMROMFilePage.ID) then
Result := not (SMROMFilePage.Values[0] = '')
else if (assigned(SoEROMFilePage)) and (CurPageID = SoEROMFilePage.ID) then
Result := not (SoEROMFilePage.Values[0] = '')
else if (assigned(OoTROMFilePage)) and (CurPageID = OoTROMFilePage.ID) then
Result := not (OoTROMFilePage.Values[0] = '')
else
Result := True; Result := True;
end; end;
@ -383,7 +392,7 @@ function GetOoTROMPath(Param: string): string;
begin begin
if Length(ootrom) > 0 then if Length(ootrom) > 0 then
Result := ootrom Result := ootrom
else if Assigned(OoTROMFilePage) then else if (Assigned(OoTROMFilePage)) then
begin begin
R := CompareStr(GetMD5OfFile(OoTROMFilePage.Values[0]), '5bd1fe107bf8106b2ab6650abecd54d6') * CompareStr(GetMD5OfFile(OoTROMFilePage.Values[0]), '6697768a7a7df2dd27a692a2638ea90b') * CompareStr(GetMD5OfFile(OoTROMFilePage.Values[0]), '05f0f3ebacbc8df9243b6148ffe4792f'); R := CompareStr(GetMD5OfFile(OoTROMFilePage.Values[0]), '5bd1fe107bf8106b2ab6650abecd54d6') * CompareStr(GetMD5OfFile(OoTROMFilePage.Values[0]), '6697768a7a7df2dd27a692a2638ea90b') * CompareStr(GetMD5OfFile(OoTROMFilePage.Values[0]), '05f0f3ebacbc8df9243b6148ffe4792f');
if R <> 0 then if R <> 0 then

View File

@ -327,7 +327,16 @@ begin
MinecraftDownloadPage.Hide; MinecraftDownloadPage.Hide;
end; end;
Result := True; Result := True;
end else end
else if (assigned(LttPROMFilePage)) and (CurPageID = LttPROMFilePage.ID) then
Result := not (LttPROMFilePage.Values[0] = '')
else if (assigned(SMROMFilePage)) and (CurPageID = SMROMFilePage.ID) then
Result := not (SMROMFilePage.Values[0] = '')
else if (assigned(SoEROMFilePage)) and (CurPageID = SoEROMFilePage.ID) then
Result := not (SoEROMFilePage.Values[0] = '')
else if (assigned(OoTROMFilePage)) and (CurPageID = OoTROMFilePage.ID) then
Result := not (OoTROMFilePage.Values[0] = '')
else
Result := True; Result := True;
end; end;