diff mde/mde.d @ 45:0fd51d2c6c8a

Several changes to resising windows and layout widgets. This commit still has some bugs. Moved the implementable widgets from mde.gui.widget.Widget to miscWidgets, leaving base widgets in Widget. Rewrote some of GridLayoutWidget's implementation. Made many operations general to work for either columns or rows. Some optimisations were intended but ended up being removed due to problems. Allowed layout's to resize from either direction (only with window resizes). committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Thu, 22 May 2008 11:34:09 +0100
parents 1530d9c04d4d
children f000d6cd0f74
line wrap: on
line diff
--- a/mde/mde.d	Fri May 16 12:22:10 2008 +0100
+++ b/mde/mde.d	Thu May 22 11:34:09 2008 +0100
@@ -59,8 +59,13 @@
     //END Initialisation
     
     //BEGIN Main loop setup
+    /* Note: the main loop is currently controlled by the scheduler. This is not really ideal,
+     * since it provides no direct control of the order in which components are executed and does
+     * not allow running components simultaeneously with threads.
+     * Note: probably drawing should start at the beginning of the loop and glFlush()/swapBuffers
+     * be called at the end to optimise. */
+    mainSchedule.add (SCHEDULE.DRAW, &gl.draw); // Draw, per event only.
     mainSchedule.add (mainSchedule.getNewID, &mde.events.pollEvents).frame = true;
-    mainSchedule.add (SCHEDULE.DRAW, &gl.draw); // Draw, per event only.
     //END Main loop setup
     
     while (run) {