back to branching point
This commit is contained in:
1 parent
4d3c134e49
commit
a02697c783
8 files changed
+39
-28
No files matched your search
@@ -457,17 +457,16 @@ class BadukPanWidget(Widget):
|
||||
|
||||
self.draw_hover_contents()
|
||||
|
||||
def draw_roi_box(self,region_of_interest,width=2):
|
||||
def draw_roi_box(self, region_of_interest, width=2):
|
||||
xmin, xmax, ymin, ymax = region_of_interest
|
||||
Color(*LIGHTER_BACKGROUND_COLOR)
|
||||
Line(
|
||||
rectangle=(
|
||||
self.gridpos_x[xmin] - self.grid_size/6,
|
||||
self.gridpos_y[ymin] - self.grid_size/6,
|
||||
(xmax - xmin + 1/3) * self.grid_size,
|
||||
(ymax - ymin + 1/3) * self.grid_size,
|
||||
self.gridpos_x[xmin] - self.grid_size / 3,
|
||||
self.gridpos_y[ymin] - self.grid_size / 3,
|
||||
(xmax - xmin + 2 / 3) * self.grid_size,
|
||||
(ymax - ymin + 2 / 3) * self.grid_size,
|
||||
),
|
||||
dash_length=10,dash_offset=10,
|
||||
width=width,
|
||||
)
|
||||
|
||||
@@ -627,7 +626,7 @@ class BadukPanWidget(Widget):
|
||||
|
||||
if self.selecting_region_of_interest and len(self.region_of_interest) == 4:
|
||||
x1, x2, y1, y2 = self.region_of_interest
|
||||
self.draw_roi_box([min(x1, x2), max(x1, x2), min(y1, y2), max(y1, y2)],width=2)
|
||||
self.draw_roi_box([min(x1, x2), max(x1, x2), min(y1, y2), max(y1, y2)], width=dp(2))
|
||||
else:
|
||||
# hover next move ghost stone
|
||||
if self.ghost_stone:
|
||||
@@ -641,8 +640,7 @@ class BadukPanWidget(Widget):
|
||||
self.draw_pv(pv, node, up_to_move)
|
||||
|
||||
if self.katrain.game.region_of_interest:
|
||||
self.draw_roi_box(self.katrain.game.region_of_interest, width=1) # dashed
|
||||
|
||||
self.draw_roi_box(self.katrain.game.region_of_interest, width=dp(1.25))
|
||||
|
||||
def animate_pv(self, _dt):
|
||||
if self.animating_pv:
|
||||
|
||||
@@ -92,7 +92,12 @@ class ControlsPanel(BoxLayout):
|
||||
|
||||
def set_status(self, msg, status_type, at_node=None, check_level=True):
|
||||
at_node = at_node or self.katrain and self.katrain.game and self.katrain.game.current_node
|
||||
if at_node != self.status_state[2] or not check_level or int(status_type) >= int(self.status_state[1]) or msg == "":
|
||||
if (
|
||||
at_node != self.status_state[2]
|
||||
or not check_level
|
||||
or int(status_type) >= int(self.status_state[1])
|
||||
or msg == ""
|
||||
):
|
||||
if self.status_state != (msg, status_type, at_node): # prevent loop if error in update eval
|
||||
Clock.schedule_once(self.update_evaluation, 0)
|
||||
self.status_state = (msg, status_type, at_node)
|
||||
|
||||
@@ -187,7 +187,7 @@ class MoveTreeCanvas(Widget):
|
||||
|
||||
class MoveTree(ScrollView, BackgroundMixin):
|
||||
current_node = ObjectProperty(None)
|
||||
min_height = NumericProperty(dp(50)) # non-expanded height, to determine the node size
|
||||
min_height = NumericProperty(dp(50)) # non-expanded height, to determine the node size
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
Reference in new issue
Block a user