Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to hide captured stones panel #325

Merged
merged 1 commit into from
Jul 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/featurecat/lizzie/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/featurecat/lizzie/gui/LizzieFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down