#include <globals.h>
Public Methods | |
| MessagesReceived (void) | |
| void | print (void) |
| void | addMessage (string str) |
Private Attributes | |
| vector< pair< int, string > > | m_data |
|
|
Definition at line 72 of file Globals.cpp.
00072 : m_data() 00073 { 00074 } |
|
|
Definition at line 86 of file Globals.cpp. References m_data, and sys_console().
00087 {
00088 sys_console() << "MessagesReceived::addMessage str:" << str << endl;
00089 m_data.push_back(pair<int,string>(currGameTick,str));
00090 }
|
|
|
Definition at line 76 of file Globals.cpp. References Globals::currGameTick, m_data, Globals::MESSAGE_DISPLAY_LENGTH(), overlay_text(), overlay_textOut(), and Vec2D.
00077 {
00078 for(vector<pair<int, string> >::iterator iter = m_data.begin(); iter != m_data.end(); ++iter)
00079 {
00080 overlay_text() << iter->second << endl;
00081 }
00082 overlay_textOut(Vec2D(0.1f, 0.2f), 1.0f, Colors::white);
00083 if(!m_data.empty() && m_data.begin()->first < (currGameTick - MESSAGE_DISPLAY_LENGTH)) m_data.erase(m_data.begin());
00084 }
|
|
|
Definition at line 126 of file globals.h. Referenced by addMessage(), and print(). |
1.3-rc2