From 3f3e9c3277512373a7f8e3be9cfb75352341d972 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 6 May 2010 17:30:16 +0000 Subject: [PATCH] Handle some additional keys in the watching-menu. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@557 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- TODO | 3 +++ dgamelaunch.c | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 8cfc366..93a4def 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,6 @@ + +-move the games[] array into shmem? + -$MTIME(filename) < Napkin> I'd suggest the default of DGL_MAILMSGLEN to be less diff --git a/dgamelaunch.c b/dgamelaunch.c index 7dff1c8..e8ab8cf 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -777,6 +777,18 @@ inprogressmenu (int gameid) switch ((menuchoice = dgl_getch ())) { + case KEY_DOWN: + if (selected != -1) { + selected++; + if (selected >= len) selected = 0; + } + break; + case KEY_UP: + if (selected != -1) { + if (selected == 0) selected = len; + selected--; + } + break; case '*': if (len > 0) { idx = random() % len; @@ -816,10 +828,11 @@ inprogressmenu (int gameid) } } break; + case KEY_NPAGE: case '>': if ((offset + max_height) < len) offset += max_height; break; - + case KEY_PPAGE: case '<': if ((offset - max_height) < 0) offset = 0; @@ -835,11 +848,11 @@ inprogressmenu (int gameid) shmdt(shm_dg_data); #endif return; - + case KEY_RIGHT: case '.': if (sortmode < (NUM_SORTMODES-1)) sortmode++; else sortmode = SORTMODE_USERNAME; break; - + case KEY_LEFT: case ',': if (sortmode > SORTMODE_USERNAME) sortmode--; else sortmode = (NUM_SORTMODES-1); break;