Mercurial > projects > mde
comparison 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 |
comparison
equal
deleted
inserted
replaced
44:07bd1a09e161 | 45:0fd51d2c6c8a |
---|---|
57 if (miscOpts.pollInterval !<= 1.0 || miscOpts.pollInterval !>= 0.0) | 57 if (miscOpts.pollInterval !<= 1.0 || miscOpts.pollInterval !>= 0.0) |
58 Options.setDouble ("misc", "pollInterval", 0.01); | 58 Options.setDouble ("misc", "pollInterval", 0.01); |
59 //END Initialisation | 59 //END Initialisation |
60 | 60 |
61 //BEGIN Main loop setup | 61 //BEGIN Main loop setup |
62 /* Note: the main loop is currently controlled by the scheduler. This is not really ideal, | |
63 * since it provides no direct control of the order in which components are executed and does | |
64 * not allow running components simultaeneously with threads. | |
65 * Note: probably drawing should start at the beginning of the loop and glFlush()/swapBuffers | |
66 * be called at the end to optimise. */ | |
67 mainSchedule.add (SCHEDULE.DRAW, &gl.draw); // Draw, per event only. | |
62 mainSchedule.add (mainSchedule.getNewID, &mde.events.pollEvents).frame = true; | 68 mainSchedule.add (mainSchedule.getNewID, &mde.events.pollEvents).frame = true; |
63 mainSchedule.add (SCHEDULE.DRAW, &gl.draw); // Draw, per event only. | |
64 //END Main loop setup | 69 //END Main loop setup |
65 | 70 |
66 while (run) { | 71 while (run) { |
67 mainSchedule.execute (Clock.now()); | 72 mainSchedule.execute (Clock.now()); |
68 | 73 |