this class memorizes a chat session. More...
#include <multiplayer_ui.hpp>
Classes | |
| struct | msg |
Public Member Functions | |
| chat () | |
| void | add_message (const time_t &time, const std::string &user, const std::string &message) |
| void | init_textbox (gui::textbox &textbox) |
| void | update_textbox (gui::textbox &textbox) |
| void | clear_history () |
Private Types | |
| typedef std::deque< msg > | msg_hist |
Private Member Functions | |
| std::string | format_message (const msg &message) |
| SDL_Color | color_message (const msg &message) |
Private Attributes | |
| msg_hist | message_history_ |
| msg_hist::size_type | last_update_ |
this class memorizes a chat session.
Definition at line 42 of file multiplayer_ui.hpp.
|
private |
Definition at line 63 of file multiplayer_ui.hpp.
| mp::chat::chat | ( | ) |
Definition at line 103 of file multiplayer_ui.cpp.
| void mp::chat::add_message | ( | const time_t & | time, |
| const std::string & | user, | ||
| const std::string & | message | ||
| ) |
Definition at line 109 of file multiplayer_ui.cpp.
References last_update_, message_history_, and game_logic::msg().
Referenced by mp::ui::add_chat_message(), mp::ui::handle_key_event(), mp::ui::process_message(), and mp::ui::process_network_data().
| void mp::chat::clear_history | ( | ) |
Definition at line 144 of file multiplayer_ui.cpp.
References last_update_, and message_history_.
|
private |
Definition at line 169 of file multiplayer_ui.cpp.
References c, font::LABEL_COLOR, mp::chat::msg::message, font::NORMAL_COLOR, font::parse_markup(), and mp::chat::msg::user.
Referenced by init_textbox(), and update_textbox().
|
private |
Definition at line 150 of file multiplayer_ui.cpp.
References preferences::get_chat_timestamp(), mp::chat::msg::message, font::parse_markup(), mp::chat::msg::time, and mp::chat::msg::user.
Referenced by init_textbox(), and update_textbox().
| void mp::chat::init_textbox | ( | gui::textbox & | textbox | ) |
Definition at line 122 of file multiplayer_ui.cpp.
References gui::textbox::append_text(), color_message(), format_message(), itor, last_update_, and message_history_.
Referenced by mp::ui::set_location().
| void mp::chat::update_textbox | ( | gui::textbox & | textbox | ) |
Definition at line 132 of file multiplayer_ui.cpp.
References gui::textbox::append_text(), color_message(), format_message(), itor, last_update_, and message_history_.
Referenced by mp::ui::add_chat_message(), mp::ui::handle_key_event(), mp::ui::process_message(), and mp::ui::process_network_data().
|
private |
Definition at line 69 of file multiplayer_ui.hpp.
Referenced by add_message(), clear_history(), init_textbox(), and update_textbox().
|
private |
Definition at line 68 of file multiplayer_ui.hpp.
Referenced by add_message(), clear_history(), init_textbox(), and update_textbox().
1.8.8