The Battle for Wesnoth  1.15.12+dev
mp_alerts_options.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2018 by Chris Beck <render787@gmail.com>
3  Part of the Battle for Wesnoth Project https://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 #pragma once
16 
18 
19 namespace gui2::dialogs
20 {
21 
22 /**
23  * @ingroup GUIWindowDefinitionWML
24  *
25  * A Preferences subdialog permitting to configure the sounds and notifications generated in response to various mp lobby / game events.
26  * Key |Type |Mandatory|Description
27  * ------------------|---------------|---------|-----------
28  * _label | @ref label |yes |Item name.
29  * _sound | toggle_button |yes |Toggles whether to play the item sound.
30  * _notif | toggle_button |yes |Toggles whether to give a notification.
31  * _lobby | toggle_button |yes |Toggles whether to take actions for this item when in the lobby.
32  */
34 {
35 public:
36  /** Constructor. */
38 
39  /**
40  * The display function.
41  *
42  * See @ref modal_dialog for more information.
43  */
45 
46 private:
47  virtual const std::string& window_id() const override;
48 
49  virtual void pre_show(window& window) override;
50 
51  virtual void post_show(window& window) override;
52 };
53 
54 } // namespace dialogs
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
virtual const std::string & window_id() const override
The display function.
A Preferences subdialog permitting to configure the sounds and notifications generated in response to...
Abstract base class for all modal dialogs.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64