comparison mde/gui/renderer/SimpleRenderer.d @ 147:075705ad664a

Added a border widget.
author Diggory Hardy <diggory.hardy@gmail.com>
date Wed, 11 Feb 2009 13:02:30 +0000
parents 2ac3e0012788
children 55667d048c31
comparison
equal deleted inserted replaced
146:783969f4665c 147:075705ad664a
62 // They should restrict the drawing of floating widgets to the floating area, for instance, 62 // They should restrict the drawing of floating widgets to the floating area, for instance,
63 // although this isn't strictly necessary. 63 // although this isn't strictly necessary.
64 override void restrict (wdim x, wdim y, wdim w, wdim h) {} 64 override void restrict (wdim x, wdim y, wdim w, wdim h) {}
65 override void relax () {} 65 override void relax () {}
66 66
67 override void drawWindow (Border* border, wdim x, wdim y, wdim w, wdim h) { 67 override void drawBorder (Border* border, wdim x, wdim y, wdim w, wdim h) {
68 glColor3f (0f, 0f, .8f); 68 glColor3f (0f, 0f, .8f);
69 glRecti(x, y+h, x+w, y); 69 glRecti(x, y+h, x+w, y);
70 70
71 if (border.capability != 0) { 71 if (border.capability != 0) {
72 glColor3f (0f, 0f, .6f); 72 glColor3f (0f, 0f, .6f);
91 glVertex2i (x, y+h-t); 91 glVertex2i (x, y+h-t);
92 glVertex2i (x+t, y+h); 92 glVertex2i (x+t, y+h);
93 glEnd (); 93 glEnd ();
94 } 94 }
95 95
96 glColor3f (0f, 0f, 0f); 96 //glColor3f (0f, 0f, 0f);
97 glRecti(x+border.x1, y+h-border.y2, x+w-border.x2, y+border.y1); 97 //glRecti(x+border.x1, y+h-border.y2, x+w-border.x2, y+border.y1);
98 } 98 }
99 99
100 override void drawSpacers (wdabs x, wdabs y, wdsize w, wdsize h, wdims cols, wdims rows) { 100 override void drawSpacers (wdabs x, wdabs y, wdsize w, wdsize h, wdims cols, wdims rows) {
101 glColor3f (.2f, .2f, .2f); 101 glColor3f (.2f, .2f, .2f);
102 glBegin (GL_LINES); 102 glBegin (GL_LINES);