____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"Public Member Functions | |
| MessagesDisplay () | |
| void | UpdateMessages () |
| void | AddUniqueMessage (const char *s) |
| void | DrawMessages () |
| void | CleanMessages () |
Protected Member Functions | |
| void | ShiftMessages () |
| void | AddMessage (const char *msg) |
| bool | CheckRepeatMessage (const char *msg) |
Definition at line 413 of file mainscr.cpp.
| MessagesDisplay::MessagesDisplay | ( | ) | [inline] |
| void MessagesDisplay::UpdateMessages | ( | ) |
Update messages
Definition at line 455 of file mainscr.cpp.
References GetTicks(), CFont::Height(), CUserInterface::MessageFont, CUserInterface::MessageScrollSpeed, ShiftMessages(), and UI.
Referenced by UpdateMessages().
| void MessagesDisplay::AddUniqueMessage | ( | const char * | s | ) |
Add a new message to display only if it differs from the preceeding one.
Definition at line 610 of file mainscr.cpp.
References AddMessage(), and CheckRepeatMessage().
Referenced by SetMessage(), and SetMessageEvent().
| void MessagesDisplay::DrawMessages | ( | ) |
Draw message(s).
Definition at line 476 of file mainscr.cpp.
References CMapArea::EndX, CVideo::FillTransRectangleClip(), CVideo::Height, CFont::Height(), CUserInterface::MapArea, CVideo::MapRGB(), CUserInterface::MessageFont, PopClipping(), PushClipping(), SetClipping(), TheScreen, UI, Video, VideoDrawTextClip(), CVideo::Width, CMapArea::X, and CMapArea::Y.
Referenced by DrawMessages().
| void MessagesDisplay::CleanMessages | ( | ) |
Clean up messages.
Definition at line 620 of file mainscr.cpp.
References MessagesEventCount, and MessagesEventIndex.
Referenced by CleanMessages(), and MessagesDisplay().
| void MessagesDisplay::ShiftMessages | ( | ) | [protected] |
Shift messages array by one.
Definition at line 442 of file mainscr.cpp.
References strcpy_s().
Referenced by AddMessage(), and UpdateMessages().
| void MessagesDisplay::AddMessage | ( | const char * | msg | ) | [protected] |
Adds message to the stack
| msg | Message to add. |
Definition at line 509 of file mainscr.cpp.
References CMapArea::EndX, GetTicks(), CUserInterface::MapArea, CUserInterface::MessageFont, MESSAGES_MAX, CUserInterface::MessageScrollSpeed, ShiftMessages(), strcpy_s(), UI, CFont::Width(), and CMapArea::X.
Referenced by AddUniqueMessage(), and CheckRepeatMessage().
| bool MessagesDisplay::CheckRepeatMessage | ( | const char * | msg | ) | [protected] |
Check if this message repeats
| msg | Message to check. |
Definition at line 586 of file mainscr.cpp.
References _, AddMessage(), and sprintf_s().
Referenced by AddUniqueMessage().
1.5.6