|
|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: gui_entry.c,v 1.4 2013/02/26 22:13:04 steffen Exp $ */
|
|
|
|
/* $Id: gui_entry.c,v 1.5 2013/02/26 23:33:27 steffen Exp $ */
|
|
|
|
/***************************************************************************
|
|
|
|
/***************************************************************************
|
|
|
|
* gui_entry.c
|
|
|
|
* gui_entry.c
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@ -31,19 +31,20 @@
|
|
|
|
/****************************************************************************
|
|
|
|
/****************************************************************************
|
|
|
|
* entry
|
|
|
|
* entry
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void gui_entry_draw (GUIEntry *entry) {
|
|
|
|
void gui_entry_draw (GUIItem *item) {
|
|
|
|
char text1[GUI_TEXTLEN];
|
|
|
|
char text1[GUI_TEXTLEN];
|
|
|
|
char text2[GUI_TEXTLEN];
|
|
|
|
char text2[GUI_TEXTLEN];
|
|
|
|
struct line_style ls;
|
|
|
|
struct line_style ls;
|
|
|
|
|
|
|
|
GUIEntry *entry;
|
|
|
|
|
|
|
|
|
|
|
|
ls.width = 1.0;
|
|
|
|
ls.width = 1.0;
|
|
|
|
if (currentwin->focus == (void*) entry)
|
|
|
|
if (currentwin->focus == (void*) item)
|
|
|
|
ls.c = ls.borderc = color[COLOR_white][3];
|
|
|
|
ls.c = ls.borderc = color[COLOR_white][3];
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ls.c = ls.borderc = color[COLOR_white][2];
|
|
|
|
ls.c = ls.borderc = color[COLOR_white][2];
|
|
|
|
gfx_draw_line (currentwin->screen, entry->x, entry->y+entry->h, entry->x+entry->w, entry->y+entry->h, ls);
|
|
|
|
gfx_draw_line (currentwin->screen, item->x, item->y+item->h, item->x+item->w, item->y+item->h, ls);
|
|
|
|
gfx_draw_line (currentwin->screen, entry->x, entry->y+entry->h, entry->x, entry->y+entry->h-2, ls);
|
|
|
|
gfx_draw_line (currentwin->screen, item->x, item->y+item->h, item->x, item->y+item->h-2, ls);
|
|
|
|
gfx_draw_line (currentwin->screen, entry->x+entry->w, entry->y+entry->h, entry->x+entry->w, entry->y+entry->h-2, ls);
|
|
|
|
gfx_draw_line (currentwin->screen, item->x+item->w, item->y+item->h, item->x+item->w, item->y+item->h-2, ls);
|
|
|
|
|
|
|
|
|
|
|
|
if (entry->curpos >= strlen (entry->text)) {
|
|
|
|
if (entry->curpos >= strlen (entry->text)) {
|
|
|
|
entry->curpos = strlen (entry->text);
|
|
|
|
entry->curpos = strlen (entry->text);
|
|
|
|
|