Commit cf10b349 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/play/bubbles.el (bubbles--initialize, bubbles--show-scores)

(bubbles--game-over): Don't add `intangible' properties since they
didn't work anyway.
parent 382ceb2c
2014-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
* play/bubbles.el (bubbles--initialize, bubbles--show-scores)
(bubbles--game-over): Don't add `intangible' properties since they
didn't work anyway.
2014-06-18 Juri Linkov <juri@jurta.org> 2014-06-18 Juri Linkov <juri@jurta.org>
   
* vc/ediff-init.el (ediff-current-diff-Ancestor) * vc/ediff-init.el (ediff-current-diff-Ancestor)
......
...@@ -1005,20 +1005,17 @@ Set `bubbles--col-offset' and `bubbles--row-offset'." ...@@ -1005,20 +1005,17 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(erase-buffer) (erase-buffer)
(insert " ") (insert " ")
(add-text-properties (put-text-property (point-min) (point)
(point-min) (point) (list 'intangible t 'display 'display
(cons 'space (cons 'space (list :height bubbles--row-offset)))
(list :height bubbles--row-offset))))
(insert "\n") (insert "\n")
(let ((max-char (length (bubbles--colors)))) (let ((max-char (length (bubbles--colors))))
(dotimes (i (bubbles--grid-height)) (dotimes (i (bubbles--grid-height))
(let ((p (point))) (let ((p (point)))
(insert " ") (insert " ")
(add-text-properties (put-text-property p (point)
p (point) (list 'intangible t 'display
'display (cons 'space (cons 'space (list :width bubbles--col-offset))))
(list :width
bubbles--col-offset)))))
(dotimes (j (bubbles--grid-width)) (dotimes (j (bubbles--grid-width))
(let* ((index (random max-char)) (let* ((index (random max-char))
(char (nth index bubbles-chars))) (char (nth index bubbles-chars)))
...@@ -1026,10 +1023,9 @@ Set `bubbles--col-offset' and `bubbles--row-offset'." ...@@ -1026,10 +1023,9 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
(add-text-properties (1- (point)) (point) (list 'index index)))) (add-text-properties (1- (point)) (point) (list 'index index))))
(insert "\n")) (insert "\n"))
(insert "\n ") (insert "\n ")
(add-text-properties (put-text-property (1- (point)) (point)
(1- (point)) (point) (list 'intangible t 'display 'display
(cons 'space (cons 'space (list :width bubbles--col-offset))))
(list :width bubbles--col-offset)))))
(put-text-property (point-min) (point-max) 'pointer 'arrow)) (put-text-property (point-min) (point-max) 'pointer 'arrow))
(bubbles-mode) (bubbles-mode)
(bubbles--reset-score) (bubbles--reset-score)
...@@ -1179,10 +1175,9 @@ Use optional parameter POS instead of point if given." ...@@ -1179,10 +1175,9 @@ Use optional parameter POS instead of point if given."
(delete-region (point) (point-max)) (delete-region (point) (point-max))
(insert (format "Selected: %4d\n" bubbles--neighborhood-score)) (insert (format "Selected: %4d\n" bubbles--neighborhood-score))
(insert " ") (insert " ")
(add-text-properties (1- (point)) (point) (put-text-property (1- (point)) (point)
(list 'intangible t 'display 'display
(cons 'space (cons 'space (list :width bubbles--col-offset)))
(list :width bubbles--col-offset))))
(insert (format "Score: %4d" bubbles--score)) (insert (format "Score: %4d" bubbles--score))
(put-text-property pos (point) 'status t)))) (put-text-property pos (point) 'status t))))
...@@ -1200,10 +1195,9 @@ Use optional parameter POS instead of point if given." ...@@ -1200,10 +1195,9 @@ Use optional parameter POS instead of point if given."
(goto-char (point-max)) (goto-char (point-max))
(let* ((inhibit-read-only t)) (let* ((inhibit-read-only t))
(insert "\n ") (insert "\n ")
(add-text-properties (1- (point)) (point) (put-text-property (1- (point)) (point)
(list 'intangible t 'display 'display
(cons 'space (cons 'space (list :width bubbles--col-offset)))
(list :width bubbles--col-offset))))
(insert "Game Over!")) (insert "Game Over!"))
;; save score ;; save score
(gamegrid-add-score (format "bubbles-%s-%d-%d-%d-scores" (gamegrid-add-score (format "bubbles-%s-%d-%d-%d-scores"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment