[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 447882d2ef 439/472: Quit Game Over state with q ke
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 447882d2ef 439/472: Quit Game Over state with q key (#202) |
Date: |
Thu, 6 Jan 2022 21:59:47 -0500 (EST) |
branch: elpa/pacmacs
commit 447882d2ef1bbe18fdb987ebd2f5de257c8a3d8a
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Quit Game Over state with q key (#202)
---
pacmacs.el | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/pacmacs.el b/pacmacs.el
index 536dae30c7..dfa9f2ea9d 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -95,7 +95,7 @@
:type '(radio (const :tag "Default path")
(directory :tag "Custom path")))
-(define-derived-mode pacmacs-mode special-mode "pacmacs-mode"
+(define-derived-mode pacmacs-mode special-mode "Pacmacs"
(define-key pacmacs-mode-map (kbd "<up>") 'pacmacs-up)
(define-key pacmacs-mode-map (kbd "<down>") 'pacmacs-down)
(define-key pacmacs-mode-map (kbd "<left>") 'pacmacs-left)
@@ -106,6 +106,11 @@
(setq cursor-type nil)
(setq truncate-lines t))
+(define-derived-mode pacmacs-game-over-mode special-mode "Pacmacs Game Over"
+ (define-key pacmacs-game-over-mode-map (kbd "q") 'pacmacs-quit)
+ (setq cursor-type nil)
+ (setq truncate-lines t))
+
;;;###autoload
(defun pacmacs-start ()
(interactive)
@@ -589,7 +594,8 @@
(let ((nickname (widget-value widget)))
(pacmacs--add-entry-to-score-table nickname score)
(widget-value-set widget (pacmacs--align-score-record-nickname nickname))
- (widget-delete widget))))
+ (widget-delete widget)
+ (pacmacs-game-over-mode))))
(defun pacmacs--switch-to-game-over-state ()
(pacmacs--load-map-sign "game-over")
@@ -623,11 +629,12 @@
(plist-bind ((height :height))
pacmacs--object-board
(goto-char (point-min))
- (forward-line (+ height pacmacs--score-table-render-offset
new-score-position))))
+ (forward-line (+ height pacmacs--score-table-render-offset
new-score-position)))
+ (use-local-map widget-keymap)
+ (widget-setup))
(pacmacs--render-score-table score-table)
- (goto-char (point-min)))
- (use-local-map widget-keymap)
- (widget-setup))))
+ (goto-char (point-min))
+ (pacmacs-game-over-mode)))))
(defun pacmacs--switch-to-play-state ()
(setq pacmacs-game-state 'play)
- [nongnu] elpa/pacmacs ecf71a3f49 378/472: Rename put-bits-dot to put-wall-tile-corner (#138), (continued)
- [nongnu] elpa/pacmacs ecf71a3f49 378/472: Rename put-bits-dot to put-wall-tile-corner (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d7c9d248e6 385/472: Pass wall bits to create-wall-tile as list (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 66cdd67cbb 387/472: Merge pull request #186 from codingteam/prettier-walls-138, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 365bfaee8e 386/472: Fix create-wall-tile UT (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f9c2eada4c 390/472: Move measure-time function to pacmacs-rr module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e037903a5b 401/472: Switch to game over mode on game over state (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 54af862690 403/472: Add position-of-new-score function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 389db1a10b 412/472: Remove pacmacs-game-over-state-rendered var (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e59d6bda5a 430/472: Add pacmacs-levels-folder custom (#191), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fc06a12e07 441/472: Merge pull request #204 from codingteam/bug/game-over-tiles-soft-wrap-201, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 447882d2ef 439/472: Quit Game Over state with q key (#202),
ELPA Syncer <=
- [nongnu] elpa/pacmacs 5317f7c51d 457/472: pacmacs-score is dead, long live pacmacs-score!, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs cb2ff0b438 459/472: Refactor board rendering functions (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d47f57fa86 463/472: Rename image module to walls module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 25a8c30210 472/472: Merge pull request #226 from skangas/bump-version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 04f7ce0793 464/472: Merge pull request #210 from codingteam/refactor/rename-image-module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 3440643ea7 471/472: Merge pull request #225 from skangas/license-statement, ELPA Syncer, 2022/01/06