[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 162/255: painting a nice svg board, but more to do
From: |
Eric Schulte |
Subject: |
[elpa] 162/255: painting a nice svg board, but more to do |
Date: |
Sun, 16 Mar 2014 01:02:40 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit a5fea1ef9df36c7b09913d14d97f1c550bac2a93
Author: Eric Schulte <address@hidden>
Date: Tue Jun 5 11:24:21 2012 -0600
painting a nice svg board, but more to do
---
go-board.el | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/go-board.el b/go-board.el
index 4a19094..1e72d30 100644
--- a/go-board.el
+++ b/go-board.el
@@ -41,7 +41,7 @@
(defvar black-piece "X")
(defvar white-piece "O")
-(defvar go-board-use-images nil)
+(defvar go-board-use-images t)
(defvar *go-board-overlays* nil
"List of overlays carrying GO board painting information.")
@@ -177,6 +177,7 @@
((string= str white-piece) (put str :type :white))
((string= str black-piece) (put str :type :black))
((string= str "+") (put str :type :hoshi))
+ ((string= str ".") (put str :type :background-1))
(t (put str :type :background)))
(put str :pos (cons (cdr pos) (car pos)))
str))))
@@ -215,15 +216,22 @@
(overlay-put ovly 'display
(eval (intern (concat "go-board-image-"
(symbol-name face))))))
- (push ovly go-board-overlays))))
+ (push ovly go-board-overlays)))
+ (hide (point)
+ (let ((ovly (make-overlay point (1+ point))))
+ (overlay-put ovly 'invisible t)
+ (push ovly go-board-overlays))))
(let ((start (or start (point-min)))
(end (or end (point-max))))
(dolist (point (range start end))
(case (get-text-property point :type)
- (:background (ov point 'background))
- (:hoshi (ov point 'hoshi))
- (:white (ov point 'white))
- (:black (ov point 'black)))))))
+ (:background (if go-board-use-images
+ (hide point)
+ (ov point 'background)))
+ (:background-1 (ov point 'background))
+ (:hoshi (ov point 'hoshi))
+ (:white (ov point 'white))
+ (:black (ov point 'black)))))))
(defun update-display (buffer)
(with-current-buffer buffer
- [elpa] 146/255: print igs kibitz strings, (continued)
- [elpa] 146/255: print igs kibitz strings, Eric Schulte, 2014/03/15
- [elpa] 141/255: beginning of infrastructure for player names & info, Eric Schulte, 2014/03/15
- [elpa] 145/255: periodically ping IGS server to prevent disconnect, Eric Schulte, 2014/03/15
- [elpa] 147/255: igs implements the go back-end API, Eric Schulte, 2014/03/15
- [elpa] 148/255: improved the setf method for aget, Eric Schulte, 2014/03/15
- [elpa] 150/255: more lenient regexp for matching game listing, Eric Schulte, 2014/03/15
- [elpa] 152/255: Revert "improved the setf method for aget", Eric Schulte, 2014/03/15
- [elpa] 154/255: don't quit main back-end when quitting a board, Eric Schulte, 2014/03/15
- [elpa] 158/255: beginning to translate svg images into elisp, Eric Schulte, 2014/03/15
- [elpa] 149/255: push all buffer-local variables into an igs object, Eric Schulte, 2014/03/15
- [elpa] 162/255: painting a nice svg board, but more to do,
Eric Schulte <=
- [elpa] 159/255: translated all svg stone images into elisp, Eric Schulte, 2014/03/15
- [elpa] 164/255: prompt before quitting, Eric Schulte, 2014/03/15
- [elpa] 153/255: safety measure when observing igs games, Eric Schulte, 2014/03/15
- [elpa] 163/255: sorted out different types of backgrounds, Eric Schulte, 2014/03/15
- [elpa] 168/255: adding option to play a sound during moves, Eric Schulte, 2014/03/15
- [elpa] 155/255: less permissive igs move regular expression, Eric Schulte, 2014/03/15
- [elpa] 166/255: board images working with backgrounds, Eric Schulte, 2014/03/15
- [elpa] 173/255: start gnugo process when object is created, Eric Schulte, 2014/03/15
- [elpa] 167/255: cleanup images in board faces, Eric Schulte, 2014/03/15
- [elpa] 170/255: fix spacing of labels when using image for display, Eric Schulte, 2014/03/15