diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-06-12 22:54:25 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-06-12 22:54:25 +0200 |
commit | 613191e9e603fe8d1472016c34802156bf308f9f (patch) | |
tree | be4ff368db3146c260a2ac1a20358428bc576b91 /src/main.cpp | |
parent | f672aaab75181d327e34d778fcc14701b37c78a7 (diff) | |
download | ascedit-613191e9e603fe8d1472016c34802156bf308f9f.tar.gz |
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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(); } |