summaryrefslogtreecommitdiff
path: root/chess-ics1.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-22 19:23:45 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-22 19:23:45 +0000
commit62c13bcfa1933274be856ac5840a933bbaca5f27 (patch)
tree81e2d4ab1a749a4d2561e824708abd60a04d67d0 /chess-ics1.el
parent171cc1aceb0e9acafe329ff6cd0ca1e2852876ce (diff)
Bug fixes and reducing the TODO list.
Diffstat (limited to 'chess-ics1.el')
-rw-r--r--chess-ics1.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/chess-ics1.el b/chess-ics1.el
index 4d0d35c..6b2aa9c 100644
--- a/chess-ics1.el
+++ b/chess-ics1.el
@@ -29,11 +29,16 @@
"Face to use for highlighting pieces that have been selected."
:group 'chess-ics1)
-(defcustom chess-ics1-popup-function 'chess-display-popup-in-window
+(defcustom chess-ics1-popup-function 'chess-ics1-popup
"The function used to popup a chess-ics1 display."
:type 'function
:group 'chess-ics1)
+(defcustom chess-ics1-separate-frame nil
+ "If non-nil, display the chessboard in its own frame."
+ :type 'boolean
+ :group 'chess-ics1)
+
;;; Code:
(defun chess-ics1-handler (event &rest args)
@@ -53,6 +58,11 @@
((eq event 'highlight)
(apply 'chess-ics1-highlight args))))
+(defun chess-ics1-popup ()
+ (if chess-ics1-separate-frame
+ (chess-display-popup-in-frame 21 43 nil t)
+ (chess-display-popup-in-window)))
+
(defsubst chess-ics1-piece-text (piece)
(let ((p (char-to-string piece)))
(add-text-properties 0 1 (list 'face (if (> piece ?a)
@@ -66,7 +76,8 @@
(let ((inhibit-redisplay t))
(goto-char pos)
(delete-char 3)
- (insert ? (chess-ics1-piece-text piece) ? ))))
+ (insert ? (chess-ics1-piece-text piece) ? )
+ (add-text-properties pos (point) (list 'chess-coord index)))))
(defun chess-ics1-draw (position perspective)
"Draw the given POSITION from PERSPECTIVE's point of view.