diff --git a/src/main/java/featurecat/lizzie/gui/LizzieFrame.java b/src/main/java/featurecat/lizzie/gui/LizzieFrame.java index 434828245..1003f1c9c 100644 --- a/src/main/java/featurecat/lizzie/gui/LizzieFrame.java +++ b/src/main/java/featurecat/lizzie/gui/LizzieFrame.java @@ -1030,6 +1030,17 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int g.setColor(Color.BLACK); g.fillRect(barPosxB, barPosY, barWidthB, barHeight); + // Draw change of winrate bars + if (validWinrate && validLastWinrate) { + double blackLastWR = Lizzie.board.getData().blackToPlay ? 100 - lastWR : lastWR; + int lastPosxW = barPosxB + (int) (blackLastWR * maxBarwidth / 100); + Stroke oldstroke = g.getStroke(); + g.setStroke(new BasicStroke(strokeRadius)); + g.setColor(Color.GRAY); + g.drawLine(lastPosxW, barPosY, lastPosxW, barPosY + barHeight); + g.setStroke(oldstroke); + } + // Show percentage above bars g.setColor(Color.WHITE); g.drawString( diff --git a/src/main/java/featurecat/lizzie/gui/WinratePane.java b/src/main/java/featurecat/lizzie/gui/WinratePane.java index 9b40e8571..42fda26fc 100644 --- a/src/main/java/featurecat/lizzie/gui/WinratePane.java +++ b/src/main/java/featurecat/lizzie/gui/WinratePane.java @@ -251,6 +251,17 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int g.setColor(Color.BLACK); g.fillRect(barPosxB, barPosY, barWidthB, barHeight); + // Draw change of winrate bars + if (validWinrate && validLastWinrate) { + double blackLastWR = Lizzie.board.getData().blackToPlay ? 100 - lastWR : lastWR; + int lastPosxW = barPosxB + (int) (blackLastWR * maxBarwidth / 100); + Stroke oldstroke = g.getStroke(); + g.setStroke(new BasicStroke(strokeRadius)); + g.setColor(Color.GRAY); + g.drawLine(lastPosxW, barPosY, lastPosxW, barPosY + barHeight); + g.setStroke(oldstroke); + } + // Show percentage above bars g.setColor(Color.WHITE); g.drawString(