new libdraw
115c01b7
2 file(s) · +6 −3
| 34 | 34 | /* print prompt? */ |
|
| 35 | 35 | if(prompt) { |
|
| 36 | 36 | dc.w = promptw; |
|
| 37 | + | drawbox(&dc, selcol); |
|
| 37 | 38 | drawtext(&dc, prompt, selcol); |
|
| 38 | 39 | dc.x += dc.w; |
|
| 39 | 40 | } |
|
| 40 | 41 | dc.w = mw - dc.x; |
|
| 41 | 42 | drawtext(&dc, text, normcol); |
|
| 42 | - | drawcursor(&dc, text, cursor, normcol); |
|
| 43 | + | drawline(&dc, textnw(&dc, text, cursor) + dc.font.height/2, 2, 1, |
|
| 44 | + | dc.font.height-2, normcol); |
|
| 43 | 45 | commitdraw(&dc, win); |
|
| 44 | 46 | } |
|
| 45 | 47 |
| 24 | 24 | static char *cistrstr(const char *s, const char *sub); |
|
| 25 | 25 | static void cleanup(void); |
|
| 26 | 26 | static void dinput(void); |
|
| 27 | - | static void drawitem(char *s, unsigned long col[ColLast]); |
|
| 27 | + | static void drawitem(const char *s, unsigned long col[ColLast]); |
|
| 28 | 28 | static void drawmenuh(void); |
|
| 29 | 29 | static void drawmenuv(void); |
|
| 30 | 30 | static void match(void); |
|
| 140 | 140 | /* print prompt? */ |
|
| 141 | 141 | if(prompt) { |
|
| 142 | 142 | dc.w = promptw; |
|
| 143 | + | drawbox(&dc, selcol); |
|
| 143 | 144 | drawtext(&dc, prompt, selcol); |
|
| 144 | 145 | dc.x += dc.w; |
|
| 145 | 146 | } |
|
| 156 | 157 | } |
|
| 157 | 158 | ||
| 158 | 159 | void |
|
| 159 | - | drawitem(char *s, unsigned long col[ColLast]) { |
|
| 160 | + | drawitem(const char *s, unsigned long col[ColLast]) { |
|
| 160 | 161 | drawbox(&dc, col); |
|
| 161 | 162 | drawtext(&dc, s, col); |
|
| 162 | 163 | } |
|