diff mde/events.d @ 8:f63f4f41a2dc

Big changes to init; got some way towards input event support; changed mergetag ID to char[] from uint. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 25 Jan 2008 18:17:38 +0000
parents 9a990644948c
children 4c3575400769
line wrap: on
line diff
--- a/mde/events.d	Wed Jan 16 12:48:07 2008 +0000
+++ b/mde/events.d	Fri Jan 25 18:17:38 2008 +0000
@@ -7,9 +7,16 @@
 
 import derelict.sdl.events;
 
+import tango.util.log.Log : Log, Logger;
+
+private Logger logger;
+static this() {
+    logger = Log.getLogger ("mde.events");
+}
+
 static bool run = true;
 
-static this () {
+void addEventsSchedule () {
     Scheduler.perFrame (&pollEvents);
 }
 
@@ -18,10 +25,11 @@
     while (SDL_PollEvent (&event)) {
         switch (event.type) {
             case SDL_QUIT:
+                logger.info ("Quit requested");
                 run = false;
-            break;
+                break;
             default:
-                Input.instance() (event);
+                input (event);
         }
     }
 }