| 202 | virtual int width() { return text_width(text) + (strchr(text, '\n') ? menurighttabwidth : 0); } |
| 203 | |
| 204 | virtual void render(int x, int y, int w) |
| 205 | { |
| 206 | int c = greyedout ? 128 : 255; |
| 207 | mitem::render(x, y, w); |
| 208 | const char *nl = strchr(text, '\n'); |
| 209 | if(nl) |
| 210 | { |
| 211 | string l; |
| 212 | copystring(l, text, min(MAXSTRLEN, (int)strcspn(text, "\n") + 1)); |
| 213 | draw_text(l, x, y, c, c, c); |
| 214 | draw_text(nl + 1, x + w - max(menurighttabwidth, text_width(nl + 1)), y, c, c, c); |
| 215 | } |
| 216 | else draw_text(text, x, y, c, c, c); |
| 217 | } |
| 218 | |
| 219 | virtual void focus(bool on) |
| 220 | { |
nothing calls this directly
no test coverage detected