aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-06-12 22:54:25 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-06-12 22:54:25 +0200
commit613191e9e603fe8d1472016c34802156bf308f9f (patch)
treebe4ff368db3146c260a2ac1a20358428bc576b91 /src/main.cpp
parentf672aaab75181d327e34d778fcc14701b37c78a7 (diff)
downloadascedit-613191e9e603fe8d1472016c34802156bf308f9f.tar.gz
Sort-of workingHEADmaster
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();
}