This namespace provides handlers which play the sounds / notifications for various mp server events, depending on the preference configuration. More...
Functions | |
void | game_created (const std::string &scenario, const std::string &name) |
void | player_joins (bool is_lobby) |
void | player_leaves (bool is_lobby) |
void | public_message (bool is_lobby, const std::string &sender, const std::string &message) |
void | friend_message (bool is_lobby, const std::string &sender, const std::string &message) |
void | private_message (bool is_lobby, const std::string &sender, const std::string &message) |
void | server_message (bool is_lobby, const std::string &sender, const std::string &message) |
void | ready_for_start () |
void | game_has_begun () |
void | turn_changed (const std::string &player_name) |
This namespace provides handlers which play the sounds / notifications for various mp server events, depending on the preference configuration.
This namespace provides handlers which play the sounds / notificaitons for various mp server events, depending on the preference configuration.
void mp::ui_alerts::friend_message | ( | bool | is_lobby, |
const std::string & | sender, | ||
const std::string & | message | ||
) |
Definition at line 96 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, game_config::sounds::friend_message, prefs::get(), mp::message, sound::play_UI_sound(), and desktop::notifications::send().
Referenced by display_chat_manager::add_chat_message(), and mp::do_notify().
void mp::ui_alerts::game_created | ( | const std::string & | scenario, |
const std::string & | name | ||
) |
Definition at line 35 of file mp_ui_alerts.cpp.
References _(), game_config::sounds::game_created, prefs::get(), mp::message, desktop::notifications::OTHER, sound::play_UI_sound(), desktop::notifications::send(), and VGETTEXT.
Referenced by mp::do_notify().
void mp::ui_alerts::game_has_begun | ( | ) |
Definition at line 156 of file mp_ui_alerts.cpp.
References _(), game_config::sounds::game_has_begun, prefs::get(), desktop::notifications::OTHER, sound::play_UI_sound(), and desktop::notifications::send().
Referenced by gui2::dialogs::mp_join_game::post_show().
void mp::ui_alerts::player_joins | ( | bool | is_lobby | ) |
Definition at line 51 of file mp_ui_alerts.cpp.
References _(), prefs::get(), desktop::notifications::OTHER, sound::play_UI_sound(), game_config::sounds::player_joins, and desktop::notifications::send().
Referenced by mp::do_notify().
void mp::ui_alerts::player_leaves | ( | bool | is_lobby | ) |
Definition at line 66 of file mp_ui_alerts.cpp.
References _(), prefs::get(), desktop::notifications::OTHER, sound::play_UI_sound(), game_config::sounds::player_leaves, and desktop::notifications::send().
Referenced by mp::do_notify().
void mp::ui_alerts::private_message | ( | bool | is_lobby, |
const std::string & | sender, | ||
const std::string & | message | ||
) |
Definition at line 111 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, prefs::get(), mp::message, sound::play_UI_sound(), game_config::sounds::private_message, and desktop::notifications::send().
Referenced by display_chat_manager::add_chat_message(), and mp::do_notify().
void mp::ui_alerts::public_message | ( | bool | is_lobby, |
const std::string & | sender, | ||
const std::string & | message | ||
) |
Definition at line 81 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, prefs::get(), mp::message, sound::play_UI_sound(), game_config::sounds::public_message, and desktop::notifications::send().
Referenced by display_chat_manager::add_chat_message(), and mp::do_notify().
void mp::ui_alerts::ready_for_start | ( | ) |
Definition at line 141 of file mp_ui_alerts.cpp.
References _(), prefs::get(), desktop::notifications::OTHER, sound::play_bell(), game_config::sounds::ready_for_start, desktop::notifications::send(), and gui2::dialogs::ui_sound_on().
Referenced by gui2::dialogs::mp_staging::network_handler().
void mp::ui_alerts::server_message | ( | bool | is_lobby, |
const std::string & | sender, | ||
const std::string & | message | ||
) |
Definition at line 126 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, prefs::get(), mp::message, sound::play_UI_sound(), desktop::notifications::send(), and game_config::sounds::server_message.
Referenced by display_chat_manager::add_chat_message(), and mp::do_notify().
void mp::ui_alerts::turn_changed | ( | const std::string & | player_name | ) |
Definition at line 167 of file mp_ui_alerts.cpp.
References _(), prefs::get(), desktop::notifications::send(), desktop::notifications::TURN_CHANGED, and VGETTEXT.
Referenced by playmp_controller::play_human_turn().