keydown detection notes

This commit is contained in:
Adam D. Ruppe 2013-06-02 13:32:00 -04:00
parent 0fd705744a
commit b62f2c4682
1 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ void displayImage(Image image, SimpleWindow win = null) {
p.drawImage(Point(0, 0), image); p.drawImage(Point(0, 0), image);
} }
win.eventLoop(0, win.eventLoop(0,
(int) { (int, bool pressed) {
win.close(); win.close();
} ); } );
} else { } else {
@ -326,7 +326,7 @@ class SimpleWindow {
handlePulse = handler; handlePulse = handler;
} else static if(__traits(compiles, handleMouseEvent = handler)) { } else static if(__traits(compiles, handleMouseEvent = handler)) {
handleMouseEvent = handler; handleMouseEvent = handler;
} else static assert(0, "I can't use this event handler " ~ typeof(handler).stringof); } else static assert(0, "I can't use this event handler " ~ typeof(handler).stringof ~ "\nNote: if you want to capture keycode events, this recently changed to (int code, bool pressed) instead of the old (int code)");
} }