diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-16 21:08:05 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-16 21:08:05 +0000 |
| commit | 77be5944f30c9d06512d5b3dd80d7c90a0805c9d (patch) | |
| tree | 213c87f267ae8f9b27af8d7a110b7ca1bd78019f /chess-display.el | |
| parent | 587109a0df5970ca5a83c9a4b7f103767bd371a2 (diff) | |
(chess-display-handler): Set the side-to-move text to a reasonable
default.
Diffstat (limited to 'chess-display.el')
| -rw-r--r-- | chess-display.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chess-display.el b/chess-display.el index 67596f8..c445a1e 100644 --- a/chess-display.el +++ b/chess-display.el @@ -209,6 +209,13 @@ also view the same game." (chess-module-leader-p nil)) (chess-display-popup nil)))) +(defun chess-display-redraw (&optional display) + "Just redraw the current display." + (interactive) + (chess-with-current-buffer display + (erase-buffer) + (chess-display-update nil))) + (defun chess-display-move (display ply) "Move a piece on DISPLAY, by applying the given PLY. The position of PLY must match the currently displayed position. @@ -281,6 +288,10 @@ See `chess-display-type' for the different kinds of displays." (progn (chess-display-mode) (setq chess-display-index (chess-game-index game) + chess-display-side-to-move + (if (chess-pos-side-to-move (chess-game-pos game)) + (chess-string 'mode-white) + (chess-string 'mode-black)) chess-display-move-text (chess-string 'mode-start) chess-display-perspective (car args) chess-display-event-handler @@ -413,12 +424,6 @@ The key bindings available in this mode are: ;; Commands used by the keyboard bindings above ;; -(defun chess-display-redraw () - "Just redraw the current display." - (interactive) - (erase-buffer) - (chess-display-update nil)) - (defsubst chess-display-active-p () "Return non-nil if the displayed chessboard reflects an active game. Basically, it means we are playing, not editing or reviewing." |
