From b20aa59affc8cd8f35f34f9a2f201b7fb5b0820f Mon Sep 17 00:00:00 2001 From: Olivier Blanvillain Date: Sat, 14 Jul 2018 10:48:33 +0200 Subject: [PATCH] Add setting to hide captured stones panel --- src/main/java/featurecat/lizzie/Config.java | 3 +++ src/main/java/featurecat/lizzie/gui/LizzieFrame.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/featurecat/lizzie/Config.java b/src/main/java/featurecat/lizzie/Config.java index 768910e99..e6c8819a0 100644 --- a/src/main/java/featurecat/lizzie/Config.java +++ b/src/main/java/featurecat/lizzie/Config.java @@ -16,6 +16,7 @@ public class Config { public boolean showWinrate = true; public boolean showVariationGraph = true; public boolean showRawBoard = false; + public boolean showCaptured = true; public boolean handicapInsteadOfWinrate = false; public boolean showBranch = true; @@ -136,6 +137,7 @@ public Config() throws IOException { showBranch = uiConfig.getBoolean("show-leelaz-variation"); showWinrate = uiConfig.getBoolean("show-winrate"); showVariationGraph = uiConfig.getBoolean("show-variation-graph"); + showCaptured = uiConfig.getBoolean("show-captured"); showBestMoves = uiConfig.getBoolean("show-best-moves"); showNextMoves = uiConfig.getBoolean("show-next-moves"); showSubBoard = uiConfig.getBoolean("show-subboard"); @@ -251,6 +253,7 @@ private JSONObject createDefaultConfig() { ui.put("show-leelaz-variation", true); ui.put("show-winrate", true); ui.put("show-variation-graph", true); + ui.put("show-captured", true); ui.put("show-best-moves", true); ui.put("show-next-moves", true); ui.put("show-subboard", true); diff --git a/src/main/java/featurecat/lizzie/gui/LizzieFrame.java b/src/main/java/featurecat/lizzie/gui/LizzieFrame.java index 172fc34a3..4d79865ca 100644 --- a/src/main/java/featurecat/lizzie/gui/LizzieFrame.java +++ b/src/main/java/featurecat/lizzie/gui/LizzieFrame.java @@ -115,7 +115,7 @@ public LizzieFrame() { variationTree = new VariationTree(); winrateGraph = new WinrateGraph(); - setMinimumSize( new Dimension(640,480) ); + setMinimumSize( new Dimension(640,480) ); setLocationRelativeTo(null); // start centered JSONArray windowSize = Lizzie.config.uiConfig.getJSONArray("window-size"); setSize(windowSize.getInt(0), windowSize.getInt(1)); // use config file window size @@ -408,7 +408,8 @@ public void paint(Graphics g0) { drawPonderingState(g, resourceBundle.getString("LizzieFrame.display.loading"), loadingX, loadingY, loadingSize); } - drawCaptured(g, capx, capy, capw, caph); + if (Lizzie.config.showCaptured) + drawCaptured(g, capx, capy, capw, caph); // cleanup g.dispose();