-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#| | ||
This file is a part of trial | ||
(c) 2018 Shirakumo http://tymoon.eu (shinmera@tymoon.eu) | ||
Author: Nicolas Hafner <shinmera@tymoon.eu> | ||
|# | ||
|
||
(in-package #:org.shirakumo.fraf.trial) | ||
|
||
(define-asset (trial prompt-font) font | ||
#p"PromptFont.ttf" | ||
:charset " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~↞↟↠↡↤↥↦↧↰↱↲↳↺↻↼↽↾↿⇀⇁⇂⇃⇇⇈⇉⇊⇖⇗⇘⇙⇷⇸⇹①②③④⑤⑥⑦⑧⑨⑩⑪⑫" | ||
:font-size 32) | ||
|
||
(defun prompt-char (thing) | ||
(etypecase thing | ||
(character thing) | ||
(symbol | ||
(ecase thing | ||
(:dpad-l #\↞) | ||
(:dpad-u #\↟) | ||
(:dpad-r #\↠) | ||
(:dpad-d #\↡) | ||
(:x #\↤) | ||
(:y #\↥) | ||
(:b #\↦) | ||
(:a #\↧) | ||
(:l1 #\↰) | ||
(:r1 #\↱) | ||
(:l2 #\↲) | ||
(:r2 #\↳) | ||
(:l #\↺) | ||
(:r #\↻) | ||
(:l-l #\↼) | ||
(:r-l #\↽) | ||
(:l-u #\↾) | ||
(:r-u #\↿) | ||
(:l-r #\⇀) | ||
(:r-r #\⇁) | ||
(:l-d #\⇂) | ||
(:r-d #\⇃) | ||
(:a-l #\⇇) | ||
(:a-u #\⇈) | ||
(:a-r #\⇉) | ||
(:a-d #\⇊) | ||
(:a-ul #\⇖) | ||
(:a-ur #\⇗) | ||
(:a-dr #\⇘) | ||
(:a-dl #\⇙) | ||
(:select #\⇷) | ||
(:start #\⇸) | ||
(:home #\⇹) | ||
(:ctrl #\) | ||
(:alt #\) | ||
(:shift #\) | ||
(:super #\) | ||
(:tab #\) | ||
(:caps #\) | ||
(:backspace #\) | ||
(:enter #\) | ||
(:esc #\) | ||
(:prtsc #\) | ||
(:scrlk #\) | ||
(:pause #\) | ||
(:numlock #\) | ||
(:insert #\) | ||
(:home #\) | ||
(:pageup #\) | ||
(:delete #\) | ||
(:end #\) | ||
(:pagedown #\) | ||
(:f1 #\①) | ||
(:f2 #\②) | ||
(:f3 #\③) | ||
(:f4 #\④) | ||
(:f5 #\⑤) | ||
(:f6 #\⑥) | ||
(:f7 #\⑦) | ||
(:f8 #\⑧) | ||
(:f9 #\⑨) | ||
(:f10 #\⑩) | ||
(:f11 #\⑪) | ||
(:f12 #\⑫))))) | ||
|
||
(define-shader-subject prompt (text) | ||
((tetxure :initform (asset 'trial 'prompt-font)))) | ||
|
||
(defmethod (setf text) ((character character) (prompt prompt)) | ||
(setf (text prompt) (string character))) | ||
|
||
(defmethod (setf text) ((symbol symbol) (prompt prompt)) | ||
(setf (text prompt) (string (prompt-char symbol)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters