no hints if policy moves on
This commit is contained in:
1 parent
a0d0bba58e
commit
aed7b52f00
3 files changed
+5
-4
No files matched your search
+3
-1
@@ -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")
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user