diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-18 19:22:39 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-18 19:22:39 +0000 |
commit | 2f4c20a0b6fa0397d623d883ee48ba59563f1e2f (patch) | |
tree | 2186c4ada36a9bc832a89c662029d3b12bf1840e /src/client/console.cc | |
parent | cc0a133a616aeff57887b27497e4a978b5697c04 (diff) |
standard hail
Diffstat (limited to 'src/client/console.cc')
-rw-r--r-- | src/client/console.cc | 28 |
1 files changed, 6 insertions, 22 deletions
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 |