The Battle for Wesnoth  1.19.5+dev
mp_ui_alerts.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2024
3  by Chris Beck <render787@gmail.com>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 /**
17  * This namespace provides handlers which play the sounds / notificaitons
18  * for various mp server events, depending on the preference configuration.
19  */
20 
21 #pragma once
22 
23 #include<string>
24 #include<vector>
25 
26 namespace mp::ui_alerts {
27 
28  // Functions called when such an event occurs
29  void player_joins(bool is_lobby);
30  void player_leaves(bool is_lobby);
31  void game_created(const std::string & scenario, const std::string & name);
32  void public_message(bool is_lobby, const std::string & sender, const std::string & message);
33  void friend_message(bool is_lobby, const std::string & sender, const std::string & message);
34  void private_message(bool is_lobby, const std::string & sender, const std::string & message);
35  void server_message(bool is_lobby, const std::string & sender, const std::string & message);
36  void ready_for_start();
37  void game_has_begun();
38 
39  void turn_changed(const std::string & player);
40 }
This namespace provides handlers which play the sounds / notifications for various mp server events,...
void turn_changed(const std::string &player_name)
void public_message(bool is_lobby, const std::string &sender, const std::string &message)
void game_created(const std::string &scenario, const std::string &name)
void private_message(bool is_lobby, const std::string &sender, const std::string &message)
void player_joins(bool is_lobby)
void game_has_begun()
void friend_message(bool is_lobby, const std::string &sender, const std::string &message)
void ready_for_start()
void server_message(bool is_lobby, const std::string &sender, const std::string &message)
void player_leaves(bool is_lobby)