aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
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();
}