Use alphabetic characters, so button symbols can be used as identifiers

This commit is contained in:
dylan
2023-05-09 08:19:20 -07:00
parent 2ac5f3dff7
commit 1211891f53
3 changed files with 35 additions and 24 deletions

35
font.ts
View File

@@ -17,6 +17,13 @@
// export const fontWidth = 4;
// export const fontHeight = 6;
export const CHAR = {
UP: "À",
LEFT: "Á",
DOWN: "Â",
RIGHT: "Ã",
}
export type Font = {
height: 6,
chars: {[key: string]: Array<number>},
@@ -467,12 +474,12 @@ export const font: Font = {
0, 0, 0,
],
"\t": [
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
],
"\n": [
0, 0, 0,
@@ -802,15 +809,15 @@ export const font: Font = {
0, 0, 0,
0, 0, 0,
],
"➡": [
[CHAR.UP]: [
0, 1, 1, 1, 1, 1, 0,
1, 1, 0, 0, 1, 1, 1,
1, 1, 1, 0, 1, 1, 1,
1, 1, 0, 0, 0, 1, 1,
1, 1, 0, 0, 0, 1, 1,
1, 1, 0, 0, 1, 1, 1,
0, 1, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0,
],
"⬅": [
[CHAR.LEFT]: [
0, 1, 1, 1, 1, 1, 0,
1, 1, 1, 0, 0, 1, 1,
1, 1, 0, 0, 0, 1, 1,
@@ -818,7 +825,7 @@ export const font: Font = {
0, 1, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0,
],
"⬇": [
[CHAR.DOWN]: [
0, 1, 1, 1, 1, 1, 0,
1, 1, 0, 0, 0, 1, 1,
1, 1, 0, 0, 0, 1, 1,
@@ -826,11 +833,11 @@ export const font: Font = {
0, 1, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0,
],
"⬆": [
[CHAR.RIGHT]: [
0, 1, 1, 1, 1, 1, 0,
1, 1, 1, 0, 1, 1, 1,
1, 1, 0, 0, 0, 1, 1,
1, 1, 0, 0, 1, 1, 1,
1, 1, 0, 0, 0, 1, 1,
1, 1, 0, 0, 1, 1, 1,
0, 1, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0,
],