diff --git a/config.json b/config.json index be25eea..5bdfcd0 100644 --- a/config.json +++ b/config.json @@ -17,8 +17,8 @@ "stones": [ [0.05, 0.05, 0.05], [0.95, 0.95, 0.95] ], "ghost_alpha": 0.5, "eval_colors": [[0.537, 0.129, 0.42], [1, 0, 0], [1, 0.95, 0], [0.117, 0.588, 0]], - "undo_circle_col": [0.88,0.02,0.17,0.5], - "undo_alpha": 0.5, + "undo_alpha": 0.5, + "undo_scale": 0.95, "eval_knots": [0, 0.5, 0.875, 1], "eval_bounds": [1,12], "board_margin": 1.5, diff --git a/katrain.py b/katrain.py index 5ed46b2..f0a2087 100644 --- a/katrain.py +++ b/katrain.py @@ -148,15 +148,15 @@ class BadukPanWidget(Widget): Rectangle(pos=(self.gridpos[x] - rsz / 2, self.gridpos[y] - rsz / 2), size=(rsz, rsz)) ix = ix + 1 - # undos + # children of current moves in undo / review undo_coords = set() alpha = Config.get("ui")["undo_alpha"] for m in last_move.children: eval_info = m.evaluation_info - if eval_info[0] and m.coords[0] is not None: + if m.coords[0] is not None: undo_coords.add(m.coords) - evalcol = (*self._eval_spectrum(eval_info[0]), alpha) - self.draw_stone(m.coords[0], m.coords[1], (*COLORS[m.player][:3], alpha), Config.get("ui")["undo_circle_col"], evalcol, self.EVAL_BOUNDS[1]) + evalcol = (*self._eval_spectrum(eval_info[0]), alpha) if eval_info[0] else None + self.draw_stone(m.coords[0], m.coords[1], (*COLORS[m.player][:3], alpha), None, evalcol, self.EVAL_BOUNDS[1], scale=Config.get("ui").get("undo_scale", 0.95)) # hints if self.engine.hints.active(current_player):