From 148b2d9aee05cf1b784e39a8e5e6003d100f610c Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Thu, 21 Jul 2011 20:08:00 +0200 Subject: [PATCH] Also allow diagonal movement here. --- firmware/applications/font.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/firmware/applications/font.c b/firmware/applications/font.c index 25475e9..9801653 100644 --- a/firmware/applications/font.c +++ b/firmware/applications/font.c @@ -113,15 +113,19 @@ void f_nick(void){ delayms(40); key= getInputRaw(); - if(key==BTN_UP){ + if(key & BTN_UP){ --y;//if(--y<0) y=0; - }else if (key ==BTN_DOWN){ + }; + if (key & BTN_DOWN){ ++y;//if(++y>=RESY) y=RESY-1; - }else if (key ==BTN_LEFT){ + }; + if (key & BTN_LEFT){ --x;//if(--x<0) x=0; - }else if (key ==BTN_RIGHT){ + }; + if (key & BTN_RIGHT){ ++x;//if(++x>=RESX) x=RESX-1; - }else if (key ==BTN_ENTER){ + }; + if (key == BTN_ENTER){ lcdClear(); lcdPrintln("Done."); lcdDisplay();