commit 3550d3f406da4956ffc3bf64f65a847f7cbb2e61
parent 9ff6e7e5e5b06ae6f1d2187f9e51969ab999af0c
Author: Erik Letson <hmagellan@hmagellan.com>
Date: Sun, 15 Nov 2020 18:30:04 -0600
made camera snap when starting to move a piece
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/turn.py b/src/turn.py
@@ -186,6 +186,7 @@ class TurnManager(manager.Manager):
# Do action buttons. They are ordered so we know which is which by index
if self.action_buttons[0].rect.collidepoint(pos) and self.action_buttons[0].clickable:
self.bus.perform_display_move_range_of_piece(self.current_active_piece)
+ self.camera.snap_to_position(self.current_active_piece.rect.center)
self.game.control_mode = CTRL_MODES.Turn_Select_Move
elif self.action_buttons[5].rect.collidepoint(pos) and self.action_buttons[5].clickable:
self.shift_turns()
@@ -224,6 +225,7 @@ class TurnManager(manager.Manager):
for b in self.action_buttons:
b.update(surface)
elif self.game.control_mode == CTRL_MODES.Turn_Watch_Move:
+ self.active_piece_has_moved = True
if self.action_buttons[0].clickable:
self.action_buttons[0].toggle_activation()