Mercurial > projects > mde
diff mde/imde.d @ 105:08651e8a8c51
Quit button, big changes to content system.
Moved mde.gui.content to mde.content to reflect it's not only used by the gui.
Split Content module into Content and AStringContent.
New AContent and EventContent class.
Callbacks are now generic and implemented in AContent.
Renamed TextContent to StringContent and ValueContent to AStringContent.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 29 Nov 2008 12:36:39 +0000 |
parents | 2a364c7d82c9 |
children | 9824bee909fd |
line wrap: on
line diff
--- a/mde/imde.d Wed Nov 26 13:07:46 2008 +0000 +++ b/mde/imde.d Sat Nov 29 12:36:39 2008 +0000 @@ -19,13 +19,19 @@ import mde.input.Input; import mde.scheduler.Scheduler; +import mde.content.Content; static this () { // Make these available to all importing modules' static CTORs, as well as during init. input = new Input(); mainSchedule = new Scheduler; + + quit = (new EventContent("quit")).addCallback ((AContent){ + run = false; + }); } +EventContent quit; /// A content triggering mde to halt Scheduler mainSchedule; /// The schedule used by the main loop.