diff options
| author | xHire <xHire@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-04-07 19:34:00 +0000 |
|---|---|---|
| committer | xHire <xHire@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-04-07 19:34:00 +0000 |
| commit | c8223ce77a4dbf57be272d10c4e1d31f69bd516e (patch) | |
| tree | 205d846056e2acdd15b099a39924d51c0d3988ae /src/widget_textfield.c | |
| parent | 35185452d7546ab56aa0040d7c2d68795c3f813f (diff) | |
- partially fixed bug #0004 - *only* issue with text in buttons and textfields
- implemented build dir for normal game (=> not only server has build dir now)
- the directory structure was extended with directories for packaging scripts
git-svn-id: http://opensvn.csie.org/tuxanci_ng@44 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/widget_textfield.c')
| -rw-r--r-- | src/widget_textfield.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/widget_textfield.c b/src/widget_textfield.c index 8e8c229..fb3e902 100644 --- a/src/widget_textfield.c +++ b/src/widget_textfield.c @@ -60,7 +60,8 @@ static void drawText(widget_textfield_t *p) if( p->timeBlick > WIDGET_TEXTFIELD_TIME_BLICK_CURSOR/2 && p->active == TRUE ) { - strcat(str, ">"); + //strcat(str, ">"); + strcat(str, "\f"); } p->timeBlick++; @@ -70,7 +71,9 @@ static void drawText(widget_textfield_t *p) p->timeBlick = 0; } - drawFont(str, p->x+WIDGET_TEXTFIELD_TEXT_OFFSET_X, p->y+p->h/2, COLOR_WHITE); + //drawFont(str, p->x+WIDGET_TEXTFIELD_TEXT_OFFSET_X, p->y+p->h/2, COLOR_WHITE); + drawFont(str, p->x+WIDGET_TEXTFIELD_TEXT_OFFSET_X, p->y+WIDGET_TEXTFIELD_HEIGHT/2-p->h/2, COLOR_WHITE); + //printf("p->y: %d\nheight: %d\n p->h: %d\n", p->y, WIDGET_TEXTFIELD_HEIGHT, p->h); } void drawWidgetTextfield(widget_textfield_t *p) @@ -99,7 +102,7 @@ static void readKey(widget_textfield_t *p) mapa = SDL_GetKeyState(NULL); len = strlen(p->text); - //mazanie posledneho klavesu + // mazanie posledneho klavesu if( mapa[SDLK_BACKSPACE] == SDL_PRESSED ) { if( len > 0 ) @@ -117,7 +120,7 @@ static void readKey(widget_textfield_t *p) return; } - //klavesy abecedy + // klavesy abecedy for(i=SDLK_SPACE /*SDLK_a*/;i<=SDLK_z;i++) { //if(width<TEXTFIELD_SIZE_X-20 && mapa[i]==SDL_PRESSED) @@ -143,7 +146,7 @@ static void readKey(widget_textfield_t *p) { if( mapa[i] == SDL_PRESSED && len < STR_SIZE ) { - p->time = WIDGET_TEXTFIELD_TIME_READ_KEY; + p->time = WIDGET_TEXTFIELD_TIME_READ_KEY; strcat( p->text, SDL_GetKeyName(i) ); getTextSize(p->text, &p->w, &p->h); return; |