underline match
7f36736d
1 file(s) · +5 −0
| 158 | 158 | ||
| 159 | 159 | void |
|
| 160 | 160 | drawitem(const char *s, unsigned long col[ColLast]) { |
|
| 161 | + | const char *p; |
|
| 162 | + | unsigned int w = textnw(&dc, text, strlen(text)); |
|
| 163 | + | ||
| 161 | 164 | drawbox(&dc, col); |
|
| 162 | 165 | drawtext(&dc, s, col); |
|
| 166 | + | for(p = fstrstr(s, text); *text && (p = fstrstr(p, text)); p++) |
|
| 167 | + | drawline(&dc, textnw(&dc, s, p-s) + dc.h/2 - 1, dc.h-2, w, 1, col); |
|
| 163 | 168 | } |
|
| 164 | 169 | ||
| 165 | 170 | void |