mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-28 12:27:40 +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:
9
hyper.h
9
hyper.h
@@ -976,7 +976,7 @@ extern hyperpoint mouseh;
|
||||
extern hyperpoint ccenter;
|
||||
extern ld crad;
|
||||
|
||||
extern bool mousepressed, anyshiftclick;
|
||||
extern bool mousepressed, anyshiftclick, numlock_on;
|
||||
extern string help;
|
||||
|
||||
typedef function<void()> reaction_t;
|
||||
@@ -2488,7 +2488,12 @@ extern function <bool(SDL_Event &ev)> joyhandler;
|
||||
void gmodekeys(int sym, int uni);
|
||||
|
||||
// check for a plain number key
|
||||
bool numberkey(int sym, int uni, char number);
|
||||
#define NUMBERKEY (interpret_as_direction(sym, uni) ? 0 : uni)
|
||||
#define DKEY (get_direction_key(sym, uni))
|
||||
#define DIRECTIONKEY (interpret_as_direction(sym, uni) ? uni : 0)
|
||||
|
||||
bool interpret_as_direction(int sym, int uni);
|
||||
int get_direction_key(int sym, int uni);
|
||||
|
||||
void switchGL();
|
||||
void switchFullscreen();
|
||||
|
||||
Reference in New Issue
Block a user