When user lands on Directory Page, currently there was no option to change the Game Name.
Consider for example, The game name is 'The Last of Us: Remake Part 1' and user wants to change it to 'The Last of Us' and install there, it was restricted on FEdit.
Attaching code snippet where the user will now have ability to do that:
Code:
Page2Edit.FCreate(Page2.Handle);
Page2Edit.SetBounds(NSSX(100), NSSY(190), NSSX(520), NSSY(35));
Page2Edit.FontSetting('{#FontName}', VCLFontSizeToFMX2(13), ALGainsBoro);
Page2Edit.CanFocus(True);
Page2Edit.Enabled(True);
Page2Edit.Text(MinimizePathName(WizardForm.DirEdit.Text, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
Page2Edit.OnTyping(@BrowseEditOnChange);
Code:
procedure BrowseEditOnChange(Sender: TObject);
var
PrevDrive, CurrentDrive: String;
begin
PrevDrive := ExtractFileDrive(WizardForm.DirEdit.Text);
CurrentDrive := ExtractFileDrive(Page2Edit.GetText);
// Set the installation path to the edited text value
WizardForm.DirEdit.Text := Page2Edit.GetText;
if PrevDrive <> CurrentDrive then
DirUpdateProc(nil);
end;
Let me know if any of you face issues.