summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed5485b)
raw | patch | inline | side by side (parent: ed5485b)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 10 Apr 2020 05:21:15 +0000 (09:21 +0400) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 10 Apr 2020 05:21:15 +0000 (09:21 +0400) |
src/menu.c | patch | blob | history |
diff --git a/src/menu.c b/src/menu.c
index 629f0c8d02f2b5129cbba7deff70efcb0d9c15ab..e80e43612c2911159f50070bd163bd2692d71993 100644 (file)
--- a/src/menu.c
+++ b/src/menu.c
if (down) {
lastkey = key;
if (!_2pl || cheat) {
- for (i = 0; i < 31; ++i) {
+ for (i = 0; i < 31; i++) {
cbuf[i] = cbuf[i + 1];
}
- //cbuf[31] = get_keychar(key);
+ if (key >= KEY_0 && key <= KEY_9) {
+ cbuf[31] = key - KEY_0 + '0';
+ } else if (key >= KEY_A && key <= KEY_Z) {
+ cbuf[31] = key - KEY_A + 'A';
+ } else {
+ cbuf[31] = 0;
+ }
}
}
}