Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-18 19:22:39 +0000
committerStijn Buys <ingar@osirion.org>2008-05-18 19:22:39 +0000
commit2f4c20a0b6fa0397d623d883ee48ba59563f1e2f (patch)
tree2186c4ada36a9bc832a89c662029d3b12bf1840e /src/client/console.cc
parentcc0a133a616aeff57887b27497e4a978b5697c04 (diff)
standard hail
Diffstat (limited to 'src/client/console.cc')
-rw-r--r--src/client/console.cc28
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