| 873 | int x1 = FONTH/2 - (showeditingsettings == 1 ? deltax : 0), y1 = 3 * VIRTH/8, x2 = x1 + boxsize; |
| 874 | float prevlinew; glGetFloatv(GL_LINE_WIDTH, &prevlinew); glLineWidth(border); |
| 875 | loopi(MAXENTTYPES) |
| 876 | { |
| 877 | if(i>NOTUSED && i<=DUMMYENT) |
| 878 | { |
| 879 | y1 = 3 * VIRTH/8 + (i-1) * boxline; |
| 880 | int y2 = y1 + boxsize; |
| 881 | bool ishidden = (edithideentmask & (1 << (i - 1))); |
| 882 | // render text first – makes it slide in/out behind the boxes |
| 883 | if(showeditingsettings==3||keepshowingeditingsettingsfrom) // 3:all,always || ( 2:text,at first, 1:all,at first ) |
| 884 | { |
| 885 | glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); |
| 886 | defformatstring(entlabel)("\f%d%s", ishidden?4:5, entnames[i]); |
| 887 | draw_text(entlabel, x1 + boxline -(showeditingsettings == 2 ? deltax : 0), y1 ); |
| 888 | glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); |
| 889 | } |
| 890 | // now the box |
| 891 | partcolour &pc = partcolours[i]; |
| 892 | glColor3f(pc.r, pc.g, pc.b); |
| 893 | glBegin(GL_TRIANGLE_STRIP); |
| 894 | glVertex2d(x1, y1); |
| 895 | glVertex2d(x2, y1); |
| 896 | glVertex2d(x1, y2); |
| 897 | glVertex2d(x2, y2); |
| 898 | glEnd(); |
| 899 | // and the border |
| 900 | box2d(x1-border, y1-border, x2+border, y2+border, ishidden?0:200); |
| 901 | // crossed-out like in menu |
| 902 | if(ishidden){ |
| 903 | glColor3d(0,0,0); |
| 904 | glBegin(GL_LINES); |
| 905 | glVertex2d(x1, y1); |
| 906 | glVertex2d(x2, y2); |
| 907 | glVertex2d(x1, y2); |
| 908 | glVertex2d(x2, y1); |
| 909 | glEnd(); |
| 910 | } |
| 911 | } |
| 912 | } |
| 913 | glLineWidth(prevlinew); |
| 914 | glEnable(GL_TEXTURE_2D); |
| 915 | glDepthMask(GL_TRUE); |
no test coverage detected