This namespace provides handlers which play the sounds / notificaitons for various mp server events, depending on the preference configuration. More...
Functions | |
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) |
bool | get_def_pref_sound (const std::string &id) |
bool | get_def_pref_notif (const std::string &id) |
bool | get_def_pref_lobby (const std::string &id) |
Variables | |
const std::vector< std::string > | items = {"player_joins", "player_leaves", "private_message", "friend_message", "public_message", "server_message", "ready_for_start", "game_has_begun", "turn_changed"} |
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 100 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, game_config::sounds::friend_message, sound::play_UI_sound(), and desktop::notifications::send().
Referenced by display_chat_manager::add_chat_message(), gui2::tlobby_main::do_notify(), and mp::ui::process_message().
void mp_ui_alerts::game_has_begun | ( | ) |
Definition at line 155 of file mp_ui_alerts.cpp.
References _(), game_config::sounds::game_has_begun, desktop::notifications::OTHER, sound::play_UI_sound(), and desktop::notifications::send().
Referenced by mp::wait::start_game().
bool mp_ui_alerts::get_def_pref_lobby | ( | const std::string & | id | ) |
Definition at line 184 of file mp_ui_alerts.cpp.
Referenced by gui2::revert_to_default_pref_values(), and gui2::setup_item().
bool mp_ui_alerts::get_def_pref_notif | ( | const std::string & | id | ) |
Definition at line 180 of file mp_ui_alerts.cpp.
References desktop::notifications::available().
Referenced by gui2::revert_to_default_pref_values(), and gui2::setup_item().
bool mp_ui_alerts::get_def_pref_sound | ( | const std::string & | id | ) |
Definition at line 176 of file mp_ui_alerts.cpp.
Referenced by gui2::revert_to_default_pref_values(), and gui2::setup_item().
void mp_ui_alerts::player_joins | ( | bool | is_lobby | ) |
Definition at line 58 of file mp_ui_alerts.cpp.
References _(), desktop::notifications::OTHER, sound::play_UI_sound(), game_config::sounds::player_joins, and desktop::notifications::send().
Referenced by gui2::tlobby_main::do_notify(), and mp::ui::set_user_list().
void mp_ui_alerts::player_leaves | ( | bool | is_lobby | ) |
Definition at line 72 of file mp_ui_alerts.cpp.
References _(), desktop::notifications::OTHER, sound::play_UI_sound(), game_config::sounds::player_leaves, and desktop::notifications::send().
Referenced by gui2::tlobby_main::do_notify(), and mp::ui::set_user_list().
void mp_ui_alerts::private_message | ( | bool | is_lobby, |
const std::string & | sender, | ||
const std::string & | message | ||
) |
Definition at line 114 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, sound::play_UI_sound(), game_config::sounds::private_message, and desktop::notifications::send().
Referenced by display_chat_manager::add_chat_message(), gui2::tlobby_main::do_notify(), and mp::ui::process_message().
void mp_ui_alerts::public_message | ( | bool | is_lobby, |
const std::string & | sender, | ||
const std::string & | message | ||
) |
Definition at line 86 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, sound::play_UI_sound(), game_config::sounds::public_message, and desktop::notifications::send().
Referenced by display_chat_manager::add_chat_message(), gui2::tlobby_main::do_notify(), and mp::ui::process_message().
void mp_ui_alerts::ready_for_start | ( | ) |
Definition at line 142 of file mp_ui_alerts.cpp.
References _(), desktop::notifications::OTHER, sound::play_bell(), game_config::sounds::ready_for_start, desktop::notifications::send(), and preferences::UI_sound_on().
Referenced by mp::connect::process_network_data().
void mp_ui_alerts::server_message | ( | bool | is_lobby, |
const std::string & | sender, | ||
const std::string & | message | ||
) |
Definition at line 128 of file mp_ui_alerts.cpp.
References desktop::notifications::CHAT, sound::play_UI_sound(), desktop::notifications::send(), and game_config::sounds::server_message.
Referenced by display_chat_manager::add_chat_message(), gui2::tlobby_main::do_notify(), and mp::ui::process_message().
void mp_ui_alerts::turn_changed | ( | const std::string & | player_name | ) |
Definition at line 166 of file mp_ui_alerts.cpp.
References _(), desktop::notifications::send(), desktop::notifications::TURN_CHANGED, and vgettext().
Referenced by playmp_controller::play_side_impl().
const std::vector< std::string > mp_ui_alerts::items = {"player_joins", "player_leaves", "private_message", "friend_message", "public_message", "server_message", "ready_for_start", "game_has_begun", "turn_changed"} |
Definition at line 56 of file mp_ui_alerts.cpp.
Referenced by halo::halo_impl::add(), add_next_page_item(), add_prev_page_item(), ai::target_location_goal::add_targets(), ai::protect_goal::add_targets(), mp::options::combo_display::combo_display(), gui::menu::create_help_strings(), default_map_generator_job::default_generate_map(), statistics_dialog::display_stats(), hotkey::command_executor::execute_action(), controller_base::execute_action(), editor::editor_controller::execute_command(), play_controller::hotkey_handler::execute_command(), editor::editor_palette< Item >::expand_palette_groups_menu(), exploder_point::exploder_point(), exploder_rect::exploder_rect(), cave_map_generator::cave_map_generator_job::generate_chambers(), default_map_generator_job::generate_river_internal(), preprocessor_data::get_chunk(), gamemap::get_terrain(), controller_base::handle_event(), display::init_flags_for_side_internal(), terrain_builder::load_images(), theme::object::modify_location(), gui2::tmp_alerts_options::pre_show(), read_rect(), dialogs::recruit_dialog(), resolve_rect(), gui2::revert_to_default_pref_values(), events::menu_handler::scenario_settings_table(), gui::combo::set_items(), gui::list_slider< T >::set_items(), gui::button::set_label(), editor::terrain_palette::setup(), editor::editor_controller::show_menu(), play_controller::hotkey_handler::show_menu(), hotkey::command_executor::show_menu(), controller_base::show_menu(), dialogs::show_unit_list(), gui2::shrink_cache(), and events::menu_handler::status_table().