The Battle for Wesnoth  1.15.9+dev
license_prompt.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2020 by Iris Morelle <shadowm@wesnoth.org>
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 #define GETTEXT_DOMAIN "wesnoth-lib"
16 
18 
19 #include "gettext.hpp"
21 #include "gui/widgets/button.hpp"
22 #include "gui/widgets/settings.hpp"
23 #include "gui/widgets/window.hpp"
24 
25 namespace gui2 {
26 namespace dialogs {
27 
28 REGISTER_DIALOG(addon_license_prompt)
29 
30 addon_license_prompt::addon_license_prompt(const std::string& license_terms)
31  : license_terms_(license_terms)
32 {
33 }
34 
36 {
37  styled_widget& terms = find_widget<styled_widget>(&window, "terms", false);
38  terms.set_use_markup(true);
40 }
41 
42 }} // end namespace gui2::dialogs
virtual void pre_show(window &window) override
Inherited from modal_dialog.
This file contains the window object, this object is a top level container which has the event manage...
STL namespace.
Generic file dialog.
Definition: field-fwd.hpp:22
virtual void set_label(const t_string &label)
This file contains the settings handling of the widget library.
virtual void set_use_markup(bool use_markup)
Various uncategorised dialogs.
Base class for all visible items.
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64