Mercurial > projects > mde
diff mde/gui/renderer/SimpleRenderer.d @ 37:052df9b2fe07
Allowed widget resizing, changed widget IDs and made Input catch any callback exceptions.
Enabled widget resizing.
Removed IRenderer's temporary drawBox method and added drawButton for ButtonWidget.
Made the Widget class abstract and added FixedWidget and SizableWidget classes.
Rewrote much of createWidget to use meta-code; changed widget IDs.
Made Input catch callback exceptions and report error messages.
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Mon, 05 May 2008 14:47:25 +0100 |
parents | 316b0230a849 |
children | 8c4c96f04e7f |
line wrap: on
line diff
--- a/mde/gui/renderer/SimpleRenderer.d Fri May 02 17:38:43 2008 +0100 +++ b/mde/gui/renderer/SimpleRenderer.d Mon May 05 14:47:25 2008 +0100 @@ -48,7 +48,11 @@ void drawWidgetBack (int x, int y, int w, int h) {} - void drawBox (int x, int y, int w, int h) { + void drawButton (int x, int y, int w, int h, bool pushed) { + if (pushed) + gl.setColor (1f, 0f, 1f); + else + gl.setColor (.6f, 0f, .6f); gl.drawBox (x,y, w,h); } }