Improved multiline textentry drawing.
Several ctk drawing modules had multiline textentry support still in place. I slightly modified them to draw only one line inverted when focused because otherwise a large multiline textentry "inverts the whole screen" when focused.
diff --git a/contiki/ctk/ctk-conio-service.c b/contiki/ctk/ctk-conio-service.c
index 0f49eaf..9f7dcf1 100644
--- a/contiki/ctk/ctk-conio-service.c
+++ b/contiki/ctk/ctk-conio-service.c
@@ -29,7 +29,7 @@
*
* This file is part of the "ctk" console GUI toolkit for cc65
*
- * $Id: ctk-conio-service.c,v 1.9 2005/05/04 19:54:50 oliverschmidt Exp $
+ * $Id: ctk-conio-service.c,v 1.10 2005/05/04 22:04:35 oliverschmidt Exp $
*
*/
@@ -153,7 +153,6 @@
break;
case CTK_WIDGET_TEXTENTRY:
text = w->widget.textentry.text;
- revers(wfocus != 0);
xscroll = 0;
if(w->widget.textentry.xpos >= w->w - 1) {
xscroll = w->widget.textentry.xpos - w->w + 1;
@@ -172,10 +171,11 @@
} else {
cputc(c);
}
- revers(0);
}
+ revers(0);
cputc('<');
} else {
+ revers(wfocus != 0 && j == w->widget.textentry.ypos);
cvlinexy(xpos, ypos, 1);
gotoxy(xpos + 1, ypos);
cputsn(text, w->w);