From 4b8dba2e737ac9f41e4556546db8ed855ced80e4 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 13 Dec 2019 12:33:51 +0100 Subject: Fixes --- example/pong.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'example') diff --git a/example/pong.cpp b/example/pong.cpp index 2716fa7..6bbbe3d 100644 --- a/example/pong.cpp +++ b/example/pong.cpp @@ -1,7 +1,4 @@ -#include -#include -#include -#include +#include #include class ball : public cObject @@ -115,10 +112,10 @@ int main() screen.clickEvent({ie.x, ie.y}, 0); } else if (ie.type == _EVENT_CHAR) - { + { //handler.charEvent(ie.c); switch(ie.c) - { + { case 'w': screen.moveObject(iBarLeft, {0,-1}, _MOVE_RELATIVE); break; @@ -133,6 +130,11 @@ int main() { return 0; } + else if(ie.type == _EVENT_CTRL) + { + if(ie.c == CTRL_KEY('g')) + render.enableDebugInfo(true); + } } if(!(++cc % 3)) screen.moveObject(iAball, aball.getV(), _MOVE_RELATIVE); -- cgit v1.2.3