From 613191e9e603fe8d1472016c34802156bf308f9f Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 12 Jun 2019 22:54:25 +0200 Subject: Sort-of working --- src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index b6be560..fb094c0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,14 +49,14 @@ int main() { };//switch }//if else if ( ie.type == _EVENT_MOUSE ) { - if ( ie.b == 0 ) - handler.clickEvent({ie.x, ie.y}, 0); + handler.clickEvent({ie.x, ie.y}, ie.b); }// if else if ( ie.type == _EVENT_CHAR ) { switch ( ie.c ) { - case 'w': + case 0x0D: //return + edit.accept(); break; case 's': break; @@ -67,7 +67,7 @@ int main() { render.enableDebugInfo(false); break; default: - handler.charEvent( ie.c ); + edit.setChar( ie.c ); };//switch }//if else if ( ie.type == _EVENT_TERM ) { @@ -75,6 +75,8 @@ int main() { }//if }//if + edit.setColor( pick.getColor() ); + handler.write(); render.render(); } -- cgit v1.2.3