1 /*
2 * cross_button.cc
3 * DIN Is Noise is copyright (c) 2006-2021 Jagannathan Sampath
4 * DIN Is Noise is released under GNU Public License 2.0
5 * For more information, please visit https://dinisnoise.org/
6 */
7
8 #include "cross_button.h"
9
draw()10 void cross_button::draw () {
11 box<int>& e = extents;
12 glColor3f (clr.r, clr.g, clr.b);
13 {
14 int pts[8] = {e.left, e.bottom, e.right, e.top, e.left, e.top, e.right, e.bottom};
15 glVertexPointer (2, GL_INT, 0, pts);
16 glDrawArrays (GL_LINES, 0, 4);
17 pts[0] = e.right; pts[1] = e.top; pts[2] = e.left; pts[3] = e.bottom;
18 pts[4] = e.right; pts[5] = e.bottom; pts[6] = e.left; pts[7] = e.top;
19 glDrawArrays (GL_LINES, 0, 4);
20 }
21 /*{
22 int pts[4]= {e.right, e.top, e.right, e.bottom};
23 glVertexPointer (2, GL_INT, 0, pts);
24 glDrawArrays (GL_POINTS, 0, 2);
25 }*/
26 }
27