Skip to content

Commit

Permalink
feature: add shortcut m for toggle the move num of nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Jan 4, 2024
1 parent 612d135 commit 0c64433
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ In addition to shortcuts mentioned above and those shown in the main menu:
* **[~]** or **[ ` ]** or **[F12]**: Cycles through more minimalistic UI modes.
* **[k]**: Toggle display of board coordinates.
* **[p]**: Pass
* **[m]**: Toggle the move number on the board
* **[pause]**: Pause/Resume timer
* **[arrow left]** or **[z]**: Undo move. Hold shift for 10 moves at a time, or ctrl to skip to the start.
* **[arrow right]** or **[x]**: Redo move. Hold shift for 10 moves at a time, or ctrl to skip to the end.
Expand Down
4 changes: 2 additions & 2 deletions katrain/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __init__(self, **kwargs):
self.contribute_popup = None

self.pondering = False
self.move_num = False
self.show_move_num = False

self.animate_contributing = False
self.message_queue = Queue()
Expand Down Expand Up @@ -176,7 +176,7 @@ def toggle_continuous_analysis(self, quiet=False):
self.update_state()

def toggle_move_num(self):
self.move_num = not self.move_num
self.show_move_num = not self.show_move_num
self.update_state()

def start(self):
Expand Down
6 changes: 0 additions & 6 deletions katrain/gui/badukpan.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,6 @@ def draw_stone(
texture=cached_texture(Theme.LAST_MOVE_TEXTURE),
)

if depth:
text = str(depth)
Color(*Theme.NUMBER_COLOR)
draw_text(pos=self.gridpos[y][x], text=text, font_size=self.stone_size*0.9, font_name="Roboto")

def eval_color(self, points_lost, show_dots_for_class: List[bool] = None) -> Optional[List[float]]:
i = evaluation_class(points_lost, self.trainer_config["eval_thresholds"])
colors = Theme.EVAL_COLORS[self.trainer_config["theme"]]
Expand Down Expand Up @@ -669,7 +664,6 @@ def draw_board_contents(self, *_args):
if ownership_grid and not loss_grid and not new_move
else None,
loss=loss_grid[m.coords[1]][m.coords[0]] if loss_grid else None,
depth=node.depth if katrain.move_num else None,
)
realized_points_lost = node.parent_realized_points_lost

Expand Down

0 comments on commit 0c64433

Please sign in to comment.