Mercurial > projects > mde
diff mde/scheduler/init2.d @ 49:bca7e2342d77
Enabled getting the size of a text block (before or after rendering).
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 31 May 2008 13:10:06 +0100 |
parents | a98ffb64f066 |
children |
line wrap: on
line diff
--- a/mde/scheduler/init2.d Sat May 31 12:40:26 2008 +0100 +++ b/mde/scheduler/init2.d Sat May 31 13:10:06 2008 +0100 @@ -25,6 +25,8 @@ * * Currently some external modules depend on InitFunctions, while some are set up from here. Once * all are set up from here, the Init* modules can be rearranged. */ +/* Idea: go back to init being controlled from elsewhere. Add a function to wait for another init + * function to complete (threaded; might need to be done differently for non-threaded). */ module mde.scheduler.init2; import mde.scheduler.initFunctions; @@ -45,11 +47,11 @@ init.addFunc (&initInput, "initInput"); init.addFunc (&guiLoad, "guiLoad"); - init.addFunc (&initFreeType, "initFreeType"); } void guiLoad () { // init func try { + font.FontStyle.initialize; gui.load (GUI); cleanup.addFunc (&guiSave, "guiSave"); } catch (Exception e) { @@ -84,15 +86,6 @@ } } -void initFreeType () { // init func - try { - font.FontStyle.initialize; - } catch (Exception e) { - logger.fatal ("initFreeType failed: " ~ e.msg); - setInitFailure; - } -} - /+ Potential wrapper function: // Template to call function, catching exceptions: void wrap(alias Func) () {