From 2f4c20a0b6fa0397d623d883ee48ba59563f1e2f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 18 May 2008 19:22:39 +0000 Subject: standard hail --- src/client/console.cc | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'src/client/console.cc') diff --git a/src/client/console.cc b/src/client/console.cc index ac977f2..db2aa83 100644 --- a/src/client/console.cc +++ b/src/client/console.cc @@ -102,7 +102,7 @@ void Console::toggle() } else { SDL_WM_GrabInput(SDL_GRAB_ON); SDL_ShowCursor(SDL_DISABLE); - clear_notify(); + //clear_notify(); } setkeyboardmode(visible()); @@ -527,28 +527,12 @@ void Console::clear_notify() notify_pos = 0; } -void Console::flush() +void Console::notify(std::string const & message) { - char line[MAXCMDSIZE]; - - while(consoleinterface_buffer.getline(line, MAXCMDSIZE-1)) { - - while (consoleinterface_text.size() >= sys::MAXCONLINES) { - consoleinterface_text.pop_front(); - } - consoleinterface_text.push_back(std::string(line)); - - // save notification - notify_text[notify_pos] = line; - notify_time[notify_pos] = core::application()->time(); - notify_pos = (notify_pos+1) % MAXNOTIFYLINES; - - // print to stdout - print_ansi(line); - std::cout << std::endl; - } - - consoleinterface_buffer.clear(); + // save notification + notify_text[notify_pos] = message; + notify_time[notify_pos] = core::application()->time(); + notify_pos = (notify_pos+1) % MAXNOTIFYLINES; } } // namespace client -- cgit v1.2.3