Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiraoka committed Dec 5, 2020
2 parents 6d14ec4 + a9bd72a commit 7e3bd48
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.classpath
.project
.settings
gtp.log
persist.properties
persist
lizzie.properties
Expand All @@ -15,3 +19,4 @@ target
leelaz_opencl_tuning
*.sh
*.jar
gtp_logs
11 changes: 6 additions & 5 deletions src/main/java/featurecat/lizzie/Lizzie.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@ private static void mainInEDT() {
public static void initializeEngineManager() {
try {
engineManager = new EngineManager(config);
if (mainArgs.length == 1) {
frame.loadFile(new File(mainArgs[0]));
} else if (config.config.getJSONObject("ui").getBoolean("resume-previous-game")) {
board.resumePreviousGame();
}
} catch (IOException e) {
frame.openConfigDialog();
Utils.showMessageDialog(frame, "Please restart Lizzie to apply changes.");
System.exit(1);
}

if (mainArgs.length == 1) {
frame.loadFile(new File(mainArgs[0]));
} else if (config.config.getJSONObject("ui").getBoolean("resume-previous-game")) {
board.resumePreviousGame();
}
}

public static void initializeAfterVersionCheck(Leelaz lz) {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/featurecat/lizzie/gui/ConfigDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -1827,9 +1827,8 @@ private String getEngineLine() {
new FileNameExtensionFilter(
resourceBundle.getString("LizzieConfig.title.engine"), "exe", "bat", "sh");
chooser.setFileFilter(filter);
} else {
setVisible(false);
}

chooser.setMultiSelectionEnabled(false);
chooser.setDialogTitle(resourceBundle.getString("LizzieConfig.prompt.selectEngine"));
int result = chooser.showOpenDialog(this);
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/featurecat/lizzie/gui/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,12 @@ public void actionPerformed(ActionEvent e) {
Lizzie.config.showKataGoEstimate = false;
if (Lizzie.leelaz.isPondering()) Lizzie.leelaz.ponder();
Lizzie.frame.removeEstimateRect();
Lizzie.config.uiConfig.put("show-katago-estimate", Lizzie.config.showKataGoEstimate);
try {
Lizzie.config.save();
} catch (IOException es) {
// TODO Auto-generated catch block
}
}
});

Expand Down Expand Up @@ -1387,6 +1393,7 @@ public void updateEngineMenu(List<Leelaz> engineList) {
if (engineDt != null) {
if (engineDt.nicknameOrCurrentWeight() != "")
engine[i].setText(engine[i].getText() + " : " + engineDt.nicknameOrCurrentWeight());
engine[i].setToolTipText(engineDt.engineCommand());
engine[i].setVisible(true);
int a = i;
engine[i].addActionListener(
Expand Down

0 comments on commit 7e3bd48

Please sign in to comment.