The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mp_ui_alerts.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2016 by Chris Beck <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * This namespace provides handlers which play the sounds / notificaitons
17  * for various mp server events, depending on the preference configuration.
18  */
19 
20 #ifndef INCL_MP_UI_SOUNDS_HPP_
21 #define INCL_MP_UI_SOUNDS_HPP_
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 public_message(bool is_lobby, const std::string & sender, const std::string & message);
32  void friend_message(bool is_lobby, const std::string & sender, const std::string & message);
33  void private_message(bool is_lobby, const std::string & sender, const std::string & message);
34  void server_message(bool is_lobby, const std::string & sender, const std::string & message);
35  void ready_for_start();
36  void game_has_begun();
37 
38  void turn_changed(const std::string & player);
39 
40  // Functions to calculate what the default preference should be
41  bool get_def_pref_sound(const std::string &);
42  bool get_def_pref_notif(const std::string &);
43  bool get_def_pref_lobby(const std::string &);
44 
45  // Note, this list of items must match those ids defined in data/gui/dialogs/mp_alerts_options.cfg
46  extern const std::vector<std::string> items;
47 }
48 
49 #endif
void ready_for_start()
void turn_changed(const std::string &player_name)
void game_has_begun()
This namespace provides handlers which play the sounds / notificaitons for various mp server events...
const std::vector< std::string > items
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 public_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)
bool get_def_pref_sound(const std::string &id)
void player_leaves(bool is_lobby)
void player_joins(bool is_lobby)
GLsizei GLenum GLuint GLuint GLsizei char * message
Definition: glew.h:2499
bool get_def_pref_lobby(const std::string &id)
GLsizei const GLcharARB ** string
Definition: glew.h:4503
bool get_def_pref_notif(const std::string &id)