| 759 | } |
| 760 | |
| 761 | virtual void render(int x, int y, int w) |
| 762 | { |
| 763 | bool sel = isselection(); |
| 764 | const static int boxsize = FONTH; |
| 765 | int offs = ((menurighttabwidth - FONTH) * ((msctrl % 41) ? pos : (50 + 50 * sinf(totalmillis / 300.0f + y)))) / 100; |
| 766 | int c = greyedout ? 128 : 255; |
| 767 | |
| 768 | if(sel) |
| 769 | { |
| 770 | renderbg(x, y, w-boxsize-offs-FONTH/2, menuseldescbgcolor); |
| 771 | renderbg(x+w-boxsize-offs, y, boxsize, menuselbgcolor); |
| 772 | if(offs > FONTH/2) renderbg(x+w-offs+FONTH/2, y, offs-FONTH/2, menuseldescbgcolor); |
| 773 | } |
| 774 | draw_text(text, x, y, c, c, c); |
| 775 | x -= offs; |
| 776 | blendbox(x+w-boxsize, y, x+w, y+boxsize, false, -1, &gray); |
| 777 | color *col = greyedout ? &gray : (sel ? &whitepulse : &white); |
| 778 | if(checked) |
| 779 | { |
| 780 | int x1 = x+w-boxsize-FONTH/6, x2 = x+w+FONTH/6, y1 = y-FONTH/6, y2 = y+boxsize+FONTH/6; |
| 781 | line(x1, y1, x2, y2, col); |
| 782 | line(x2, y1, x1, y2, col); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | virtual const char* gettext() { return text; } |
| 787 | |