comparison mde/gl/basic.d @ 34:6b4116e6355c

Work on the Gui: some of the framework for drag & drop. Also made Window an IWidget. Implemented getWidget(x,y) to find the widget under this location for IWidgets (but not Gui). Made Window an IWidget and made it work a little more similarly to widgets. Implemented callbacks on the Gui for mouse events (enabling drag & drop, etc.). committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 02 May 2008 16:03:52 +0100
parents baa87e68d7dc
children 07bd1a09e161
comparison
equal deleted inserted replaced
33:6886402c1545 34:6b4116e6355c
47 // (temporary) 47 // (temporary)
48 void setColor (float r, float g, float b) { 48 void setColor (float r, float g, float b) {
49 glColor3f (r, g, b); 49 glColor3f (r, g, b);
50 } 50 }
51 void drawBox (int x, int y, int w, int h) { 51 void drawBox (int x, int y, int w, int h) {
52 glBegin (GL_QUADS); 52 glRecti(x, y+h, x+w, y);
53 {
54 glVertex2i (x, y+h);
55 glVertex2i (x+w, y+h);
56 glVertex2i (x+w, y);
57 glVertex2i (x, y);
58 }
59 glEnd();
60 } 53 }
61 //END Drawing utils 54 //END Drawing utils