Made the 'patching complete' dialog stay open, when the game cannot or should not be run
This commit is contained in:
parent
30a2b05483
commit
22bf3b0e76
1 changed files with 23 additions and 16 deletions
|
@ -773,7 +773,14 @@ public class ManagerFrame extends JFrame implements ActionListener, HashObserver
|
|||
resDat.bakFile = new File( backupDir, "resource.dat.bak" );
|
||||
|
||||
ModPatchDialog patchDlg = new ModPatchDialog( this, true );
|
||||
patchDlg.setSuccessTask( new SpawnGameTask() );
|
||||
|
||||
String neverRunFtl = appConfig.getProperty( "never_run_ftl", "false" );
|
||||
if ( !neverRunFtl.equals("true") ) {
|
||||
File exeFile = FTLUtilities.findGameExe( datsDir );
|
||||
if ( exeFile != null ) {
|
||||
patchDlg.setSuccessTask( new SpawnGameTask( exeFile ) );
|
||||
}
|
||||
}
|
||||
|
||||
log.info( "" );
|
||||
log.info( "Patching..." );
|
||||
|
@ -917,13 +924,14 @@ public class ManagerFrame extends JFrame implements ActionListener, HashObserver
|
|||
|
||||
|
||||
private class SpawnGameTask implements Runnable {
|
||||
private final File exeFile;
|
||||
|
||||
public SpawnGameTask( File exeFile ) {
|
||||
this.exeFile = exeFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
String neverRunFtl = appConfig.getProperty( "never_run_ftl", "false" );
|
||||
if ( !neverRunFtl.equals("true") ) {
|
||||
File datsDir = new File( appConfig.getProperty( "ftl_dats_path" ) );
|
||||
|
||||
File exeFile = FTLUtilities.findGameExe( datsDir );
|
||||
if ( exeFile != null ) {
|
||||
int response = JOptionPane.showConfirmDialog( ManagerFrame.this, "Do you want to run the game now?", "Ready to Play", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE );
|
||||
if ( response == JOptionPane.YES_OPTION ) {
|
||||
|
@ -938,7 +946,6 @@ public class ManagerFrame extends JFrame implements ActionListener, HashObserver
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue