Also enable diagonal scrolling.

This commit is contained in:
Stefan `Sec` Zehl 2011-07-21 20:02:44 +02:00
parent f81e2b8283
commit 742c422439
1 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,6 @@ void main_scroll(void) {
int dx=0; int dx=0;
char key; char key;
backlightInit(); backlightInit();
font_direction = FONT_DIR_LTR; // LeftToRight is the default
font=&Font_7x8; font=&Font_7x8;
dx=DoString(0,0,"Hello World"); dx=DoString(0,0,"Hello World");
@ -23,24 +22,24 @@ void main_scroll(void) {
lcdDisplay(); lcdDisplay();
//// delayms(10); //// delayms(10);
key= getInput(); key= getInputRaw();
// Easy flashing // Easy flashing
if(key==BTN_ENTER){ if(key&BTN_ENTER){
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(); lcdDisplay();
ISPandReset(); ISPandReset();
} }
if(key==BTN_RIGHT){ if(key&BTN_RIGHT){
lcdShift(1,0,true); lcdShift(1,0,true);
} }
if(key==BTN_LEFT){ if(key&BTN_LEFT){
lcdShift(-1,0,true); lcdShift(-1,0,true);
} }
if(key==BTN_UP){ if(key&BTN_UP){
lcdShift(0,1,true); lcdShift(0,1,true);
} }
if(key==BTN_DOWN){ if(key&BTN_DOWN){
lcdShift(0,-1,true); lcdShift(0,-1,true);
} }