/* Copyright (C) 2008 - 2018 by Mark de Wever Part of the Battle for Wesnoth Project https://www.wesnoth.org/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the COPYING file for more details. */ #define GETTEXT_DOMAIN "wesnoth-lib" #include "gui/dialogs/message.hpp" #include "gettext.hpp" #include "gui/auxiliary/find_widget.hpp" #include "gui/widgets/button.hpp" #include "gui/widgets/image.hpp" #include "gui/widgets/label.hpp" #include "gui/widgets/settings.hpp" #include "gui/widgets/window.hpp" #include "log.hpp" namespace gui2 { namespace dialogs { REGISTER_DIALOG(message) /** * Helper to implement private functions without modifying the header. * * The class is a helper to avoid recompilation and only has static * functions. */ struct message_implementation { /** * Initialiazes a button. * * @param window The window that contains the button. * @param button_status The button status to modify. * @param id The id of the button. */ static void init_button(window& window, message::button_status& button_status, const std::string& id) { button_status.ptr = find_widget