1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-10 13:29:02 +00:00

improved key handling: numpad works as directions with numlock off and numbers with numlock on; shift+5 works now; better key assignments in crystal rug

This commit is contained in:
Zeno Rogue
2018-12-06 12:31:51 +01:00
parent 9b21b9c5a0
commit b256ac70af
9 changed files with 115 additions and 93 deletions

View File

@@ -1485,7 +1485,7 @@ void move_forward(ld distance) {
#define CAP_HOLDKEYS CAP_SDL // && !ISWEB)
bool handlekeys(int sym, int uni) {
if(numberkey(sym, uni, '1')) {
if(NUMBERKEY == '1') {
ld bdist = 1e12;
if(finger_center)
finger_center = NULL;
@@ -1499,14 +1499,14 @@ bool handlekeys(int sym, int uni) {
if(renderonce) renderlate+=10;
return true;
}
else if(numberkey(sym, uni, '2')) {
else if(NUMBERKEY == '2') {
if(in_crystal())
crystal::switch_z_coordinate();
else
apply_rotation(rotmatrix(M_PI, 0, 2));
return true;
}
else if(numberkey(sym, uni, '3')) {
else if(NUMBERKEY == '3') {
if(in_crystal())
crystal::flip_z();
else