diff --git a/katrain/gui.kv b/katrain/gui.kv index acfcd2a..fef7bf0 100644 --- a/katrain/gui.kv +++ b/katrain/gui.kv @@ -697,12 +697,13 @@ halign: 'center' font_size: root.height / 3 font_name: root.font_name - color: checkbox.selected_color if checkbox.active else checkbox.unselected_color + color: checkbox.disabled_color if root.disabled else (checkbox.selected_color if checkbox.active else checkbox.unselected_color) size_hint_x: None width: self.texture_size[0] + 4 on_left_press: checkbox.active = not checkbox.active MDCheckbox: id: checkbox + disabled: root.disabled size_hint: None,0.5 pos_hint: {'center_y': 0.5} width: self.height @@ -789,6 +790,7 @@ AnalysisToggle: id: hints text: i18n._("analysis:topmoves") + disabled: policy.checkbox.active AnalysisToggle: id: policy text: i18n._("analysis:policy") diff --git a/katrain/gui/badukpan.py b/katrain/gui/badukpan.py index 7e38cfc..488d354 100644 --- a/katrain/gui/badukpan.py +++ b/katrain/gui/badukpan.py @@ -268,7 +268,6 @@ class BadukPanWidget(Widget): nodes = katrain.game.current_node.nodes_from_root realized_points_lost = None - katrain.config("trainer/show_dots") for i, node in enumerate(nodes[::-1]): # reverse order! points_lost = node.points_lost evalscale = 1 @@ -410,7 +409,7 @@ class BadukPanWidget(Widget): self.active_pv_moves = [] # hints or PV - if katrain.analysis_controls.hints.active and not game_ended: + if katrain.analysis_controls.hints.active and not katrain.analysis_controls.policy.active and not game_ended: hint_moves = current_node.candidate_moves for i, move_dict in enumerate(hint_moves): move = Move.from_gtp(move_dict["move"]) diff --git a/katrain/gui/kivyutils.py b/katrain/gui/kivyutils.py index 1cd1521..40a3e43 100644 --- a/katrain/gui/kivyutils.py +++ b/katrain/gui/kivyutils.py @@ -372,7 +372,7 @@ class AnalysisToggle(MDBoxLayout): text = StringProperty("") default_active = BooleanProperty(False) font_name = StringProperty(DEFAULT_FONT) - + disabled = BooleanProperty(False) def trigger_action(self, *args, **kwargs): return self.checkbox.trigger_action(*args, **kwargs)