sources/interface.cpp

changeset 138
c909c38ca886
parent 137
485cb6d6b98c
child 139
da7d5a8e608f
--- a/sources/interface.cpp	Wed Jul 20 14:48:47 2016 +0300
+++ b/sources/interface.cpp	Wed Jul 20 14:53:12 2016 +0300
@@ -189,12 +189,12 @@
 			if (fg != -1 || bg != -1)
 			{
 				if (::init_pair (pairnum, fg, bg) == ERR)
-					print_warning ("Unable to initialize color pair %d (%d, %d)\n", pairnum, fg, bg);
+					printWarning ("Unable to initialize color pair %d (%d, %d)\n", pairnum, fg, bg);
 			}
 		}
 	}
 
-	render_full();
+	renderFull();
 	refresh();
 	m_needRefresh = false;
 }
@@ -220,7 +220,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void Interface::set_title (const String& title)
+void Interface::setTitle (const String& title)
 {
 	m_title = title;
 	render_titlebar();
@@ -476,7 +476,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void Interface::update_statusbar()
+void Interface::updateStatusBar()
 {
 	String text;
 
@@ -528,9 +528,9 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void Interface::render_full()
+void Interface::renderFull()
 {
-	update_statusbar();
+	updateStatusBar();
 	render_titlebar();
 	render_output();
 	render_statusbar();
@@ -608,7 +608,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void Interface::handle_input()
+void Interface::handleInput()
 {
 	int ch = ::getch();
 
@@ -618,7 +618,7 @@
 	if (ch == KEY_RESIZE)
 	{
 		::clear();
-		render_full();
+		renderFull();
 		return;
 	}
 
@@ -818,7 +818,7 @@
 		case INPUTSTATE_NORMAL:
 			if (current_input()[0] == '/')
 			{
-				handle_command(current_input());
+				handleCommand(current_input());
 				flush_input();
 			}
 			else if (m_session.send_command (current_input()))
@@ -910,7 +910,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void __cdecl Interface::print_text (const char* fmtstr, ...)
+void __cdecl Interface::printText (const char* fmtstr, ...)
 {
 	va_list args;
 	va_start (args, fmtstr);
@@ -931,7 +931,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void __cdecl Interface::print_warning (const char* fmtstr, ...)
+void __cdecl Interface::printWarning (const char* fmtstr, ...)
 {
 	va_list args;
 	va_start (args, fmtstr);
@@ -942,7 +942,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void __cdecl Interface::print_error (const char* fmtstr, ...)
+void __cdecl Interface::printError (const char* fmtstr, ...)
 {
 	va_list args;
 	va_start (args, fmtstr);
@@ -1013,7 +1013,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void Interface::set_player_names (const StringList& names)
+void Interface::setPlayerNames (const StringList& names)
 {
 	m_playerNames.clear();
 
@@ -1030,7 +1030,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void Interface::tab_complete (const String& part, String complete)
+void Interface::tabComplete (const String& part, String complete)
 {
 	String& input = mutable_current_input();
 
@@ -1047,7 +1047,7 @@
 
 // -------------------------------------------------------------------------------------------------
 //
-void Interface::handle_command(const String& input)
+void Interface::handleCommand(const String& input)
 {
 	if (input[0] != '/')
 		return;
@@ -1060,7 +1060,7 @@
 	{
 		if (args.size() != 2)
 		{
-			print_error("Usage: /connect <address> <password>\n");
+			printError("Usage: /connect <address> <password>\n");
 		}
 		else
 		{
@@ -1072,7 +1072,7 @@
 			}
 			catch (std::exception& e)
 			{
-				print_error("%s\n", e.what());
+				printError("%s\n", e.what());
 				return;
 			}
 
@@ -1095,7 +1095,7 @@
 		throw Exitception();
 	}
 	else
-		print_error("Unknown command: %s\n", command.chars());
+		printError("Unknown command: %s\n", command.chars());
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -1104,7 +1104,7 @@
 {
 	print("Disconnected from %s\n", m_session.address().to_string(IPAddress::WITH_PORT).chars());
 	reset_title();
-	render_full();
+	renderFull();
 }
 
 // -------------------------------------------------------------------------------------------------

mercurial