sources/interface.cpp

changeset 89
777b2a10b835
parent 88
08ccaf26cffd
child 91
ac02cf1c3576
--- a/sources/interface.cpp	Thu Jul 23 01:52:04 2015 +0300
+++ b/sources/interface.cpp	Thu Jul 23 02:15:21 2015 +0300
@@ -41,7 +41,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-int Interface::color_pair (Color fg, Color bg)
+chtype Interface::color_pair (Color fg, Color bg)
 {
 	return COLOR_PAIR (1 + (int (fg) * NUM_COLORS) + int (bg));
 }
@@ -209,7 +209,7 @@
 {
 	if (Title.length() <= COLS)
 	{
-		int pair = color_pair (WHITE, BLUE);
+		chtype pair = color_pair (WHITE, BLUE);
 		int startx = (COLS - Title.length()) / 2;
 		int endx = startx + Title.length();
 		attron (pair);
@@ -436,7 +436,7 @@
 //
 void Interface::render_input()
 {
-	int promptColor = color_pair (WHITE, BLUE);
+	chtype promptColor = color_pair (WHITE, BLUE);
 
 	// If we're asking the user if they want to disconnect, we don't render any input strings,
 	// just the confirmation message.
@@ -497,7 +497,7 @@
 //
 void Interface::render_statusbar()
 {
-	int color = color_pair (WHITE, BLUE);
+	chtype color = color_pair (WHITE, BLUE);
 	int y = LINES - 1;
 	attron (color);
 	mvhline (y, 0, ' ', COLS);
@@ -814,6 +814,7 @@
 		break;
 
 	case '\n':
+	case '\r':
 	case KEY_ENTER:
 		switch (CurrentInputState)
 		{

mercurial