Center nickname

This commit is contained in:
Stefan `Sec` Zehl 2011-08-02 21:01:27 +02:00
parent b6ef360f43
commit 32e05be404
2 changed files with 10 additions and 2 deletions

View File

@ -37,8 +37,8 @@ void main_final(void) {
getInputWaitRelease(); getInputWaitRelease();
init_nick(); init_nick();
}; };
work_queue();
fancyNickname(); fancyNickname();
delayms_queue(100);
}; };
}; };

View File

@ -22,12 +22,20 @@ void fancyNickname(void) {
static uint32_t ctr=0; static uint32_t ctr=0;
ctr++; ctr++;
setExtFont(GLOBAL(nickfont));
dx=DoString(0,0,GLOBAL(nickname));
dx=(RESX-dx)/2;
if(dx<0)
dx=0;
dy=(RESY-getFontHeight())/2;
lcdClear(); lcdClear();
setExtFont(GLOBAL(nickfont));
DoString(dx,dy,GLOBAL(nickname)); DoString(dx,dy,GLOBAL(nickname));
lcdRefresh(); lcdRefresh();
while(getInputRaw()==BTN_NONE){
work_queue();
};
return; return;
} }