From f4dee994b5f9019d805328d1019b4456f6bb4b2d Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 7 Jan 2015 13:06:57 +0100 Subject: game: added vim key bindings to UP/DOWN/LEFT/RIGHT h/j/k/l are mapped to behave like arrow keys so that the navigation is easier in the menus. F and A are respectiverly used to validate and cancel as well. Signed-off-by: Olivier Gayot --- menuprincipal.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'menuprincipal.c') diff --git a/menuprincipal.c b/menuprincipal.c index d3b4813..64ada29 100644 --- a/menuprincipal.c +++ b/menuprincipal.c @@ -21,6 +21,7 @@ void Fmenuprincipal (SURFACES *surfaces, POSITIONS *positions) switch (event.key.keysym.sym) { case SDLK_DOWN: + case SDLK_j: if (Vmode < 2) { @@ -34,6 +35,7 @@ void Fmenuprincipal (SURFACES *surfaces, POSITIONS *positions) } break; case SDLK_UP: + case SDLK_k: if (Vmode > 0) { Vmode--; @@ -46,6 +48,7 @@ void Fmenuprincipal (SURFACES *surfaces, POSITIONS *positions) } break; case SDLK_RETURN: + case SDLK_f: continuer = Fentrermode (Vmode,surfaces,positions); Vmode = 0; if (continuer) -- cgit v1.2.3